Skip to content

Commit 946749f

Browse files
authored
Merge pull request #3495 from thread-liu/slave
[update] 更新 bsp/stm32 不规范
2 parents 1210a61 + a68f142 commit 946749f

File tree

10 files changed

+2498
-2253
lines changed

10 files changed

+2498
-2253
lines changed

bsp/stm32/stm32f429-st-disco/board/linker_scripts/link.icf

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,30 @@
55
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
66
/*-Memory Regions-*/
77
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8-
define symbol __ICFEDIT_region_ROM_end__ = 0x081FFFFF;
8+
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
99
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10-
define symbol __ICFEDIT_region_RAM_end__ = 0x2004FFFF;
10+
define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
1111
/*-Sizes-*/
12-
define symbol __ICFEDIT_size_cstack__ = 0x0400;
13-
define symbol __ICFEDIT_size_heap__ = 0x0000;
12+
define symbol __ICFEDIT_size_cstack__ = 0x200;
13+
define symbol __ICFEDIT_size_heap__ = 0x000;
1414
/**** End of ICF editor section. ###ICF###*/
1515

16+
1617
define memory mem with size = 4G;
17-
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
18-
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
18+
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19+
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
1920

2021
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22+
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23+
define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
2124

2225
initialize by copy { readwrite };
2326
do not initialize { section .noinit };
2427

28+
keep { section FSymTab };
29+
keep { section VSymTab };
30+
keep { section .rti_fn* };
2531
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
2632

27-
place in ROM_region { readonly };
28-
place in RAM_region { readwrite, last block CSTACK};
33+
place in ROM_region { readonly, block RTT_INIT_FUNC };
34+
place in RAM_region { readwrite, block CSTACK, last block HEAP};

bsp/stm32/stm32f429-st-disco/board/linker_scripts/link.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
; *** Scatter-Loading Description File generated by uVision ***
33
; *************************************************************
44

5-
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
6-
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
5+
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
6+
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
77
*.o (RESET, +First)
88
*(InRoot$$Sections)
99
.ANY (+RO)
1010
}
11-
RW_IRAM1 0x20000000 0x00050000 { ; RW data
11+
RW_IRAM1 0x20000000 0x00020000 { ; RW data
1212
.ANY (+RW +ZI)
1313
}
1414
}

0 commit comments

Comments
 (0)