File tree Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 3737_estack = ORIGIN (RAM) + LENGTH (RAM); /* end of "RAM" Ram type memory */
3838
3939_Min_Heap_Size = 0x200 ; /* required amount of heap */
40- _Min_Stack_Size = 0x400 ; /* required amount of stack */
40+ _Min_Stack_Size = 0x800 ; /* required amount of stack */
4141
4242/* Sections */
4343SECTIONS
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ set(MCU_VARIANT stm32u083xx)
22set (JLINK_DEVICE stm32u083mc)
33
44set (LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR} /STM32U083MCTx_FLASH.ld)
5+ set (LD_FILE_IAR ${CMAKE_CURRENT_LIST_DIR} /stm32u083xx_flash.icf)
56
67function (update_board TARGET )
78 target_compile_definitions (${TARGET} PUBLIC
89 STM32U083xx
10+ CFG_EXAMPLE_VIDEO_READONLY
911 )
1012endfunction ()
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CFLAGS += \
44
55# All source paths should be relative to the top level.
66LD_FILE = $(BOARD_PATH ) /STM32U083MCTx_FLASH.ld
7+ LD_FILE_IAR = $(BOARD_PATH ) /stm32u083xx_flash.icf
78
89# For flash-jlink target
910JLINK_DEVICE = STM32U083MC
Original file line number Diff line number Diff line change 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__ = 0x0803FFFF;
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__ = 0x800;
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 };
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ function(add_board_target BOARD_TARGET)
3636 set (LD_FILE_GNU ${CMAKE_CURRENT_FUNCTION_LIST_DIR} /linker/${MCU_VARIANT_UPPER} _FLASH.ld)
3737 endif ()
3838 set (LD_FILE_Clang ${LD_FILE_GNU} )
39- set (LD_FILE_IAR ${ST_CMSIS} /Source /Templates/iar/linker/${MCU_VARIANT} _flash.icf)
39+ if (NOT DEFINED LD_FILE_IAR)
40+ set (LD_FILE_IAR ${ST_CMSIS} /Source /Templates/iar/linker/${MCU_VARIANT} _flash.icf)
41+ endif ()
4042
4143 add_library (${BOARD_TARGET} STATIC
4244 ${ST_CMSIS} /Source /Templates/system_${ST_PREFIX} .c
You can’t perform that action at this time.
0 commit comments