aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/libc/picolibc.in40
-rw-r--r--scripts/build/companion_libs/340-picolibc.sh4
2 files changed, 44 insertions, 0 deletions
diff --git a/config/libc/picolibc.in b/config/libc/picolibc.in
index cd6da1ed..6c4c6cac 100644
--- a/config/libc/picolibc.in
+++ b/config/libc/picolibc.in
@@ -123,3 +123,43 @@ config LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY
default ""
help
Extra flags to pass to meson when configuring picolibc.
+
+config LIBC_PICOLIBC_DEFAULT_FLASH_ADDR
+ string
+ prompt "Default flash address for picolibc.ld"
+ default "0x10000000"
+ help
+ Sets the default base adddress for the read-only portion of the
+ application when linked using the default picolibc link
+ script. Can be overridden on the linker command line using
+ -Wl,--defsym=__flash=<value>
+
+config LIBC_PICOLIBC_DEFAULT_FLASH_SIZE
+ string
+ prompt "Default flash size for picolibc.ld"
+ default "0x00010000"
+ help
+ Sets the default size for the read-only portion of the
+ application when linked using the default picolibc link script.
+ Can be overridden on the linker command line using
+ -Wl,--defsym=__flash_size=<value>
+
+config LIBC_PICOLIBC_DEFAULT_RAM_ADDR
+ string
+ prompt "Default ram address for picolibc.ld"
+ default "0x20000000"
+ help
+ Sets the default base adddress for the read-write portion of the
+ application when linked using the default picolibc link
+ script. Can be overridden on the linker command line using
+ -Wl,--defsym=__ram=<value>
+
+config LIBC_PICOLIBC_DEFAULT_RAM_SIZE
+ string
+ prompt "Default ram size for picolibc.ld"
+ default "0x00008000"
+ help
+ Sets the default size for the read-write portion of the
+ application when linked using the default picolibc link script.
+ Can be overridden on the linker command line using
+ -Wl,--defsym=__ram_size=<value>
diff --git a/scripts/build/companion_libs/340-picolibc.sh b/scripts/build/companion_libs/340-picolibc.sh
index 929babf0..0b2038e6 100644
--- a/scripts/build/companion_libs/340-picolibc.sh
+++ b/scripts/build/companion_libs/340-picolibc.sh
@@ -82,6 +82,10 @@ endian = '${CT_ARCH_ENDIAN}'
c_args = [ ${meson_cflags} '-nostdlib', '-fno-common', '-ftls-model=local-exec' ]
needs_exe_wrapper = true
skip_sanity_check = true
+default_flash_addr = '${CT_LIBC_PICOLIBC_DEFAULT_FLASH_ADDR}'
+default_flash_size = '${CT_LIBC_PICOLIBC_DEFAULT_FLASH_SIZE}'
+default_ram_addr = '${CT_LIBC_PICOLIBC_DEFAULT_RAM_ADDR}'
+default_ram_size = '${CT_LIBC_PICOLIBC_DEFAULT_RAM_SIZE}'
EOF
local picolibc_sysroot_dir