This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Halcogen Stack adjustment => crash in __TI_auto_init();

Other Parts Discussed in Thread: HALCOGEN

Hi,

I wanted to change stack sizes as follows...

 

 

 

 

As i didn´t want to mess with my project settings i "diffed it§ into sys_core.asm:

userSp  .word 0x08000000+0x00002000

svcSp   .word 0x08000000+0x00002000+0x00000200

fiqSp   .word 0x08000000+0x00002000+0x00000200+0x00000200;irqSp   .word 0x08000000+0x00002000+0x00000200+0x00000200+0x00000200

;abortSp .word 0x08000000+0x00002000+0x00000200+0x00000200+0x00000200+0x00000200

undefSp .word 0x08000000+0x00002000+0x00000200+0x00000200+0x00000200+0x00000200+0x00000200

 

Which sadly causes __TI_auto_init(); to crash. (to be exacly the "_TI_decompress_" algorithm overwrites the cache memory and thus causes the subroutine to crash.

 

So - finally - my question: is there anything else i have to adjust after changing the stack sizes?

 

best regards

Dominik

 

 

 

 

 

  • Dominik,

    I am afraid that you will have to make the change in Halcogen since the memory space for the global variables are still set up by Halcogen. When you increase the stack size, the memory space for global variables stays the same. I guess that it overlays with your new stack. __TI_auto_init() is the function initializing the global variables. It would get stuck if the global variable space overlays the stack. Please check your map file to make sure that there are no memory overlapping.

    Thanks and regards,

    Zhaohong

  • Thanks Zhaohong very much for pointing out the problem. The system crash now renders plausible.

    Right now i can´t simply run halcogen on my project. The source would be completely messed up.

    But if anyone runs into the same problem in the near future....

    Both files sys_core.asm and sys_link.cmd have to be updated to stay consistent.

     

    regards

    Dominik