cancel
Showing results for 
Search instead for 
Did you mean: 

I have a error related to APBPrescTable. It is in the .h file but no table. Have I loaded the IDE incorrectly?

BCarl.1
Associate II
 
12 REPLIES 12
berendi
Principal

And we are supposed to...

  1. Guess what the error message was?
  2. Guess which .h file?
  3. Guess which package?
  4. Guess which IDE?
  5. All of the above?
  6. Invest no more effort in solving your problem than you invested in describing your problem?
Piranha
Chief II

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.

0690X00000By1OcQAJ.png0690X00000By1OSQAZ.png0690X00000By1O8QAJ.png​Here is the information you have asked for.

If you need anything else let me know.

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

Can you help?

The linker can't get closure because you're missing source files.

The array in question is in system_stm32f4xx.c , isn't it?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BCarl.1
Associate II

No it is not.

That is the issue I stated. It is in the .h (declared) but no table (the table is not in any .C file) of what the IDE loaded.

All the information of which file the error is, the error it self, the project search of the table is in the reply to berendi.

So is it a down load and install of the IDE problem? Or is it something else.

Where can I get a correct .c file since it is ST code that has the error?

The include file lays the groundwork, it is not where the variable is defined. The error you posted is most definitely from the linker.

Find where you put the Repository and fish it out (alternatively download and unpack CubeF4 package)

STM32Cube_FW_F4_V1.24.2\Projects\STM32446E-Nucleo\Examples\GPIO\GPIO_IOToggle\Src\system_stm32f4xx.c

...
/** @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
Up vote any posts that you find helpful, it shows what's working..
BCarl.1
Associate II

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.

I'm not using CubeMX / CubeIDE, so really can't speak to their efficacy, or the best course forward. I'm using Keil

Clearly it has picked a mismatched set of files.

Some of the HAL subversions are patches to the primary fork, so v1.24.0 might contain the bulk of the code.

v1.24.0 is about 700MB, the delta for v1.24.1 is about 122MB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..