nrf/Makefile: Add _fs_size linker script override from make.

Add posibility to override linker script "_fs_size" from make by adding the
FS_SIZE parameter.  The syntax of value is linker script syntax.  For
example, the value of 131072 bytes can be written as 128K like this:
FS_SIZE=128K.

If not set, default value for "_fs_size" from linker script will be used.
This commit is contained in:
Glenn Ruben Bakke 2020-07-23 20:57:29 +02:00 committed by Damien George
parent c9b72ba694
commit 0bde907a8b

View File

@ -130,6 +130,10 @@ LDFLAGS = $(CFLAGS)
LDFLAGS += -Xlinker -Map=$(@:.elf=.map)
LDFLAGS += -mthumb -mabi=aapcs $(addprefix -T,$(LD_FILES)) -L boards/
ifneq ($(FS_SIZE),)
LDFLAGS += -Wl,'--defsym=_fs_size=$(FS_SIZE)'
endif
#Debugging/Optimization
ifeq ($(DEBUG), 1)
#ASMFLAGS += -g -gtabs+