TARGET_DIR = apps/$(MODULE)/$(NAME)
-LPC = lpc82x
+LPC ?= lpc824
CPU = cortex-m0
ARCH = armv6-m
--- /dev/null
+/*
+ * C linker script file for LPC822
+ */
+
+MEMORY
+{
+ sram (rwx) : ORIGIN = 0x10000000, LENGTH = 4k
+ flash (rx) : ORIGIN = 0x00000000, LENGTH = 16k
+}
+
+_sram_size = LENGTH(sram);
+_sram_base = ORIGIN(sram);
+_end_stack = (_sram_base + _sram_size);
+
+ENTRY(Reset_Handler)
+
+SECTIONS {
+ . = ORIGIN(flash);
+
+ .text :
+ {
+ FILL(0xFF);
+ KEEP(*(.vectors))
+ *(.text.Reset_Handler .text.SystemInit)
+ . = 0x000002FC;
+ KEEP(*(.crp))
+ . = 0x00000300;
+ *(.text*)
+ *(.rodata*)
+ *(.got*)
+ . = ALIGN(4);
+ _end_text = .;
+ } >flash
+
+ . = ALIGN(4);
+
+ .data :
+ {
+ _start_data = .;
+ *(.data*)
+ _end_data = .;
+ } >sram AT >flash
+
+ . = ALIGN(4);
+
+ .bss :
+ {
+ _start_bss = .;
+ *(.bss*)
+ *(COMMON)
+ _end_bss = .;
+ } >sram
+
+ . = ALIGN(4);
+
+}
+
+_end = .;
+PROVIDE(end = .);
--- /dev/null
+/*
+ * C linker script file for LPC824
+ */
+
+MEMORY
+{
+ sram (rwx) : ORIGIN = 0x10000000, LENGTH = 8k
+ flash (rx) : ORIGIN = 0x00000000, LENGTH = 32k
+}
+
+_sram_size = LENGTH(sram);
+_sram_base = ORIGIN(sram);
+_end_stack = (_sram_base + _sram_size);
+
+ENTRY(Reset_Handler)
+
+SECTIONS {
+ . = ORIGIN(flash);
+
+ .text :
+ {
+ FILL(0xFF);
+ KEEP(*(.vectors))
+ *(.text.Reset_Handler .text.SystemInit)
+ . = 0x000002FC;
+ KEEP(*(.crp))
+ . = 0x00000300;
+ *(.text*)
+ *(.rodata*)
+ *(.got*)
+ . = ALIGN(4);
+ _end_text = .;
+ } >flash
+
+ . = ALIGN(4);
+
+ .data :
+ {
+ _start_data = .;
+ *(.data*)
+ _end_data = .;
+ } >sram AT >flash
+
+ . = ALIGN(4);
+
+ .bss :
+ {
+ _start_bss = .;
+ *(.bss*)
+ *(COMMON)
+ _end_bss = .;
+ } >sram
+
+ . = ALIGN(4);
+
+}
+
+_end = .;
+PROVIDE(end = .);