Page 4 of 4

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

Posted: Sun Feb 15, 2015 3:11 pm
by Giovanni
Of course, it is part of the core kernel and my responsibility.

Giovanni

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

Posted: Sun Feb 15, 2015 8:35 pm
by Giovanni
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

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

Posted: Sun Feb 15, 2015 10:18 pm
by GunterO
Great, thanks for the quick fix!

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

Posted: Sun Feb 15, 2015 10:31 pm
by GunterO
Had to make a small change to chcore_v7m.c to circumvent the strict µVision compiler:

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!

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

Posted: Sun Feb 15, 2015 10:38 pm
by Giovanni
I had c99 as well, will look into this later.

Giovanni

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

Posted: Sun Feb 15, 2015 10:57 pm
by GunterO
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.

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

Posted: Mon Feb 16, 2015 8:56 am
by Giovanni
Try to clean and rebuild the project.

Giovanni

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

Posted: Wed Mar 11, 2015 5:12 am
by Dave9876
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.

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

Posted: Wed Mar 11, 2015 8:47 am
by Giovanni
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

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

Posted: Mon Oct 19, 2015 9:04 am
by daemon
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!