cancel
Showing results for 
Search instead for 
Did you mean: 

STACK and HEAP size

MSm
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Ons KOOLI
Senior III

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.

View solution in original post

2 REPLIES 2
Ons KOOLI
Senior III

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
Associate II

Thanks a lot ons for your complete reply.

Regards

Mohsen