Skip to content

Commit b49f85f

Browse files
committed
Fix: reverted unwanted changes in ARM5's scatter files of legacy nRF51822 targets.
Applied proper changes to ARM5's scatter files of nRF5 regular targets. Improvement: Remove hardcoding of FLASH vector address, now FLASH vector address is imported form linker to C code. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent c64c456 commit b49f85f

File tree

7 files changed

+21
-26
lines changed

7 files changed

+21
-26
lines changed

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ LR_IROM1 0x1C000 0x0024000 {
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM0 0x20002800 UNINIT 0x000000c0 { ;no init section
22-
*(noinit)
23-
}
24-
RW_IRAM1 0x200028C0 0x00005740 {
21+
RW_IRAM1 0x20002800 0x00005800 {
2522
.ANY (+RW +ZI)
2623
}
2724
}

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ LR_IROM1 0x18000 0x0028000 {
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM0 0x20002000 UNINIT 0x000000c0 { ;no init section
22-
*(noinit)
23-
}
24-
RW_IRAM1 0x200020C0 0x00001F40 {
21+
RW_IRAM1 0x20002000 0x00002000 {
2522
.ANY (+RW +ZI)
2623
}
2724
}

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ LR_IROM1 0x1C000 0x0024000 {
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM0 0x20002800 UNINIT 0x000000c0 { ;no init section
22-
*(noinit)
23-
}
24-
RW_IRAM1 0x200028C0 0x00001740 {
21+
RW_IRAM1 0x20002800 0x00001800 {
2522
.ANY (+RW +ZI)
2623
}
2724
}

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
;
1313
;WITH SOFTDEVICE:
1414

15-
LR_IROM1 0x0001B000 0x0025000 {
16-
ER_IROM1 0x0001B000 0x0025000 {
15+
LR_IROM1 0x1B000 0x0025000 {
16+
ER_IROM1 0x1B000 0x0025000 {
1717
*.o (RESET, +First)
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM1 0x20002ef8 0x5108 {
21+
RW_IRAM0 0x20002ef8 UNINIT 0x000000c0 { ;no init section
22+
*(noinit)
23+
}
24+
RW_IRAM1 0x20002FB8 0x00005048 {
2225
.ANY (+RW +ZI)
2326
}
2427
}

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
;
1313
;WITH SOFTDEVICE:
1414

15-
LR_IROM1 0x0001B000 0x0025000 {
16-
ER_IROM1 0x0001B000 0x0025000 {
15+
LR_IROM1 0x18000 0x0028000 {
16+
ER_IROM1 0x18000 0x0028000 {
1717
*.o (RESET, +First)
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM1 0x20002ef8 0x1108 {
21+
RW_IRAM0 0x20002000 UNINIT 0x000000c0 { ;no init section
22+
*(noinit)
23+
}
24+
RW_IRAM1 0x200020C0 0x00001F40 {
2225
.ANY (+RW +ZI)
2326
}
2427
}

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ LR_IROM1 0x0001B000 0x0025000 {
1818
*(InRoot$$Sections)
1919
.ANY (+RO)
2020
}
21-
RW_IRAM1 0x20002ef8 0x1108 {
21+
RW_IRAM0 0x20002ef8 UNINIT 0x000000c0 { ;no init section
22+
*(noinit)
23+
}
24+
RW_IRAM1 0x20002FB8 0x00001048 {
2225
.ANY (+RW +ZI)
2326
}
2427
}

targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,8 @@
5656
typedef void (*generic_irq_handler_t)(void);
5757

5858

59-
#ifdef NRF52
60-
#define VECTORS_FLASH_START 0x1C000
61-
#endif
62-
63-
#ifdef NRF51
64-
#define VECTORS_FLASH_START 0x1B000
65-
#endif
59+
extern uint32_t __Vectors[];
60+
#define VECTORS_FLASH_START __Vectors
6661

6762
/**
6863
* @brief Function for relocation of the vector to RAM on nRF5x devices.

0 commit comments

Comments
 (0)