CM3: add -mthumb to the linker option.
[bertos.git] / examples / lm3s1968 / lm3s1968.mk
index db952703b21b1d1308c8fc01805f411078a83199..eff79bfe4e385ac1acf2e82911fecc109d6b0dc7 100644 (file)
@@ -44,9 +44,9 @@ lm3s1968_CPPASRC = \
 # This is an hosted application
 lm3s1968_PREFIX = arm-none-eabi-
 
-lm3s1968_CPPAFLAGS = -g -gdwarf-2 -mthumb -fno-strict-aliasing -fwrapv
-lm3s1968_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_LM3S1968__ -D'CPU_FREQ=(50000000L)' -D'WIZ_AUTOGEN' -g3 -gdwarf-2 -fverbose-asm -mthumb -Iexamples/lm3s1968 -Ibertos/cpu/cortex-m3 -fno-strict-aliasing -fwrapv
-lm3s1968_LDFLAGS = -nostartfiles -T bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld -Wl,--no-warn-mismatch -fno-strict-aliasing -fwrapv
+lm3s1968_CPPAFLAGS = -g -gdwarf-2 -mthumb -mno-thumb-interwork -falign-functions=16 -fno-strict-aliasing -fwrapv
+lm3s1968_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_LM3S1968__ -D'CPU_FREQ=(50000000L)' -D'WIZ_AUTOGEN' -g3 -gdwarf-2 -fverbose-asm -mthumb -mno-thumb-interwork -falign-functions=16 -Iexamples/lm3s1968 -Ibertos/cpu/cortex-m3 -fno-strict-aliasing -fwrapv
+lm3s1968_LDFLAGS = -nostartfiles -T bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld -Wl,--no-warn-mismatch -fno-strict-aliasing -fwrapv -mthumb -mno-thumb-interwork -falign-functions=16
 
 lm3s1968_CPU = cortex-m3
 
@@ -59,6 +59,6 @@ lm3s1968_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
 
 # Debug stuff
 ifeq ($(lm3s1968_DEBUG),0)
-       demo_CFLAGS += -O1 -fomit-frame-pointer
-       demo_CXXFLAGS += -O1 -fomit-frame-pointer
+       demo_CFLAGS += -Os -fomit-frame-pointer
+       demo_CXXFLAGS += -Os -fomit-frame-pointer
 endif