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

Keil uVision Error L6218E: Undefined Symbol APBPrescTable (referred from stm32f4xx_hal_rcc.o)

I'm new to uVision for a University project and since trying to get my code to build on my PC at home I get this error with any code I try to compile. Anyone know any way to fix this? I've been racking my brain for hours trying to find a solution as I can't work on my project if the code won't even build. Thank you.

Parents Reply Children
  • It doesn't build successfully, no. It says target not created with the aforementioned error message.

    By 'definition of the missing symbol' what do you mean exactly? I'm very new to this kind of stuff.

  • STM32Cube_FW_F4_V1.24.1\Projects\STM32446E-Nucleo\Templates\Src\system_stm32f4xx.c

    ..
    
    /* This variable is updated in three ways:
    1) by calling CMSIS function SystemCoreClockUpdate()
    2) by calling HAL API function HAL_RCC_GetHCLKFreq()
    3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
    Note: If you use this function to configure the system clock; then there
    is no need to call the 2 first functions listed above, since SystemCoreClock
    variable is updated automatically.
    */
    uint32_t SystemCoreClock = 16000000;
    const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
    const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};

  • Hi I'm still having issues with this. Even with an example project downloaded directly from Keil, it still gives me this error: Undefined Symbol APBPrescTable, is there anything I can add to my code that would fix this?

  • Build one of the example or template projects. From *ST*  https://www.st.com/en/embedded-software/stm32cubef4.html

    Seems like your project is missing some meta-data, either in the command line defines for compiler, or paths for include files. Or the source is just not built/included in your project. Check for #ifdef block code inclusion.

    Or you are mixing things from inconsistent sources.