STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

tom
Posts: 5
Joined: Sat Jun 21, 2014 8:22 pm

STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by tom »

Hi,

I'm Tom and i'm new to ChibiOS. I want to build the ChibiOS 2.6.4 Demo "ARMCM4-STM32F407-DISCOVERY" with Keil MDK v5.11.1.00 Lite for the STM32F4-Discovery but got some warnings and erros.

Code: Select all

[...]
compiling testqueues.c...
compiling testsem.c...
compiling testthd.c...
compiling main.c...
..\..\..\boards\ST_STM32F4_DISCOVERY\board.h(52): warning:  #47-D: incompatible redefinition of macro "STM32F40_41xxx"
  #define STM32F40_41xxx
..\main.c: 1 warning, 0 errors
linking...
.\obj\ch.axf: Error: L6218E: Undefined symbol Image$RW_IRAM1$ZI$Limit (referred from chmemcore.o).
.\obj\ch.axf: Error: L6218E: Undefined symbol Image$RW_IRAM2$Base (referred from chmemcore.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\obj\ch.axf" - 2 Error(s), 16 Warning(s).
Target not created


I downloaded ChibiOS from sourceforge three times and I ever got the same error.

Where and what is the mistake? How can I solve the problem?

Thanks, Tom
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

Hi,

I just tried here using version 5.0, it works. I think that in your project there are some target-related options missing (IRAM1, IRAM2 etc), this can happen if you tried to change the device, even if you change it back some settings are lost.

Please make sure to restore the project files from the zip files and then compile the project.

Giovanni
tom
Posts: 5
Joined: Sat Jun 21, 2014 8:22 pm

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by tom »

Hi,

I erased all files and unzipped the whole directory once more. Then I opened the demo project once more by clicking on the ch.uvproj. I got the same errors. The target-related options are not changed and should be right (screenshot in the attachement). Thanks for your support.
Attachments
target.png
target.png (35.28 KiB) Viewed 9170 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

You should be seeing this:

keilopt.jpg
keilopt.jpg (59.42 KiB) Viewed 9168 times


The same... let me see.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

Those missing symbols come from here...

keilopt2.jpg
keilopt2.jpg (63.47 KiB) Viewed 9167 times


There must be differences between version 5.0 and 5.11 of uVision for some reason, those strange strings are used to get limits of memory areas, is this still valid in your version?

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

Also, for some reason the compiler apparently includes the compiler-provided file stm32f4xx.h instead of the version included with ChibiOS (which contains some fixes), is there some option to not include CMSIS files in there?

I will look into this next week I hope.

Giovanni
tom
Posts: 5
Joined: Sat Jun 21, 2014 8:22 pm

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by tom »

Giovanni wrote:Those missing symbols come from here...

There must be differences between version 5.0 and 5.11 of uVision for some reason, those strange strings are used to get limits of memory areas, is this still valid in your version?

Giovanni


That's the snapshoot of the compiler window. I see no difference..
Attachments
compiler.png
compiler.png (36.23 KiB) Viewed 9169 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

Hi,

I installed uVision 5.11a and I am getting the same errors. The problem is that the linker no more generates the symbols:

Image$$RW_IRAM1$$ZI$$Limit
Image$$RW_IRAM2$$Base

which are supposed to be generated (the behavior is still documented). The same project compiles fine in 4.x or 5.0.

I will keep an eye on next releases, the workaround is to disable the automatic heap management in chconf.h (the heap size is set to zero=automatic), give it a fixed size, for example 2048.

Giovanni
tom
Posts: 5
Joined: Sat Jun 21, 2014 8:22 pm

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by tom »

Hi,

I uninstalled Keil v5.11.1.00 and installed Keil v4.74.0.0. I deleted the the old Chibios directory and unzipped Chibios 2.6.4 once more with the result, that the compiler warnings are solved but the linker error ist the same... (see attachement). I'm confused. What I'm doing wrong? Is this a problem of the Lite-Version of Keil?
Attachments
keil_v4.png
keil_v4.png (22.28 KiB) Viewed 9086 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4

Post by Giovanni »

Hi,

No because I am using the lite version too, it is possible they introduced the same bug in the latest 4.x and 5.x. Those symbols are documented in the linker section of the manual and used to work in previous versions.

The workaround is to disable the automatic heap size in chconf.h.

Giovanni
Post Reply