Simplify CRP placement.

pull/5355/head
Chris Snow 2017-09-30 18:39:11 +01:00 committed by adbridge
parent 1c5c0adbac
commit 2b0ff329d6
4 changed files with 24 additions and 18 deletions

View File

@ -51,10 +51,4 @@ performed on the device.
#define CRP CRP_NONE #define CRP CRP_NONE
#endif #endif
#if defined (__ICCARM__) MBED_SECTION(".CRPSection") MBED_USED const long CRP_Key = CRP;
__root const long CRP_Key@APPLICATION_ADDR + 0x000002FC = CRP;
#elif defined (__ARMCC_VERSION)
const long CRP_Key __attribute__((used)) __attribute__((at(APPLICATION_ADDR+0x000002FC))) = CRP;
#elif defined (__GNUC__)
const long CRP_Key __attribute__((used)) __attribute__((section(".CRPSection"))) = CRP;
#endif

View File

@ -9,8 +9,14 @@
#endif #endif
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address ER_IROM0 MBED_APP_START 0x2FC { ; load address = execution address
*.o (RESET, +First) *.o (RESET, +First)
.ANY (+RO)
}
ER_CRP (MBED_APP_START + 0x2FC) FIXED 4 {
*.o (.CRPSection)
}
ER_IROM1 (MBED_APP_START + (0x2FC + 4)) FIXED (MBED_APP_SIZE - (0x2FC + 4)) {
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
} }

View File

@ -9,8 +9,14 @@
#endif #endif
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address ER_IROM0 MBED_APP_START 0x2FC { ; load address = execution address
*.o (RESET, +First) *.o (RESET, +First)
.ANY (+RO)
}
ER_CRP (MBED_APP_START + 0x2FC) FIXED 4 {
*.o (.CRPSection)
}
ER_IROM1 (MBED_APP_START + (0x2FC + 4)) FIXED (MBED_APP_SIZE - (0x2FC + 4)) {
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
} }

View File

@ -19,8 +19,8 @@ define symbol __ICFEDIT_size_cstack__ = 0x1000;
define symbol __ICFEDIT_size_heap__ = 0x2000; define symbol __ICFEDIT_size_heap__ = 0x2000;
/**** End of ICF editor section. ###ICF###*/ /**** End of ICF editor section. ###ICF###*/
define symbol __CRP_start__ = 0x000002FC; define symbol __CRP_start__ = MBED_APP_START + 0x000002FC;
define symbol __CRP_end__ = 0x000002FF; define symbol __CRP_end__ = MBED_APP_START + 0x000002FF;
define symbol __RAM1_start__ = 0x2007C000; define symbol __RAM1_start__ = 0x2007C000;
define symbol __RAM1_end__ = 0x20083FFF; define symbol __RAM1_end__ = 0x20083FFF;
@ -43,5 +43,5 @@ place in ROM_region { readonly };
place in RAM_region { readwrite, place in RAM_region { readwrite,
block HEAP, block CSTACK }; block HEAP, block CSTACK };
place in CRP_region { section .crp }; place in CRP_region { section .CRPSection };
place in RAM1_region { section .ethusbram }; place in RAM1_region { section .ethusbram };