Skip to content

Commit 94a0256

Browse files
c1728p9bulislaw
authored andcommitted
Fix crash on boot on NCS36510
Fix the ram address of the vector table on the NCS36510. Also reserve space for it in the linker scripts.
1 parent d10df48 commit 94a0256

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

targets/TARGET_ONSEMI/TARGET_NCS36510/device/TOOLCHAIN_ARM/NCS36510.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
99

1010
; no uvisor support at this time
1111

12-
RW_IRAM1 0x3FFF4000 {
12+
RW_IRAM1 0x3FFF4000 + (36 * 4) { ; 36 vectors * 4 bytes each
1313
.ANY(+RW +ZI)
1414
}
1515
ARM_LIB_HEAP AlignExpr(+0, 8) ALIGN 8 EMPTY (0x3FFF4000 + 0xC000 - AlignExpr(ImageLimit(RW_IRAM1),8) ) {}

targets/TARGET_ONSEMI/TARGET_NCS36510/device/TOOLCHAIN_GCC_ARM/NCS36510.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
MEMORY {
66
VECTORS (rx) : ORIGIN = 0x00003000, LENGTH = 0x00000090
77
FLASH (rx) : ORIGIN = 0x00003090, LENGTH = 320K - 4K - 0x90
8-
RAM (rwx) : ORIGIN = 0x3FFF4000, LENGTH = 48K
8+
RAM (rwx) : ORIGIN = 0x3FFF4090, LENGTH = 48K - 0x90 /* 36 vectors * 4 bytes each */
99
}
1010

1111
/* Linker script to place sections and symbol values. Should be used together

targets/TARGET_ONSEMI/TARGET_NCS36510/device/TOOLCHAIN_IAR/NCS36510.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ define region FLASHB = Mem:[from 0x00100000 size 0x50000];
88
define region RAMA = Mem:[from 0x3FFFC000 size 0x4000];
99
define region RAMB = Mem:[from 0x3FFF8000 size 0x4000];
1010
/* G2H ZPRO requires RAMC to be enabled */
11-
define region RAMC = Mem:[from 0x3FFF4000 size 0x4000];
12-
define region RAM_ALL = Mem:[from 0x3FFF4000 size 0xC000];
11+
define region RAMC = Mem:[from 0x3FFF4000 + 0x90 size 0x4000 - 0x90]; /* 36 vectors * 4 bytes each */
12+
define region RAM_ALL = Mem:[from 0x3FFF4000 + 0x90 size 0xC000 - 0x90]; /* 36 vectors * 4 bytes each */
1313

1414
/* Create a stack */
1515
define block CSTACK with size = 0x200, alignment = 8 { };

targets/TARGET_ONSEMI/TARGET_NCS36510/device/cmsis_nvic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
*/
3131

3232
#define NVIC_NUM_VECTORS (16 + 20)
33-
#define NVIC_RAM_VECTOR_ADDRESS 0x20000000 // Vectors positioned at start of RAM
33+
#define NVIC_RAM_VECTOR_ADDRESS 0x3FFF4000 // Vectors positioned at start of RAM

0 commit comments

Comments
 (0)