From d1e1e8c0c102353e13c12535879424ef4ad944ff Mon Sep 17 00:00:00 2001 From: Chris <52449218+shadow578@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:25:04 +0000 Subject: [PATCH] update linker script parameter docs --- docs/config_options/LINKER_SCRIPT.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/config_options/LINKER_SCRIPT.md b/docs/config_options/LINKER_SCRIPT.md index a73f8bc..f36e5a3 100644 --- a/docs/config_options/LINKER_SCRIPT.md +++ b/docs/config_options/LINKER_SCRIPT.md @@ -1,17 +1,16 @@ # Linker Script Configuration -the linker script can be configured in the platformio environment using options in `board_build`. -options are **directly** passed to the linker script using the `--defsym` option. +the linker script can be configured in the platformio environment using options in `board_build` and `board_upload`. -| option | description | default value | -| ------------- | ------------------------------------- | ------------- | -| `flash_start` | the start address of the flash memory | `0x0` | -| `flash_size` | the size of the flash memory | `256K` | -| `boot_mode` | firmware boot mode | `primary` | -| `preprocess` | enable linker script preprocessing | `true` | +| option | description | default value | +| ----------------------- | ------------------------------------- | ------------- | +| `upload.offset_address` | the start address of the flash memory | `0x0` | +| `upload.maximum_size` | the size of the flash memory | `262144` | +| `build.boot_mode` | firmware boot mode | `primary` | +| `build.ld_preprocess` | enable linker script preprocessing | `true` | > [!TIP] -> the `flash_size` option describes the **total** size of the flash memory in bytes. +> the `upload.maximum_size` option describes the **total** size of the flash memory in bytes. > do not subtract the bootloader size from the flash size, as this is done automatically by the build script. > [!NOTE] @@ -36,7 +35,7 @@ platformio.ini: [env:my_env] # ... board_upload.offset_address = 0x0000C000 -board_upload.maximum_size = 256K +board_upload.maximum_size = 262144 board_build.boot_mode = primary ```