Skip to main content
MSm
Associate II
Jun 5, 2020 2:54 PM UTC
Solved

STACK and HEAP size

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.
Ons KOOLI
Ons KOOLIBest answer
Visitor II
Jun 5, 2020 3:52 PM UTC

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
Visitor II
Jun 5, 2020 3:52 PM UTC

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
Jun 5, 2020 6:01 PM UTC

Thanks a lot ons for your complete reply.

Regards

Mohsen