| 1 |
#! armcc -E |
| 2 |
; code upper need to use #define |
| 3 |
|
| 4 |
;------------------------------------------------------------------------------------- |
| 5 |
; Keil scatter loading file |
| 6 |
; For LPC1768 |
| 7 |
;------------------------------------------------------------------------------------- |
| 8 |
|
| 9 |
#define FLASH_START (0x00000000) |
| 10 |
#define FLASH_END (0x00080000) |
| 11 |
#define FLASH_SIZE (FLASH_END-FLASH_START) |
| 12 |
|
| 13 |
; Internal SRAM |
| 14 |
#define RAM1_START 0x10000000 |
| 15 |
#define RAM1_END 0x10008000 |
| 16 |
#define RAM1_SIZE (RAM1_END-RAM1_START) |
| 17 |
|
| 18 |
; Internal SRAM for peripherial DMA |
| 19 |
#define RAM2_START 0x2007C000 |
| 20 |
#define RAM2_END 0x20084000 |
| 21 |
#define RAM2_SIZE (RAM2_END-RAM2_START) |
| 22 |
|
| 23 |
; Load region for main program |
| 24 |
LR1 FLASH_START FLASH_SIZE { |
| 25 |
ER1 FLASH_START { |
| 26 |
*.o(RESET, +First) |
| 27 |
*.o(InRoot$$Sections) |
| 28 |
*.o(+RO) |
| 29 |
} |
| 30 |
ER2 RAM1_START RAM1_SIZE { |
| 31 |
*.o(+RW +ZI) |
| 32 |
} |
| 33 |
ER3 RAM2_START RAM2_SIZE { |
| 34 |
*.o(HEAP) |
| 35 |
*.o(STACK) |
| 36 |
} |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
/*----------------------------------------------------------------------------*/ |
| 42 |
|