Skip to content

Commit

Permalink
nrf/Makefile: Add _fs_size linker script override from make.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
glennrub authored and dpgeorge committed Aug 8, 2021
1 parent c9b72ba commit 0bde907
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/nrf/Makefile
Expand Up @@ -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+
Expand Down

0 comments on commit 0bde907

Please sign in to comment.