Skip to content

Commit 8a7f362

Browse files
author
Martin Günther
authored
CoreValidation: fixed failing tests, reworked preprocessed linker scripts
With this fix CoreValidation Cortex-M/A AC6/GCC balanced pass. Latest CMSIS Toolbox with corrected linker script preprocessing is needed.
1 parent 52ee66a commit 8a7f362

57 files changed

Lines changed: 365 additions & 2689 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMSIS/CoreValidation/Layer/App/Bootloader_Cortex-M/bootloader.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ int main(void) {
5757

5858
/* Set non-secure main stack (MSP_NS) */
5959
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
60+
61+
/* Set Non-Secure state for Interrupt 0
62+
(used in Non-Secure TC_CoreInstr_LoadStoreExclusive Test) */
63+
NVIC->ITNS[0] |= 1U;
6064

6165
/* Get non-secure reset handler */
6266
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));

CMSIS/CoreValidation/Layer/Target/CM0/RTE/Device/ARMCM0/gcc_arm.ld

Lines changed: 0 additions & 296 deletions
This file was deleted.

CMSIS/CoreValidation/Layer/Target/CM23/RTE/Device/ARMCM23/ARMCM23_ac6.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919

20-
#if defined (__ARM_FEATURE_CMSEx) && (__ARM_FEATURE_CMSEx == 3U)
20+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2121
#define __STACKSEAL_SIZE ( 8 )
2222
#else
2323
#define __STACKSEAL_SIZE ( 0 )
@@ -27,7 +27,7 @@
2727
#define __HEAP_BASE ( AlignExpr(+0, 8) ) /* starts after RW_RAM or RW_NOINIT section, 8 byte aligned */
2828

2929

30-
#if defined (__ARM_FEATURE_CMSEx) && (__ARM_FEATURE_CMSEx == 3U)
30+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
3131
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
3232
#define __CV_SIZE ( __CMSEVENEER_SIZE )
3333
#else
@@ -72,7 +72,7 @@ LR_APP __LR_BASE __LR_SIZE { /* load reg
7272
#endif
7373
}
7474

75-
#if defined (__ARM_FEATURE_CMSEx) && (__ARM_FEATURE_CMSEx == 3U)
75+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
7676
LR_CMSE_VENEER __CV_BASE ALIGN 32 __CV_SIZE { /* load/execution region for CMSE Veneers */
7777
ER_CMSE_VENEER __CV_BASE __CV_SIZE {
7878
*(Veneer$$CMSE)

CMSIS/CoreValidation/Layer/Target/CM23/RTE/Device/ARMCM23/ARMCM23_gcc.ld

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,27 @@
1717
*/
1818

1919

20-
#if defined (__ARM_FEATURE_CMSEx) && (__ARM_FEATURE_CMSEx == 3U)
20+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
2121
#define __STACKSEAL_SIZE ( 8 )
2222
#else
2323
#define __STACKSEAL_SIZE ( 0 )
2424
#endif
2525

26+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
27+
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
28+
#define __CV_SIZE ( __CMSEVENEER_SIZE )
29+
#else
30+
#define __CV_BASE ( 0xFFFFFFFF )
31+
#define __CV_SIZE ( 0 )
32+
#endif
33+
2634

2735
MEMORY
2836
{
29-
ROM (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
37+
ROM (rx) : ORIGIN = __ROM_BASE, LENGTH = ( __ROM_SIZE - __CV_SIZE )
38+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
39+
CV (rx) : ORIGIN = __CV_BASE, LENGTH = __CV_SIZE
40+
#endif
3041
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
3142
}
3243

@@ -67,6 +78,16 @@ ENTRY(Reset_Handler)
6778

6879
SECTIONS
6980
{
81+
/*
82+
* SG veneers:
83+
* All SG veneers are placed in the special output section .gnu.sgstubs.
84+
*/
85+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
86+
.gnu.sgstubs : {
87+
. = ALIGN(32);
88+
} > CV
89+
#endif
90+
7091
.text :
7192
{
7293
KEEP(*(.vectors))
@@ -94,16 +115,6 @@ SECTIONS
94115
KEEP(*(.eh_frame*))
95116
} > ROM
96117

97-
/*
98-
* SG veneers:
99-
* All SG veneers are placed in the special output section .gnu.sgstubs.
100-
*/
101-
#if defined (__ARM_FEATURE_CMSEx) && (__ARM_FEATURE_CMSEx == 3U)
102-
.gnu.sgstubs : {
103-
. = ALIGN(32);
104-
} > ROM
105-
#endif
106-
107118
.ARM.extab :
108119
{
109120
*(.ARM.extab* .gnu.linkonce.armextab.*)

0 commit comments

Comments
 (0)