Skip to content

Commit 7712205

Browse files
committed
bsp/stm32h5: increase stack for msc_file_explorer
Signed-off-by: HiFiPhile <[email protected]>
1 parent 2d3aaaf commit 7712205

12 files changed

+167
-7
lines changed

hw/bsp/stm32h5/family.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set(STARTUP_FILE_Clang ${STARTUP_FILE_GNU})
2727
set(STARTUP_FILE_IAR ${ST_CMSIS}/Source/Templates/iar/startup_${MCU_VARIANT}.s)
2828
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/linker/${MCU_VARIANT_UPPER}_FLASH.ld)
2929
set(LD_FILE_Clang ${LD_FILE_GNU})
30-
set(LD_FILE_IAR ${ST_CMSIS}/Source/Templates/iar/linker/${MCU_VARIANT}_flash.icf)
30+
set(LD_FILE_IAR ${CMAKE_CURRENT_LIST_DIR}/linker/${MCU_VARIANT}_flash.icf)
3131

3232
#------------------------------------
3333
# BOARD_TARGET

hw/bsp/stm32h5/linker/STM32H503xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151

5252
/* Sections */

hw/bsp/stm32h5/linker/STM32H523xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151
/* Sections */
5252
SECTIONS

hw/bsp/stm32h5/linker/STM32H533xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151
/* Sections */
5252
SECTIONS

hw/bsp/stm32h5/linker/STM32H562xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151
/* Sections */
5252
SECTIONS

hw/bsp/stm32h5/linker/STM32H563xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151
/* Sections */
5252
SECTIONS

hw/bsp/stm32h5/linker/STM32H573xx_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MEMORY
4646
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
4747

4848
_Min_Heap_Size = 0x200; /* required amount of heap */
49-
_Min_Stack_Size = 0x400; /* required amount of stack */
49+
_Min_Stack_Size = 0x1000; /* required amount of stack */
5050

5151
/* Sections */
5252
SECTIONS
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*###ICF### Section handled by ICF editor, don't touch! ****/
2+
/*-Editor annotation file-*/
3+
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4+
/*-Specials-*/
5+
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6+
/*-Memory Regions-*/
7+
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8+
define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9+
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10+
define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11+
12+
/*-Sizes-*/
13+
define symbol __ICFEDIT_size_cstack__ = 0x1000;
14+
define symbol __ICFEDIT_size_heap__ = 0x200;
15+
/**** End of ICF editor section. ###ICF###*/
16+
17+
18+
define memory mem with size = 4G;
19+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
20+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
21+
22+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
23+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
24+
25+
initialize by copy { readwrite };
26+
do not initialize { section .noinit };
27+
28+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
29+
30+
place in ROM_region { readonly };
31+
place in RAM_region { readwrite,
32+
block CSTACK, block HEAP };
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*###ICF### Section handled by ICF editor, don't touch! ****/
2+
/*-Editor annotation file-*/
3+
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4+
/*-Specials-*/
5+
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6+
/*-Memory Regions-*/
7+
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8+
define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
9+
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10+
define symbol __ICFEDIT_region_RAM_end__ = 0x20043FFF;
11+
12+
/*-Sizes-*/
13+
define symbol __ICFEDIT_size_cstack__ = 0x1000;
14+
define symbol __ICFEDIT_size_heap__ = 0x200;
15+
/**** End of ICF editor section. ###ICF###*/
16+
17+
18+
define memory mem with size = 4G;
19+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
20+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
21+
22+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
23+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
24+
25+
initialize by copy { readwrite };
26+
do not initialize { section .noinit };
27+
28+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
29+
30+
place in ROM_region { readonly };
31+
place in RAM_region { readwrite,
32+
block CSTACK, block HEAP };
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*###ICF### Section handled by ICF editor, don't touch! ****/
2+
/*-Editor annotation file-*/
3+
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4+
/*-Specials-*/
5+
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6+
/*-Memory Regions-*/
7+
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8+
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF;
9+
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10+
define symbol __ICFEDIT_region_RAM_end__ = 0x2009FFFF;
11+
12+
/*-Sizes-*/
13+
define symbol __ICFEDIT_size_cstack__ = 0x1000;
14+
define symbol __ICFEDIT_size_heap__ = 0x200;
15+
/**** End of ICF editor section. ###ICF###*/
16+
17+
18+
define memory mem with size = 4G;
19+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
20+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
21+
22+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
23+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
24+
25+
initialize by copy { readwrite };
26+
do not initialize { section .noinit };
27+
28+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
29+
30+
place in ROM_region { readonly };
31+
place in RAM_region { readwrite,
32+
block CSTACK, block HEAP };

0 commit comments

Comments
 (0)