From 02f73632ad86df81c317d60acc196a4429d5caa1 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Fri, 5 Aug 2011 16:13:14 +0200 Subject: [PATCH] Who in their STUPID mind decided that the CRP flag is INSIDE your CODE SPACE? ARGH ARGH ARGH! --- firmware/lpc1xxx/linkscript.ld | 4 ++++ firmware/main.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/firmware/lpc1xxx/linkscript.ld b/firmware/lpc1xxx/linkscript.ld index f8c8086..047b008 100644 --- a/firmware/lpc1xxx/linkscript.ld +++ b/firmware/lpc1xxx/linkscript.ld @@ -37,6 +37,10 @@ SECTIONS { KEEP(*(.irq_vectors)) KEEP(*(table)) + *(.text.boot_entry) + *(.text.main) +. = 0x000002FC ; /* or 1FC for LPC2000 */ + KEEP(*(crp)) *(.text*) *(.rodata*) } > flash diff --git a/firmware/main.c b/firmware/main.c index e24f7db..ba7fc40 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -7,6 +7,8 @@ #include "lcd/render.h" #include "filesystem/ff.h" +__attribute__ ((used, section("crp"))) const uint32_t the_crp=0x87654321; + /**************************************************************************/ void wrapper(void);