#define PAUSE asm volatile ("wfi" ::: "memory")
#define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */
- /*
- * FIXME: builtin GCC memset() can be buggy! We need to redefine it
- * here for this architecture. :(
- */
- #include <cfg/compiler.h>
- #define memset __cm3_memset
- INLINE void *__cm3_memset(void *s, int c, size_t n)
- {
- uint8_t *p = (uint8_t *)s;
-
- while (n--)
- *p++ = c;
- return s;
- }
-
#elif CPU_PPC
#define CPU_REG_BITS (CPU_PPC32 ? 32 : 64)
# 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
# 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