It's not STM32 specific question, but a lack of understanding of basic C and compilers! The actual table definition is in a respective .c file and it must be added to a project.
As I stated there is a declaration in the .h file. But there is no table in any .c file loaded when loading the IDE.
This is code generated from loading the STM32CubeIDE version 1.2.1
I am concerned that the versions. The ICON that was generated shows 1.2.0, when opening the splash screen shows 1.2.1, the about shows 1.0.0.201904021149. All I have done is down load the IDE and installed it.
I have provided several screen shots that will explain in more detail see response to berendi
...
/** @addtogroup STM32F4xx_System_Private_Variables
* @{
*/
/* 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};
...
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Yes it is from the linker. Yes the variable declaration is normally in the include file (.h). And Yes I have the system_stm32f4xx.c loaded by the ST install.
However, this "system_stm32f4xx.c" that was loaded by the standard install does not define the table as I stated. There is only the AHBPrescTable[16] table defined in "system_stm32f4xx.c" the APBPrescTable[8] is not defined in the file loaded by the ST auto install. The linker is looking for APBPrescTable[8]. Can you tell me why the standard install did not get the correct .c file. I can not remember that I did anything other than tell it to install the IDE.
I have another version issue with the repository generated by ST standard install. The standard install has downloaded several zip files. The zip file I believe would be the latest is ...v1242.zip. Inside this zip the folder has the name ...v1240. So which version would that be?
Do you think I should start completely over with the install or is this normal with ST installs and you need to dig out the right files once the install is done. I believe someone else has had this problem. You can see it on the WEB, but it looked like he was using some other device than me so I wanted better confirmation of what is going on.
I believe I found the "system_stm32f4xx.c" file that has both the AHBP... and APBP... tables defined. It was in the v1242.zip which only has a v1240 folder bad versioning by ST. I am not sure about just replacing the file with the same name into the project since it is ST code and it should have loaded correctly. What do you suggest I do.
Thank you for your help. I will continue trying to get the IDE to load properly to the correct version. I did find that AHBP table was not defined in version 1.24.2 of the .c file. The v1242 zip has the .c file with AHBP and APBP defined. I keep trying to get it to install this version but having a hard time getting it to select that .c file. I will keep trying.