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

lpc17xx_rtc.o error

Hi
I want to use rtc in cmsis but I faced with this error
would you please help me
linking...
flash_fs.axf: Error: L6218E: Undefined symbol CLKPWR_ConfigPPWR (referred from lpc17xx_rtc.o).
flash_fs.axf: Error: L6218E: Undefined symbol check_failed (referred from lpc17xx_rtc.o).

  • you are "building" the project. before building the entire project, Compile individual files. this helps you to check if there are any errors in individual C source files.

    Compile the lpc17xx_rtc.c file. You will see some errors. try to solve those errors.

    errors mean:
    CLKPWR_ConfigPPWR & check_failed symbols used in the file "lpc17xx_rtc.c" are not defined.

  • thanks
    How can I compile just lpc17xx_rtc.c file ??(right click an then translate?)
    when I translate lpc17xx_rtc.c there is no error

    compiling lpc17xx_rtc.c...
    C:\Keil\ARM\CMSIS\Drivers\lpc17xx_rtc.c(734): warning: #186-D: pointless comparison of unsigned integer with zero
    C:\Keil\ARM\CMSIS\Drivers\lpc17xx_rtc.c(758): warning: #186-D: pointless comparison of unsigned integer with zero
    C:\Keil\ARM\CMSIS\Drivers\lpc17xx_rtc.c - 0 Error(s), 2Warning(s).

    CLKPWR_ConfigPPWR used like this in lpc17xx_rtc.c

    void RTC_Init (LPC_RTC_TypeDef *RTCx)
    {
            CHECK_PARAM(PARAM_RTCx(RTCx));
    
            /* Set up clock and power for RTC module */
            CLKPWR_ConfigPPWR (CLKPWR_PCONP_PCRTC, ENABLE);
    
            // Clear all register to be default
            RTCx->ILR = 0x00;
            RTCx->CCR = 0x00;
            RTCx->CIIR = 0x00;
            RTCx->AMR = 0xFF;
            RTCx->CALIBRATION = 0x00;
    
    


    what should I do?

  • If you are not getting any errors, that means the compilation is ok.
    (to "Translate" press "Ctrl+F7" _Shortcut keys_)

    Now,
    "CLKPWR_ConfigPPWR" is a function called from your "lpc17xx_rtc.c" file, but the linker is unable to find the function (in the "lpc17xx_rtc.c" file).

    i m sure that the function is defined in some other file. may be "lpc17xx_clkpwr.c" file!!

    so how do you tell(inform) the linker that the function code exists in some other file?

  • thanks
    I Add "lpc17xx_clkpwr.c" file to my project so, I don't face with that error
    but I have 1 error yet
    linking...
    flash_fs.axf: Error: L6218E: Undefined symbol check_failed (referred from lpc17xx_rtc.o).

  • I'm found it!!!

    check_failed function is in "lpc17xx_libcfg_default.c"

    thanks in advanced