lm4f: Compile with FPU support

Specify the -mfloat-abi=hard and -mfpu=fpv4-sp-d16 flags so that FPU
is enabled by default.
While this compiles with FPU support, in order to use the floating point types,
the FPU must be explicitly enabled at runtime.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Alexandru Gagniuc 2012-11-28 17:13:27 -06:00
parent c08bd17d90
commit c1381bf54a
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ $(info We seem to be building the example in the source directory. Using local l
endif
endif
ARCH_FLAGS = -mthumb -mcpu=cortex-m4
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common $(ARCH_FLAGS) -MD -DLM4F
LDSCRIPT ?= $(BINARY).ld

View File

@ -24,7 +24,7 @@ PREFIX ?= arm-none-eabi
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \
-mcpu=cortex-m4 -mthumb -Wstrict-prototypes \
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -Wstrict-prototypes \
-ffunction-sections -fdata-sections -MD -DLM4F
# ARFLAGS = rcsv
ARFLAGS = rcs