organize memory layout options for debug/release

This commit is contained in:
Conor Patrick
2018-12-04 21:12:21 -05:00
parent 173b8833ce
commit 5ee91048e2
12 changed files with 449 additions and 18 deletions

View File

@@ -25,7 +25,9 @@ INC = -Ibootloader/ -Isrc/ -Isrc/cmsis/ -Ilib/ -Ilib/usbd/ -I../../fido2/ -I../.
INC += -I../../tinycbor/src -I../../crypto/sha256 -I../../crypto/micro-ecc
INC += -I../../crypto/tiny-AES-c
LDSCRIPT=bootloader_stm32l4xx.ld
ifndef LDSCRIPT
LDSCRIPT=linker/bootloader_stm32l4xx.ld
endif
CFLAGS= $(INC)
@@ -37,7 +39,11 @@ HW=-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb
# Solo
CHIP=STM32L442xx
DEFINES = -D$(CHIP) -DAES256=1 -DUSE_FULL_LL_DRIVER -DAPP_CONFIG=\"bootloader.h\"
ifndef DEBUG
DEBUG=0
endif
DEFINES = -DDEBUG_LEVEL=$(DEBUG) -D$(CHIP) -DAES256=1 -DUSE_FULL_LL_DRIVER -DAPP_CONFIG=\"bootloader.h\" $(EXTRA_DEFINES)
# DEFINES += -DTEST_SOLO_STM32 -DTEST -DTEST_FIFO=1
CFLAGS=$(INC) -c $(DEFINES) -Wall -fdata-sections -ffunction-sections $(HW) -g