Skip to content

Commit

Permalink
bl size increase to 36K
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Feb 17, 2024
1 parent 2abc40f commit 3ab5250
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions fw/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ OUTPUT_DIRECTORY := ../_build
SDK_ROOT := $(NRF52_SDK_ROOT)
PROJ_DIR := ./src
BOARD ?= NEO
RELEASE ?= 1

# boards defines
ifeq ($(BOARD),NEO)
Expand Down Expand Up @@ -180,10 +181,14 @@ LIB_FILES += \
$(SDK_ROOT)/external/nrf_oberon/lib/cortex-m4/hard-float/liboberon_3.0.8.a \
$(SDK_ROOT)/external/micro-ecc/nrf52hf_armgcc/armgcc/micro_ecc_lib_nrf52.a \

# Optimization flags
OPT = -Os -g3

ifneq ($(RELEASE), 1)
OPT = -O2 -g3
else
OPT = -Os -g3 -ffunction-sections -fdata-sections
# Uncomment the line below to enable link time optimization
#OPT += -flto
endif

# C flags common to all targets
CFLAGS += $(OPT)
Expand Down Expand Up @@ -213,6 +218,12 @@ CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
CFLAGS += -fno-builtin -fshort-enums
CFLAGS += -DCUSTOM_BOARD_INC=boards_defines
CFLAGS += -DBOARD_$(BOARD)
ifneq ($(RELEASE), 1)
CFLAGS += -DDEBUG
CFLAGS += -DEBUG_NRF
else
CFLAGS += -DNDEBUG
endif

# C++ flags common to all targets
CXXFLAGS += $(OPT)
Expand Down
2 changes: 1 addition & 1 deletion fw/ld/bootloader_nrf52840.ld
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GROUP(-lgcc -lc -lnosys)

MEMORY
{
FLASH (rx) : ORIGIN = 0xf8000, LENGTH = 0x6000
FLASH (rx) : ORIGIN = 0xf5000, LENGTH = 0x9000
RAM (rwx) : ORIGIN = 0x20005978, LENGTH = 0x3a688
uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
Expand Down

0 comments on commit 3ab5250

Please sign in to comment.