Skip to content

Commit 6ab48b1

Browse files
author
Deepika
committed
Update linker scripts for LPC824 and Wiznet
1 parent 1182d64 commit 6ab48b1

File tree

4 files changed

+117
-36
lines changed
  • targets
    • TARGET_NXP/TARGET_LPC82X/TARGET_LPC824/device/TOOLCHAIN_ARM_MICRO
    • TARGET_WIZNET/TARGET_W7500x
      • TARGET_WIZwiki_W7500ECO/device/TOOLCHAIN_ARM_MICRO
      • TARGET_WIZwiki_W7500P/device/TOOLCHAIN_ARM_MICRO
      • TARGET_WIZwiki_W7500/device/TOOLCHAIN_ARM_MICRO

4 files changed

+117
-36
lines changed
Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,48 @@
11
#! armcc -E
22

3-
LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
4-
ER_IROM1 0x00000000 0x8000 { ; load address = execution address
3+
#if !defined(MBED_APP_START)
4+
#define MBED_APP_START 0x00000000
5+
#endif
6+
7+
; 32K flash
8+
#if !defined(MBED_APP_SIZE)
9+
#define MBED_APP_SIZE 0x8000
10+
#endif
11+
12+
; 4KB
13+
#if !defined(MBED_RAM_START)
14+
#define MBED_RAM_START 0x10000000
15+
#endif
16+
17+
#if !defined(MBED_RAM_SIZE)
18+
#define MBED_RAM_SIZE 0x2000
19+
#endif
20+
21+
22+
#if !defined(MBED_BOOT_STACK_SIZE)
23+
#define MBED_BOOT_STACK_SIZE 0x400
24+
#endif
25+
26+
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
27+
#define VECTOR_SIZE 0xC0
28+
29+
#define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+VECTOR_SIZE)
30+
31+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
32+
33+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
534
*.o (RESET, +First)
635
*(InRoot$$Sections)
736
.ANY (+RO)
837
}
9-
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
10-
; 8KB - 0xC0 = 0x1F40
11-
RW_IRAM1 0x10000000+0xC0 0x2000-0xC0 {
38+
39+
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-VECTOR_SIZE) { ; RW data
1240
.ANY (+RW +ZI)
1341
}
14-
}
1542

43+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
44+
}
45+
46+
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack
47+
}
48+
}

targets/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500/device/TOOLCHAIN_ARM_MICRO/W7500.sct

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
11
#! armcc -E
22

3+
#if !defined(MBED_APP_START)
4+
#define MBED_APP_START 0x00000000
5+
#endif
6+
7+
#if !defined(MBED_APP_SIZE)
8+
#define MBED_APP_SIZE 0x00020000
9+
#endif
10+
11+
#if !defined(MBED_RAM_START)
12+
#define MBED_RAM_START 0x20000000
13+
#endif
14+
15+
#if !defined(MBED_RAM_SIZE)
16+
#define MBED_RAM_SIZE 0x00004000
17+
#endif
18+
19+
320
#if !defined(MBED_BOOT_STACK_SIZE)
4-
#define MBED_BOOT_STACK_SIZE 0x400
21+
#define MBED_BOOT_STACK_SIZE 0x400
522
#endif
623

724
#define Stack_Size MBED_BOOT_STACK_SIZE
825

9-
; *************************************************************
10-
; *** Scatter-Loading Description File generated by uVision ***
11-
; *************************************************************
26+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
27+
28+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
1229

13-
LR_IROM1 0x00000000 0x00020000 { ; load region size_region
14-
ER_IROM1 0x00000000 0x00020000 { ; load address = execution address
1530
*.o (RESET, +First)
1631
*(InRoot$$Sections)
1732
.ANY (+RO)
1833
}
19-
RW_IRAM1 0x20000000 0x00004000 { ; RW data
34+
RW_IRAM1 MBED_RAM_START MBED_RAM_SIZE { ; RW data
2035
.ANY (+RW +ZI)
2136
}
22-
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x00004000 - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
37+
38+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE-Stack_Size-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
2339
}
24-
ARM_LIB_STACK (0x20000000+0x00004000) EMPTY -Stack_Size { ; stack
40+
41+
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack
2542
}
2643
}
27-

