diff --git a/2-loop/Makefile b/2-loop/Makefile index 40a1115..58729fa 100644 --- a/2-loop/Makefile +++ b/2-loop/Makefile @@ -8,7 +8,7 @@ loop.elf: loop.ld loop.o arm-none-eabi-ld -T loop.ld -o loop.elf loop.o loop.o: loop.s - arm-none-eabi-as -o loop.o loop.s + arm-none-eabi-as -mcpu=cortex-m3 -mthumb -mthumb-interwork -o loop.o loop.s clean: rm -f loop.o loop.elf loop.bin diff --git a/2-loop/loop.ld b/2-loop/loop.ld index 4771d38..a32ef06 100644 --- a/2-loop/loop.ld +++ b/2-loop/loop.ld @@ -3,6 +3,6 @@ SECTIONS { LONG(0x20000000 + 20K); LONG(reset_exception_handler | 1); . = 0x130; - loop.o(code) + loop.o(.text) } } diff --git a/2-loop/loop.s b/2-loop/loop.s index ad5767e..8bde65f 100644 --- a/2-loop/loop.s +++ b/2-loop/loop.s @@ -2,10 +2,12 @@ .syntax unified .thumb + .global reset_exception_handler -.section code +.text +.thumb_func reset_exception_handler: add r0, r0, 1 bl reset_exception_handler