cancel
Showing results for 
Search instead for 
Did you mean: 

CC3100 and STM32F4DISC. ''Error[Li005]: no definition for ''APBPrescTable''

kashubadmitry
Associate II
Posted on May 11, 2017 at 15:25

Hello!

I have CC3100BOOST and STM32F4-Discovery.

I installed IAR, CC3100SDK v 1.2.0, STM32Cube_FW_F4_V1.16.0.

Copied the folder 'Drivers' from '

STM32Cube_FW_F4_V1.16.0.

' to folder 'C:\TI\CC3100SDK_1.2.0\cc3100-sdk\platform\stm32discovery'

I opened the project 'C:\TI\CC3100SDK_1.2.0\cc3100-sdk\platform\stm32discovery\example_project_iar\getting_started_with_wlan_station'.

I pressed F7 and there was the error 'Error[Li005]: no definition for 'APBPrescTable' [referenced from C:\TI\CC3100SDK_1.2.0\cc3100-sdk\platform\stm32discovery\example_project_iar\

getting_started_with_wlan_station\Debug\Obj\stm32f4xx_hal_rcc.o]'

The developers of Texas Instruments say, that the error is in HAL-driver, and they don't know how to correct the error.

Please, help me!

Thank You!

7 REPLIES 7
Adalgiso
Associate II
Posted on May 11, 2017 at 15:44

Hi,

I have the same issue with the latest version of cube 4.21. For now I solved it by adding the definition in the file  system_stm32f2xx.c

  const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};

You will have to do it for your processor F4.

kashubadmitry
Associate II
Posted on May 11, 2017 at 16:03

Giso, thank You for reply!

in file '

system_stm32f4xx.c' there is a string 'const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};'

I solved the problem, when I added the string 'const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};' in file 'stm32f4xx_hal_rcc.c'.

But I think it is not right(((

Maybe there is another way, not to add

the string '

const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};' in file '

stm32f4xx_hal_rcc.c'

?

Thank You!

parsec
Associate III
Posted on May 12, 2017 at 09:18

I had this problem too. I am using VisualGDB and in my case, when updating BSP to the latest version it caused my project to fail to compile. Reason and fix is as described above. When making a new blank project I could see that this had been added to system_stm32f4xx.c:

const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};

So adding it there looks to be the 'correct' way of fixing the issue.

In earlier BSPs, SystemCoreClock, HAL_RCC_GetPCLK1Freq() and HAL_RCC_GetPCLK2Freq() in stm32f4xx_hal_rcc.c all referenced APBAHBPrescTable which was defined in the same file and has since been removed and replaced by APBPrescTable.

For a followup question; Where are these breaking changes documented? I am looking in release notes and cannot find anything about APBAHBPrescTable being removed, or APBPrescTable being added to HAL?

Posted on May 12, 2017 at 07:54

Nice to konw that you fixed it.

This issue appeared only in cube 4.21 (for me with lib for F2 V1.60). I totally agree with you something is wrong with the code generation.

kashubadmitry
Associate II
Posted on May 12, 2017 at 11:10

Hello!

The problem was also solved, when I copied files 'system_stm32f4xx.c' and 'system_stm32f4xx.h' from folder 'C:\TI\

http://www.ti.com/tool/CC3100SDK

_1.2.0\cc3100-sdk\platform\stm32discovery\Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates' and 'C:\TI\

http://www.ti.com/tool/CC3100SDK

_1.2.0\cc3100-sdk\platform\stm32discovery\Drivers\CMSIS\Device\ST\STM32F4xx\Include' to folder 'C:\TI\

http://www.ti.com/tool/CC3100SDK

_1.2.0\cc3100-sdk\platform\Stm32discovery'.

The file 'stm32f4xx_hal_rcc.c' must be default without adding string .const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};

How to create hex or bin file from IAR?

I can't understand(((

Thank You!

kashubadmitry
Associate II
Posted on May 12, 2017 at 13:39

I solved the problem, thank You!

Posted on May 12, 2017 at 13:37

Go in project properties--> output converter and select the format