aboutsummaryrefslogtreecommitdiff
path: root/example-fsm-55
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2015-07-13 16:45:32 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2015-07-13 16:45:32 +0900
commit3ba8234cecde90467fb75d72055fa0c226ed16df (patch)
treef6c184a72d8759a59b3b4db109fe1bfaab6d8032 /example-fsm-55
parent2bb0e0de5d7d25d0bb036e6ee9cc0c94b62375ec (diff)
sys_board and stm32 primer2
Diffstat (limited to 'example-fsm-55')
-rw-r--r--example-fsm-55/hacker-emblem.ld5
-rw-r--r--example-fsm-55/sys.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/example-fsm-55/hacker-emblem.ld b/example-fsm-55/hacker-emblem.ld
index bce4e00..7974b10 100644
--- a/example-fsm-55/hacker-emblem.ld
+++ b/example-fsm-55/hacker-emblem.ld
@@ -29,12 +29,13 @@ SECTIONS
{
. = 0;
- .sys : ALIGN(16) SUBALIGN(16)
+ .sys : ALIGN(16) SUBALIGN(8)
{
_sys = .;
KEEP(*(.vectors))
. = ALIGN(16);
- *(.sys.version)
+ KEEP(*(.sys.version))
+ KEEP(*(.sys.board))
build/sys.o(.text)
build/sys.o(.text.*)
build/sys.o(.rodata)
diff --git a/example-fsm-55/sys.c b/example-fsm-55/sys.c
index cd367d8..06af0c6 100644
--- a/example-fsm-55/sys.c
+++ b/example-fsm-55/sys.c
@@ -364,10 +364,10 @@ static void __attribute__ ((naked))
reset (void)
{
/*
- * This code may not be at start of flash ROM, because of DFU.
+ * This code may not be at the start of flash ROM, because of DFU.
* So, we take the address from PC.
*/
-#if __ARM_ARCH_6M__
+#if defined(__ARM_ARCH_6M__)
asm volatile ("cpsid i\n\t" /* Mask all interrupts. */
"ldr r0, 1f\n\t" /* r0 = RAM start */
"mov r1, pc\n\t" /* r1 = (PC + 0x0400) & ~0x03ff */