This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SystemCoreClockUpdate declared implicitly

I am trying to write some really basic code for the ADuCM3029 from ADI.

It all compiles OK, except for the error message:

aducm3029_test.c(90): warning: #223-D: function "SystemCoreClockUpdate" declared implicitly SystemCoreClockUpdate();

I have copied the system_ADuCM3029.c (that contains the SystemCoreClockUpdate function) file into my RTE folder
and the compiler has this folder in its include path, so I cannot see what the problem is.

For info, here is the applicable code:

 #include <stdint.h>         // needed for the int32_t definition
//#include <system_ADuCM3029.c> // needed for SystemCoreClockUpdate


#include "aducm3029_test.h"     /* stick all the header stuff in here */
#include <ADuCM302x.h>          /* stores register and bit names */
#include <ADuCM302x_device.h>          /* stores pointers to registers */

/*------------------------------------------------------------------*/
/* CLOCK FUNCTIONS                                                  */
/*------------------------------------------------------------------*/

void initialise(void)
{
    /* Enable internal HF oscillators */

    // disable key protection for clock oscillator
    pADI_CLKG0_OSC->KEY = 0xCB14u;

    /* Switch on the internal HF oscillator */
    pADI_CLKG0_OSC->CTL |= BITP_CLKG_OSC_CTL_HFOSCEN;

    /* wait for HF OSC to stabilize */
    while ((pADI_CLKG0_OSC->CTL & (1U << BITP_CLKG_OSC_CTL_HFOSCOK)) == 0u)
    {
    }
    /* Miscellaneous Clock Settings */
    /* Use internal HF oscillator for PCLK and HCLK */
    pADI_CLKG0_CLK->CTL0 &= BITP_CLKG_CLK_CTL0_CLKMUX;

    /* set CLK control Reg 0 later when you start using peripherals */
    /* leave Clock Control Regs 1 and 3 as default settings  */

    /* configure Clock Control Reg 5 (clock gating for peripherals) when needed. */
    /* meanwhile, keep with default values */

/*------------------------------------------------------------------*/
/* POWER MANAGEMENT FUNCTIONS                                       */
/*------------------------------------------------------------------*/

                pADI_PMG0->IEN = 0x0000;             // disable all interrupts
                pADI_PMG0->PWRMOD = 0x0000;  // keep in active mode
                pADI_PMG0->CTL1 = 0x0000;            // keep buck converter off for the moment


    /* enable LF crystal oscillator */

    pADI_CLKG0_OSC->KEY = 0xCB14u;
    pADI_CLKG0_OSC->CTL |= BITP_CLKG_OSC_CTL_LFXTALEN;

    /* wait for LF OSC to stabilize */
    while ((pADI_CLKG0_OSC->CTL & (1U << BITP_CLKG_OSC_CTL_LFOSCOK)) == 0u)
    {
    }

    /* set the power management interrupts when needed */

    /* compute new internal clocks based on the newly reset controller */
    SystemCoreClockUpdate();

    return;
}

int main(void)
{

}

What am I doing wrong?

If I include system_ADuCM3029.c, I get a stack of 'multiply defined' variable errors

I have written thousands of lines of code for PICs, Atmels, 8051s etc, but am new to the ARM ecosystem.

Please let me know

Thanks

Bill