Hi,
I am working with STM32F407 Discovery board and was running the Demo provided in ChibOS version 2.6.3 on Keil uvision 5, the provided project works fine when I run it with the optimization level set to 3 and check the optimize for time box in the project Options (C/C++ tab), however if I Select the optimization level to be 0 and uncheck Optimize for time I end up with an unhandled exception.
Any ideas why this is happening ?
Thanks
Aley
STM32F407-Discovery Demo unhandled exception
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F407-Discovery Demo unhandled exception
It could be a stack overflow, unoptimized code uses more space. Try increasing PORT_IDLE_THREAD_STACK_SIZE, it is the stack allocated to the idle thread, normally it is 16.
Giovanni
Giovanni
Re: STM32F407-Discovery Demo unhandled exception
Thank for your reply Giovanni, I have tried increasing the PORT_IDLE_STACK_SIZE to 18, 24 and event 32 but I get the same problem. Any thing else that I can try ?
Aley
Aley
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F407-Discovery Demo unhandled exception
Try enabling the debug options in chconf.h and see if something is trapped.
Giovanni
Giovanni