From 326c945b55d6dd1cf153c6ca8715685a968b1384 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Wed, 21 Nov 2012 20:39:36 -0600 Subject: lm4f: Add lm4f support files copied from lm3s Create lm4f code infrastructure from the lm3s infrastructure. As far as the interrupt table is concerned, don't create an irq.yaml. Just include the LM3S nvic.h. The LM3S vector table seems to be compatible with the LM4F Signed-off-by: Alexandru Gagniuc --- lib/lm4f/Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lib/lm4f/Makefile (limited to 'lib/lm4f/Makefile') diff --git a/lib/lm4f/Makefile b/lib/lm4f/Makefile new file mode 100644 index 0000000..c4c2aa7 --- /dev/null +++ b/lib/lm4f/Makefile @@ -0,0 +1,35 @@ +## +## This file is part of the libopencm3 project. +## +## Copyright (C) 2009 Uwe Hermann +## +## This library is free software: you can redistribute it and/or modify +## it under the terms of the GNU Lesser General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public License +## along with this library. If not, see . +## + +LIBNAME = libopencm3_lm4f + +PREFIX ?= arm-none-eabi +#PREFIX ?= arm-elf +CC = $(PREFIX)-gcc +AR = $(PREFIX)-ar +CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \ + -mcpu=cortex-m4 -mthumb -Wstrict-prototypes \ + -ffunction-sections -fdata-sections -MD -DLM4F +# ARFLAGS = rcsv +ARFLAGS = rcs +OBJS = gpio.o vector.o assert.o + +VPATH += ../cm3 + +include ../Makefile.include -- cgit v1.2.3 From c1381bf54aac2f092fccf5023c28ff0c4f6f2584 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Wed, 28 Nov 2012 17:13:27 -0600 Subject: 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 --- examples/lm4f/Makefile.include | 2 +- lib/lm4f/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/lm4f/Makefile') diff --git a/examples/lm4f/Makefile.include b/examples/lm4f/Makefile.include index 4d2675c..60987e8 100644 --- a/examples/lm4f/Makefile.include +++ b/examples/lm4f/Makefile.include @@ -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 diff --git a/lib/lm4f/Makefile b/lib/lm4f/Makefile index c4c2aa7..8f4c151 100644 --- a/lib/lm4f/Makefile +++ b/lib/lm4f/Makefile @@ -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 -- cgit v1.2.3