efm32 example: enhanced makefiles

This commit is contained in:
chrysn 2012-02-27 16:07:24 +01:00
parent f52b1a56b0
commit 09523e854d
2 changed files with 4 additions and 5 deletions

View File

@ -30,7 +30,8 @@ GDB = $(PREFIX)-gdb
#TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX) #TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../../.. TOOLCHAIN_DIR = ../../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD\
-D$(FAMILY)
LDSCRIPT ?= ${TOOLCHAIN_DIR}/lib/efm32/tinygecko/$(MCU).ld LDSCRIPT ?= ${TOOLCHAIN_DIR}/lib/efm32/tinygecko/$(MCU).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib/efm32/tinygecko \ LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib/efm32/tinygecko \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \

View File

@ -18,8 +18,6 @@
## ##
MCU = EFM32TG840F32 MCU = EFM32TG840F32
FAMILY = TINYGECKO
# Linker scripts are always relative to the current directory. This file is include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.include
# intended for inclusion from example subdirectories, so the Makefile.include
# meant here would be called ../Makefile.include relative to here.
include ../../Makefile.include