Moved the BL_APP_VECTOR_TABLE_ADDRESS define into Makedefs.mk
This commit is contained in:
@@ -22,16 +22,10 @@ PART = MK22FN512VLH12
|
|||||||
# Defines the linker script to use for the application.
|
# Defines the linker script to use for the application.
|
||||||
LDSCRIPT = link/MK22FN512xxx12_flash.ld
|
LDSCRIPT = link/MK22FN512xxx12_flash.ld
|
||||||
|
|
||||||
# Address of the app vector table. The bootloader will take up the flash before this address.
|
|
||||||
BL_APP_VECTOR_TABLE_ADDRESS = 0xc000
|
|
||||||
|
|
||||||
# Size of the heap and stack.
|
# Size of the heap and stack.
|
||||||
HEAP_SIZE = 0x2000
|
HEAP_SIZE = 0x2000
|
||||||
STACK_SIZE = 0x0400
|
STACK_SIZE = 0x0400
|
||||||
|
|
||||||
# Preprocessor directives.
|
|
||||||
BUILD_FLAGS = -DCPU_$(PART)_cm4 -DBL_APP_VECTOR_TABLE_ADDRESS=$(BL_APP_VECTOR_TABLE_ADDRESS) -DUSB_STACK_BM -DBL_HAS_BOOTLOADER_CONFIG=1
|
|
||||||
|
|
||||||
# Set the compiler CPU and FPU options.
|
# Set the compiler CPU and FPU options.
|
||||||
CPU = -mcpu=cortex-m4
|
CPU = -mcpu=cortex-m4
|
||||||
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
@@ -39,6 +33,12 @@ FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
|||||||
# Command for flashing the right half of the keyboard.
|
# Command for flashing the right half of the keyboard.
|
||||||
FLASH_CMD = node ../lib/agent/packages/usb/update-device-firmware.js $(PROJECT_OBJ:.axf=.hex)
|
FLASH_CMD = node ../lib/agent/packages/usb/update-device-firmware.js $(PROJECT_OBJ:.axf=.hex)
|
||||||
|
|
||||||
|
# Preprocessor directives.
|
||||||
|
BUILD_FLAGS = -DCPU_$(PART)_cm4 -DUSB_STACK_BM -DBL_HAS_BOOTLOADER_CONFIG=1
|
||||||
|
|
||||||
|
# Address of the app vector table. The bootloader will take up the flash before this address.
|
||||||
|
BL_APP_VECTOR_TABLE_ADDRESS = 0xc000
|
||||||
|
|
||||||
# Source files.
|
# Source files.
|
||||||
SOURCE = $(wildcard src/*.c) \
|
SOURCE = $(wildcard src/*.c) \
|
||||||
$(wildcard src/*/*.c) \
|
$(wildcard src/*/*.c) \
|
||||||
|
|||||||
@@ -19,8 +19,11 @@ SEMIHOSTING ?= 0
|
|||||||
# Build directory.
|
# Build directory.
|
||||||
BUILD_DIR ?= build_make
|
BUILD_DIR ?= build_make
|
||||||
|
|
||||||
# Preprocessor directives.
|
# Set default value (no bootloader) for the bootloader vector table address.
|
||||||
BUILD_FLAGS += -D__NEWLIB__ -D__USE_CMSIS -D__MCUXPRESSO -DCPU_$(PART) -D__STARTUP_CLEAR_BSS
|
BL_APP_VECTOR_TABLE_ADDRESS ?= 0
|
||||||
|
|
||||||
|
# Preprocessor directives.
|
||||||
|
BUILD_FLAGS += -D__NEWLIB__ -D__USE_CMSIS -D__MCUXPRESSO -DCPU_$(PART) -D__STARTUP_CLEAR_BSS -DBL_APP_VECTOR_TABLE_ADDRESS=$(BL_APP_VECTOR_TABLE_ADDRESS)
|
||||||
|
|
||||||
# Path to project object file.
|
# Path to project object file.
|
||||||
PROJECT_OBJ = $(BUILD_DIR)/$(PROJECT_NAME).axf
|
PROJECT_OBJ = $(BUILD_DIR)/$(PROJECT_NAME).axf
|
||||||
@@ -86,9 +89,6 @@ ifdef TRAVIS
|
|||||||
CFLAGS += -Werror
|
CFLAGS += -Werror
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set default value for the bootloader vector table address.
|
|
||||||
BL_APP_VECTOR_TABLE_ADDRESS ?= 0
|
|
||||||
|
|
||||||
# The flags passed to the linker.
|
# The flags passed to the linker.
|
||||||
LDFLAGS = --specs=nano.specs -mthumb $(CPU) $(FPU) -T $(LDSCRIPT) -Wl,-Map=$(PROJECT_OBJ:.axf=.map),--gc-sections,-print-memory-usage,-no-wchar-size-warning,--defsym=__heap_size__=$(HEAP_SIZE),--defsym=__stack_size__=$(STACK_SIZE),--defsym=__bl_app_vector_table_address__=$(BL_APP_VECTOR_TABLE_ADDRESS)
|
LDFLAGS = --specs=nano.specs -mthumb $(CPU) $(FPU) -T $(LDSCRIPT) -Wl,-Map=$(PROJECT_OBJ:.axf=.map),--gc-sections,-print-memory-usage,-no-wchar-size-warning,--defsym=__heap_size__=$(HEAP_SIZE),--defsym=__stack_size__=$(STACK_SIZE),--defsym=__bl_app_vector_table_address__=$(BL_APP_VECTOR_TABLE_ADDRESS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user