diff --git a/src/Makefile b/src/Makefile index d9ca5bb09..2a2b1ea2e 100755 --- a/src/Makefile +++ b/src/Makefile @@ -14,20 +14,22 @@ BUILD_DIR=build # Debugging/Optimization ifeq ($(DEBUG), 1) -CFLAGS = -O0 -ggdb +CFLAGS = -O0 -g -DPENDSV_DEBUG else -CFLAGS = -O2 -ggdb +CFLAGS = -O2 -g endif # Compiler Flags -CFLAGS += -Wall -mlittle-endian -mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4 -CFLAGS += -fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16 -mfloat-abi=hard +CFLAGS += -Wall -mlittle-endian -mthumb -nostartfiles -mcpu=cortex-m4 -mabi=aapcs-linux +CFLAGS += -fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fshort-enums CFLAGS += -I. -I../include/CMSIS -I../include/StdPeriph -I../include/USB_OTG -I../include/FatFS -I../include/MicroPython\ -I../include/MicroPython/py -I./py -DSTM32F40_41xxx -DUSE_USB_OTG_FS -DARM_MATH_CM4 -D__FPU_PRESENT -std=gnu99 -DOSC=12 # Linker Flags -LDFLAGS = -mcpu=cortex-m4 -mthumb -mcpu=cortex-m4 -mthumb -mthumb-interwork -mlittle-endian -mfloat-abi=hard -mfpu=fpv4-sp-d16 -LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map -Tstm32f4xx.ld -L. -L../lib +LDFLAGS = -mcpu=cortex-m4 -mabi=aapcs-linux -mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv4-sp-d16 +#LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map -Tstm32f4xx.ld -L. -L../lib +LDFLAGS += -Tstm32f4xx.ld -L. -L../lib + # Sources SRCS = $(wildcard *.c) $(wildcard py/*.c)