diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2020-07-23 20:57:29 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-08-08 23:09:26 +1000 |
| commit | 0bde907a8b010e0b7a6436f3840f7350455bcd01 (patch) | |
| tree | 5beeee051bf26e63a083afaa6bb7f18a3c58c2c9 | |
| parent | c9b72ba69418eb91595698182022f64c24d64556 (diff) | |
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.
| -rw-r--r-- | ports/nrf/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index ad099e110..fb7eb5c59 100644 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -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+ |
