Of course, it is part of the core kernel and my responsibility.
Giovanni
STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
- 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
Problem fixed as bug #556. It is OK on the repository now, the fix will be in version 2.6.7, version 3.0.0 is not affected.
Giovanni
Giovanni
Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4
Had to make a small change to chcore_v7m.c to circumvent the strict µVision compiler:
Setting c99 option obviously did the trick as well, but just wanted to let you know.
Anyway, compiled back with the FPU options on, and all working fine!
Code: Select all
os\ports\RVCT\ARMCMx\chcore_v7m.c(172): error: #268: declaration may not appear after executable statement in block
volatile register uint32_t fpscr __asm("fpscr");Setting c99 option obviously did the trick as well, but just wanted to let you know.
Anyway, compiled back with the FPU options on, and all working fine!
- 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
I had c99 as well, will look into this later.
Giovanni
Giovanni
Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4
Ok, thanks. While you are at it, please disable all your debug options in chconf.h as well (especially CH_DBG_SYSTEM_STATE_CHECK), and do a rebuild.
It complains about undefined symbols dbg_check_lock & dbg_check_unlock, referred from chcoreasm_v7m.
It complains about undefined symbols dbg_check_lock & dbg_check_unlock, referred from chcoreasm_v7m.
- 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
Try to clean and rebuild the project.
Giovanni
Giovanni
Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4
As I don't see any other posts in the forums that give a solution to the original problem and this is one of the first results on googling the issue, I guess this would be the best place to post my solution.
The documentation for the ARMccv5 compiler list the linker symbols as being "Image$$", however in the resulting compiler error we get "Image$". I'll give that a few seconds to sink in to everyone. At some point either the compiler has been looser about accepting the symbols, or '$' has been changed to be an escaping variable on the command line. It doesn't matter which of those actually cause the issue now.
The solution that works for me is to change the c/c++ preprocessor symbols to "__heap_base__=Image$$$$RW_IRAM1$$$$ZI$$$$Limit __heap_end__=Image$$$$RW_IRAM2$$$$Base" and magically it compiles without issue and works (on the one board I tried). This is for MDK5.14.0.0 - so I don't make any promises for earlier versions.
The documentation for the ARMccv5 compiler list the linker symbols as being "Image$$", however in the resulting compiler error we get "Image$". I'll give that a few seconds to sink in to everyone. At some point either the compiler has been looser about accepting the symbols, or '$' has been changed to be an escaping variable on the command line. It doesn't matter which of those actually cause the issue now.
The solution that works for me is to change the c/c++ preprocessor symbols to "__heap_base__=Image$$$$RW_IRAM1$$$$ZI$$$$Limit __heap_end__=Image$$$$RW_IRAM2$$$$Base" and magically it compiles without issue and works (on the one board I tried). This is for MDK5.14.0.0 - so I don't make any promises for earlier versions.
- 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
Hi,
Thank you for the solution, I will give this a try and then include the change in 2.6.8/3.0.0.
Giovanni
Thank you for the solution, I will give this a try and then include the change in 2.6.8/3.0.0.
Giovanni
Re: STM32F4-Discovery + Keil v5.11.1.00 + ChibiOS 2.6.4
Dave9876 wrote:change the c/c++ preprocessor symbols to "__heap_base__=Image$$$$RW_IRAM1$$$$ZI$$$$Limit __heap_end__=Image$$$$RW_IRAM2$$$$Base" and magically it compiles without issue and works (on the one board I tried). This is for MDK5.14.0.0 - so I don't make any promises for earlier versions.
I confirm that this solution is worked with Keil uVision 5.15. Thanks Dave9876!