I am migrating my project from 2.4.3 to 2.6.0 and it dies on startup, while printing the first line of the console greeting.
I was able to isolate the problem to CORTEX_USE_FPU in chconf.h - everything works without FPU option (#define CORTEX_USE_FPU FALSE) but breaks when I change this to TRUE. I am using stm32f4 discovery, optimization none -O0 and "-mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant" - these flags used to work for me with 2.4.3
Please advice
2.6.0 & FPU
Moderator: RoccoMarco
Re: 2.6.0 & FPU
I don't know about the FPU thing but lately there were some issues with the -O0 thing. Since you posted on the ChibiOS/GFX sub forum, I assume that you're using that as well, right? Can you please try to compile the application with -O2? The talk is going on here.
~ Tectu
~ Tectu
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: 2.6.0 & FPU
Could you try one of the standard demos and see if it fails for you when enabling the FPU? this would allow me to test this on my side.
Giovanni
Giovanni
Re: 2.6.0 & FPU
Standard demo compiled with standard Makefile (with the addition of 'USE_FPU = yes') does work.
I have adjusted the Makefile to compile my project and it also works fine now with FPU. Historically I was always using Eclipse to compile my stuff, I will now try to figure out how to bring Eclipse compiler/linker preferences in sync with the Makefile and report which option was causing the issue.
PS: there is a typo in the makefile:
# Enable this if you really want to use the STM FWLib.
ifeq ($(USE_FPU),)
USE_FPU = no
endif
I have adjusted the Makefile to compile my project and it also works fine now with FPU. Historically I was always using Eclipse to compile my stuff, I will now try to figure out how to bring Eclipse compiler/linker preferences in sync with the Makefile and report which option was causing the issue.
PS: there is a typo in the makefile:
# Enable this if you really want to use the STM FWLib.
ifeq ($(USE_FPU),)
USE_FPU = no
endif
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: 2.6.0 & FPU
In order to fix Eclipse compilation, I had to explicitly define a global symbol "-DCORTEX_USE_FPU=TRUE" - the '#define CORTEX_USE_FPU TRUE' line in chconf.h without the global symbol was causing the issue.
I believe this was not the case with 2.4.3.
Is it expected behavior that this setting is expected to be defined as a global symbol and not just as a line in the chconf.h now?
I believe this was not the case with 2.4.3.
Is it expected behavior that this setting is expected to be defined as a global symbol and not just as a line in the chconf.h now?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: 2.6.0 & FPU
It should work even in chconf.h if accompanied by the proper compiler options, CORTEX_USE_FPU is not sufficient.
Giovanni
Giovanni
Re: 2.6.0 & FPU
Giovanni wrote:It should work even in chconf.h if accompanied by the proper compiler options, CORTEX_USE_FPU is not sufficient.
Giovanni
I am not sure what you are saying
2.4.3: works with only "#define CORTEX_USE_FPU TRUE" without "-DCORTEX_USE_FPU=TRUE"
2.6.0: unhandedException indefinite loop in case of "#define CORTEX_USE_FPU TRUE" without "-DCORTEX_USE_FPU=TRUE" (change in behavior comparing to 2.4.3)
2.6.0: works with "#define CORTEX_USE_FPU TRUE" AND "-DCORTEX_USE_FPU=TRUE"