summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-07-27 21:48:01 +0800
committerGitHub <[email protected]>2017-07-27 21:48:01 +0800
commitab2a125b3d7d2af7027231c97e1df9fd31802f50 (patch)
tree8ab70b99c5c23b1fbd714b1b422f18e4415e68c2 /bsp
parent763d7456e31e8188c0b9848d8b6eab01f884c265 (diff)
parent573c294216e37268d5387296c760527d2f5eab7d (diff)
Merge pull request #774 from armink/fix_rti_link_for_iar
[BSP] Fix component initialization functions link order for IAR Linker
Diffstat (limited to 'bsp')
-rw-r--r--bsp/beaglebone/am335x_DDR.icf3
-rw-r--r--bsp/mb9bf618s/rtthread-fm3.icf3
-rw-r--r--bsp/stm32f10x/stm32f10x_flash.icf3
-rw-r--r--bsp/stm32f20x/stm32_rom.icf3
-rw-r--r--bsp/stm32f40x/stm32f40x_flash.icf3
-rw-r--r--bsp/stm32f411-nucleo/stm32_rom.icf3
-rw-r--r--bsp/stm32f7-disco/rtthread-stm32f7xx.icf3
-rw-r--r--bsp/tm4c129x/tm4c_rom.icf7
8 files changed, 20 insertions, 8 deletions
diff --git a/bsp/beaglebone/am335x_DDR.icf b/bsp/beaglebone/am335x_DDR.icf
index 8f158d8432..7f17ec07ec 100644
--- a/bsp/beaglebone/am335x_DDR.icf
+++ b/bsp/beaglebone/am335x_DDR.icf
@@ -29,6 +29,7 @@ define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
@@ -38,7 +39,7 @@ keep { section .rti_fn* };
place at address mem :__ICFEDIT_intvec_start__ {readonly section .intvec};
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite,
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
block UND_STACK, block ABT_STACK, block HEAP };
diff --git a/bsp/mb9bf618s/rtthread-fm3.icf b/bsp/mb9bf618s/rtthread-fm3.icf
index be53bfb67e..7876fa0c81 100644
--- a/bsp/mb9bf618s/rtthread-fm3.icf
+++ b/bsp/mb9bf618s/rtthread-fm3.icf
@@ -20,6 +20,7 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFED
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
@@ -29,5 +30,5 @@ keep { section VSymTab };
keep { section .rti_fn* };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite, block CSTACK, last block HEAP };
diff --git a/bsp/stm32f10x/stm32f10x_flash.icf b/bsp/stm32f10x/stm32f10x_flash.icf
index 0380cc7620..108480dced 100644
--- a/bsp/stm32f10x/stm32f10x_flash.icf
+++ b/bsp/stm32f10x/stm32f10x_flash.icf
@@ -20,6 +20,7 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFED
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
@@ -29,5 +30,5 @@ keep { section VSymTab };
keep { section .rti_fn* };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite, block CSTACK, last block HEAP};
diff --git a/bsp/stm32f20x/stm32_rom.icf b/bsp/stm32f20x/stm32_rom.icf
index bf3e6860df..293cd6ab01 100644
--- a/bsp/stm32f20x/stm32_rom.icf
+++ b/bsp/stm32f20x/stm32_rom.icf
@@ -20,6 +20,7 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFED
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
@@ -29,6 +30,6 @@ keep { section FSymTab };
keep { section VSymTab };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite,
block CSTACK, block HEAP }; \ No newline at end of file
diff --git a/bsp/stm32f40x/stm32f40x_flash.icf b/bsp/stm32f40x/stm32f40x_flash.icf
index 204f459388..f04831220e 100644
--- a/bsp/stm32f40x/stm32f40x_flash.icf
+++ b/bsp/stm32f40x/stm32f40x_flash.icf
@@ -23,6 +23,7 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFED
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
@@ -32,5 +33,5 @@ keep { section VSymTab };
keep { section .rti_fn* };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite, block CSTACK, last block HEAP};
diff --git a/bsp/stm32f411-nucleo/stm32_rom.icf b/bsp/stm32f411-nucleo/stm32_rom.icf
index fcaabee14e..cffda7ce4e 100644
--- a/bsp/stm32f411-nucleo/stm32_rom.icf
+++ b/bsp/stm32f411-nucleo/stm32_rom.icf
@@ -20,13 +20,14 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __IC
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite, block CSTACK, block HEAP };
keep { section FSymTab };
keep { section VSymTab };
diff --git a/bsp/stm32f7-disco/rtthread-stm32f7xx.icf b/bsp/stm32f7-disco/rtthread-stm32f7xx.icf
index 73cbc1c601..453d8fee58 100644
--- a/bsp/stm32f7-disco/rtthread-stm32f7xx.icf
+++ b/bsp/stm32f7-disco/rtthread-stm32f7xx.icf
@@ -20,13 +20,14 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __IC
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-place in ROM_region { readonly };
+place in ROM_region { readonly, block RTT_INIT_FUNC };
place in RAM_region { readwrite, block CSTACK, block HEAP };
keep { section FSymTab };
keep { section VSymTab };
diff --git a/bsp/tm4c129x/tm4c_rom.icf b/bsp/tm4c129x/tm4c_rom.icf
index a07b00da91..6b4fde42e1 100644
--- a/bsp/tm4c129x/tm4c_rom.icf
+++ b/bsp/tm4c129x/tm4c_rom.icf
@@ -45,10 +45,15 @@ define region SRAM = mem:[from 0x20000000 to 0x2003ffff];
define block HEAP with alignment = 8, size = 0x00000000 { };
//
+// Define a block for RT-Thread components initialization
+//
+define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
+
+//
// Indicate that the read/write values should be initialized by copying from
// flash.
//
-initialize by copy { readwrite };
+initialize by copy { readwrite , RTT_INIT_FUNC };
//
// Indicate that the noinit values should be left alone. This includes the