🐛 fixed passing of USER_FLAGS variable for making bootloader

fixed bug that prevented the USER_FLAGS variable from being forwarded to the core makefile so it DISCARDED any bootloader customization options
This commit is contained in:
stnolting 2022-05-20 16:55:13 +02:00
parent ca4ff51e9f
commit 5cf8e5d3b8
2 changed files with 3 additions and 10 deletions

View file

@ -37,11 +37,4 @@
# Modify this variable to fit your NEORV32 setup (neorv32 home folder)
NEORV32_HOME ?= ../..
# Set ISA to minimal rv32i to allow bootloader to run on any processor ISA configuration
MARCH=rv32i
# Enable link-time-optimization and add debug symbols
USER_FLAGS="-flto"
USER_FLAGS+="-g"
include $(NEORV32_HOME)/sw/common/common.mk

View file

@ -146,9 +146,9 @@ all: $(APP_ASM) $(APP_EXE) $(APP_IMG) $(APP_HEX) install
# Check if making bootloader
# Use different base address and length for instruction memory/"rom" (BOOTROM instead of IMEM)
# Also define "make_bootloader" symbol for crt0.S
target bootloader: CC_OPTS += -Wl,--defsym=make_bootloader=1 -Dmake_bootloader
target bl_image: CC_OPTS += -Wl,--defsym=make_bootloader=1 -Dmake_bootloader
# Also define "make_bootloader" symbol for crt0.S, add debug symbols and use link-time optimization
target bootloader: CC_OPTS += -Wl,--defsym=make_bootloader=1 -Dmake_bootloader -g -flto
target bl_image: CC_OPTS += -Wl,--defsym=make_bootloader=1 -Dmake_bootloader -g -flto
# -----------------------------------------------------------------------------