targets/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500ECO/device/TOOLCHAIN_ARM_MICRO/W7500.sct

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
11
#! armcc -E
22

3+
#if !defined(MBED_APP_START)
4+
#define MBED_APP_START 0x00000000
5+
#endif
6+
7+
#if !defined(MBED_APP_SIZE)
8+
#define MBED_APP_SIZE 0x00020000
9+
#endif
10+
11+
#if !defined(MBED_RAM_START)
12+
#define MBED_RAM_START 0x20000000
13+
#endif
14+
15+
#if !defined(MBED_RAM_SIZE)
16+
#define MBED_RAM_SIZE 0x00004000
17+
#endif
18+
19+
320
#if !defined(MBED_BOOT_STACK_SIZE)
4-
#define MBED_BOOT_STACK_SIZE 0x400
21+
#define MBED_BOOT_STACK_SIZE 0x400
522
#endif
623

724
#define Stack_Size MBED_BOOT_STACK_SIZE
825

9-
; *************************************************************
10-
; *** Scatter-Loading Description File generated by uVision ***
11-
; *************************************************************
26+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
27+
28+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
1229

13-
LR_IROM1 0x00000000 0x00020000 { ; load region size_region
14-
ER_IROM1 0x00000000 0x00020000 { ; load address = execution address
1530
*.o (RESET, +First)
1631
*(InRoot$$Sections)
1732
.ANY (+RO)
1833
}
19-
RW_IRAM1 0x20000000 0x00004000 { ; RW data
34+
RW_IRAM1 MBED_RAM_START MBED_RAM_SIZE { ; RW data
2035
.ANY (+RW +ZI)
2136
}
22-
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x00004000 - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
37+
38+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE-Stack_Size-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
2339
}
24-
ARM_LIB_STACK (0x20000000+0x00004000) EMPTY -Stack_Size { ; stack
40+
41+
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack
2542
}
2643
}
27-

targets/TARGET_WIZNET/TARGET_W7500x/TARGET_WIZwiki_W7500P/device/TOOLCHAIN_ARM_MICRO/W7500.sct

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
11
#! armcc -E
22

3+
#if !defined(MBED_APP_START)
4+
#define MBED_APP_START 0x00000000
5+
#endif
6+
7+
#if !defined(MBED_APP_SIZE)
8+
#define MBED_APP_SIZE 0x00020000
9+
#endif
10+
11+
#if !defined(MBED_RAM_START)
12+
#define MBED_RAM_START 0x20000000
13+
#endif
14+
15+
#if !defined(MBED_RAM_SIZE)
16+
#define MBED_RAM_SIZE 0x00004000
17+
#endif
18+
19+
320
#if !defined(MBED_BOOT_STACK_SIZE)
4-
#define MBED_BOOT_STACK_SIZE 0x400
21+
#define MBED_BOOT_STACK_SIZE 0x400
522
#endif
623

724
#define Stack_Size MBED_BOOT_STACK_SIZE
825

9-
; *************************************************************
10-
; *** Scatter-Loading Description File generated by uVision ***
11-
; *************************************************************
26+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
27+
28+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
1229

13-
LR_IROM1 0x00000000 0x00020000 { ; load region size_region
14-
ER_IROM1 0x00000000 0x00020000 { ; load address = execution address
1530
*.o (RESET, +First)
1631
*(InRoot$$Sections)
1732
.ANY (+RO)
1833
}
19-
RW_IRAM1 0x20000000 0x00004000 { ; RW data
34+
RW_IRAM1 MBED_RAM_START MBED_RAM_SIZE { ; RW data
2035
.ANY (+RW +ZI)
2136
}
22-
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x00004000 - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
37+
38+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE-Stack_Size-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
2339
}
24-
ARM_LIB_STACK (0x20000000+0x00004000) EMPTY -Stack_Size { ; stack
40+
41+
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack
2542
}
2643
}
27-

0 commit comments

Comments
 (0)