2012-04-04 10:39 PM
Hello,
reasently i changed ide to iar and i getting strange problems: i have working code developed in atollic and tested on my discovery boards, but then i use same code on IAR, it just doesn't work. Like touchscreen code is completely non working, even were is no compile errors/warnings. all optimizations are set to no optimization, and i am using same library as in atollic, Any ideas how to fix that ?2012-04-05 01:54 AM
I had a similiar problem moving working projects from Atollic to Crossworks.
Everything worked nicely with Atollic, compiled without errors in Crossworks after some effort, and crashed almost immediately into the HardFault Handler after start. There is probably no way around debugging your project yet again. A common problem is the stack size. Atollic used by default 0x400, i.e. one kilobyte. Crossworks started with 128 byte.2012-04-05 02:27 AM
yes, i am getting same error about stack size, and even if code runs without hard fault error, still, i can't access touchscreen via spi.
How i can fix stack size so it will be just like in atilloc on IAR ?2012-04-05 03:11 AM
I guess you have to modify the linker script.
The Atollic linker script 'stm32_flash.ld' says: ... ** Set heap size, stack size and stack location according ** to application requirements. ... _Min_Stack_Size = 0x400; /* required amount of stack */ ... This might be slightly different in the CS-Lite linker script, but similiar.