Skip to content

Commit 349315a

Browse files
authored
Merge pull request ARMmbed#4310 from c1728p9/fix_ncs36510_vector_table
Fix RAM vector table for NCS36510
2 parents cb3531c + 5cf2255 commit 349315a

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 + 0x90 { ; 8_byte_aligned(35 vectors * 4 bytes each) = 0x90
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 /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
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]; /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
12+
define region RAM_ALL = Mem:[from 0x3FFF4000 + 0x90 size 0xC000 - 0x90]; /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
1313

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

targets/TARGET_ONSEMI/TARGET_NCS36510/device/cmsis_nvic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include <cmsis_nvic.h>
3333

34-
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM
34+
#define NVIC_RAM_VECTOR_ADDRESS (0x3FFF4000) // Vectors positioned at start of RAM
3535
#define NVIC_FLASH_VECTOR_ADDRESS (0x00000000) // Initial vector position in flash
3636

3737

0 commit comments

Comments
 (0)