Skip to main content
MSm
Associate II
June 5, 2020
Solved

STACK and HEAP size

  • June 5, 2020
  • 2 replies
  • 2986 views

Hello everyone

In Keil Projects we are able to change Stack_Size and Heap_Size in "startup_stm32f746xx.s" file like this :

Stack_Size      EQU    0x400

Heap_Size     EQU    0x200

BUT in IAR projects there isn't such code line in the startup file related to the project. how and where can we change stack and heap size in IAR projects?

Regards

Mohsen

This topic has been closed for replies.
Best answer by Ons KOOLI

Hi MSm,

A clean way to do that is to go to: Project --> Options --> Linker --> Click the 'Edit' button under stm32f746xx.icf file like attached --> then go to Stack/Heap sizes.

Or, you can do this directly from the .icf file :

/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/

The first method is the one we recommend.

Best Regards,

Ons.

2 replies

Ons KOOLI
Ons KOOLIBest answer
Associate
June 5, 2020

Hi MSm,

A clean way to do that is to go to: Project --> Options --> Linker --> Click the 'Edit' button under stm32f746xx.icf file like attached --> then go to Stack/Heap sizes.

Or, you can do this directly from the .icf file :

/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/

The first method is the one we recommend.

Best Regards,

Ons.

MSm
MSmAuthor
Associate II
June 5, 2020

Thanks a lot ons for your complete reply.

Regards

Mohsen