This commit is contained in:
Romain Goyet
2015-05-18 18:39:04 +02:00
parent ca3c2f8a4c
commit 3d086d097c
13 changed files with 91 additions and 25 deletions

View File

@@ -2,30 +2,40 @@ CC=arm-none-eabi-gcc
LD=arm-none-eabi-ld.bfd
GDB=arm-none-eabi-gdb
OBJCOPY=arm-none-eabi-objcopy
CFLAGS = -I. -Iinclude -Iexternal/freertos/include -Iexternal -Iexternal/freertos/portable/GCC/ARM_CM4F -Iexternal/newlib/libc/include
CFLAGS = -Ilib -I. -Iinclude -Iexternal/freertos/include -Iexternal -Iexternal/freertos/portable/GCC/ARM_CM4F -Iexternal/newlib/libc/include
CFLAGS += -DHAVE_CONFIG_H=1 -DPIXMAN_NO_TLS=1 -Wno-unused-const-variable
#CFLAGS += -fshort-double # Use the FPU even for doubles
#CFLAGS = -I. -Iexternal/freertos/include -Iexternal -Iexternal/freertos/portable/GCC/ARM_CM4F -Iexternal/newlib/libc/include -Iinclude
#-I/Users/romain/local/arm-none-eabi/include
CFLAGS += -std=c99 -g -Wall
CFLAGS += -std=c99 -Wall
#CFLAGS += -march=armv7e-m -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16
CC=clang
CFLAGS += -target thumbv7em-unknown-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -ffreestanding
CXX=clang++
CXXFLAGS=-target thumbv7em-unknown-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -ffreestanding
CXXFLAGS += -fno-exceptions -fno-unwind-tables -fno-rtti -nostdlib
# Production
CFLAGS += -g
#CFLAGS += -Os -fdata-sections -ffunction-sections
#LDFLAGS += --gc-sections
objs := platform/stm32f429/boot/crt0.o
products := boot.elf boot.hex boot.bin
objs += external/freertos/tasks.o external/freertos/list.o external/freertos/queue.o external/freertos/portable/GCC/ARM_CM4F/port.o external/freertos/portable/MemMang/heap_1.o
objs += external/newlib/libc/string/memset.o external/newlib/libc/string/memcpy.o
objs += platform/stm32f429/boot/isr.o
#platform/stm32f429/registers/gpio.o platform/stm32f429/registers/rcc.o platform/stm32f429/registers/spi.o platform/stm32f429/registers/ltdc.o
objs += lib/assert.o
objs += math/expression.o
objs += platform/stm32f429/init.o platform/stm32f429/init_lcd.o
objs += platform/ili9341/ili9341.o
default: clean boot.elf
include platform/Makefile
include kandinsky/Makefile
run: boot.elf
$(GDB) -x gdb_script.gdb boot.elf
@@ -51,6 +61,10 @@ boot.elf: $(objs)
@echo "CC $@"
@$(CC) $(CFLAGS) -c $< -o $@
%.o: %.cpp
@echo "CXX $@"
@$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
@echo "CLEAN"
@rm -f $(objs) boot.elf boot.bin boot.hex
@rm -f $(objs) $(products)