cancel
Showing results for 
Search instead for 
Did you mean: 

migrating from Atollic to IAR

linas2
Associate II
Posted on April 05, 2012 at 07:39

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 ?
3 REPLIES 3
frankmeyer9
Associate II
Posted on April 05, 2012 at 10:54

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.

linas2
Associate II
Posted on April 05, 2012 at 11:27

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 ?

frankmeyer9
Associate II
Posted on April 05, 2012 at 12:11

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.