fix: compilation with -mthumb flag for certain files
This commit is contained in:
parent
5ac8e9a2a5
commit
8ae50ef8f4
@ -21,8 +21,8 @@ $(BINDIR)$(ARCH): $(OBJ)
|
|||||||
|
|
||||||
# compile and generate dependency info
|
# compile and generate dependency info
|
||||||
$(BINDIR)%.o: %.c
|
$(BINDIR)%.o: %.c
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
|
$(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
|
$(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
|
||||||
@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
|
@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
|
||||||
|
|
||||||
# remove compilation products
|
# remove compilation products
|
||||||
|
|||||||
@ -6,13 +6,11 @@ export PREFIX = @arm-none-eabi-
|
|||||||
export CC = @$(PREFIX)gcc
|
export CC = @$(PREFIX)gcc
|
||||||
export AR = @$(PREFIX)ar
|
export AR = @$(PREFIX)ar
|
||||||
export CFLAGS = -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
|
export CFLAGS = -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
|
||||||
|
|
||||||
export CFLAGS_BASIC = -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
|
|
||||||
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
|
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
|
||||||
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \
|
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \
|
||||||
-nodefaultlibs -Wcast-align -Wall -Wstrict-prototypes -Wextra \
|
-nodefaultlibs -Wcast-align -Wall -Wstrict-prototypes -Wextra \
|
||||||
-Os -pipe
|
-Os -pipe
|
||||||
export CFLAGS += $(CFLAGS_BASIC) -mthumb
|
export CFLAGS_MTHUMB ?= -mthumb
|
||||||
$(warning TODO add -mthumb)
|
$(warning TODO add -mthumb)
|
||||||
export AFLAGS = -Wa,-gstabs $(CFLAGS)
|
export AFLAGS = -Wa,-gstabs $(CFLAGS)
|
||||||
export AS = $(PREFIX)as
|
export AS = $(PREFIX)as
|
||||||
|
|||||||
@ -15,8 +15,8 @@ $(BINDIR)redbee-econotag_common_drivers.a: $(OBJ)
|
|||||||
|
|
||||||
# compile and generate dependency info
|
# compile and generate dependency info
|
||||||
$(BINDIR)%.o: %.c
|
$(BINDIR)%.o: %.c
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
|
$(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
|
$(CC) $(CFLAGS) $(CFLAGS_MTHUMB) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
|
||||||
@printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
|
@printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
|
||||||
|
|
||||||
# remove compilation products
|
# remove compilation products
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user