From eda07f725c4efd46a8bc287f293a2a1bb0bf7d5b Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Aug 2026 13:45:02 -0600 Subject: [PATCH 01/10] fix(can-flow-mr): use STM32F412VG and 960K of app flash The part is STM32F412VGH6 (100-pin, 1MB), not the 48-pin 512KB CE. App flash starts at 0x08010000 after the 64K bootloader+params window, so the region is 960K, not 928K. Signed-off-by: Jacob Dahl --- .../ark/can-flow-mr/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/can-flow-mr/nuttx-config/nsh/defconfig | 2 +- .../nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/can-flow-mr/nuttx-config/scripts/script.ld | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/boards/ark/can-flow-mr/nuttx-config/canbootloader/defconfig b/boards/ark/can-flow-mr/nuttx-config/canbootloader/defconfig index 840e4ca8ac5f..cb4e31277c21 100644 --- a/boards/ark/can-flow-mr/nuttx-config/canbootloader/defconfig +++ b/boards/ark/can-flow-mr/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/can-flow-mr/nuttx-config/nsh/defconfig b/boards/ark/can-flow-mr/nuttx-config/nsh/defconfig index cf78d731cc70..f2bda2bbf363 100644 --- a/boards/ark/can-flow-mr/nuttx-config/nsh/defconfig +++ b/boards/ark/can-flow-mr/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld index 48a59fe92d0e..439435cd89da 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld index 77322893e35a..4a4f2a1ad6c5 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 @@ -45,12 +45,13 @@ * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } From a9f773bbf3eacc18bffac946e760b6196fba9323 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Aug 2026 14:02:54 -0600 Subject: [PATCH 02/10] fix(boards): select STM32F412VG on the 100-pin 1MB ARK cannodes Teseo, X20, F9P, and Septentrio/MOSAIC/G5 GPS modules use STM32F412VGH6, same as Flow MR. They were still selecting the 48-pin 512KB CE and a 928K app region that double-counted params. Signed-off-by: Jacob Dahl --- boards/ark/f9p-gps/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/f9p-gps/nuttx-config/nsh/defconfig | 2 +- .../f9p-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/f9p-gps/nuttx-config/scripts/script.ld | 7 ++++--- .../septentrio-gps/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/septentrio-gps/nuttx-config/nsh/defconfig | 2 +- .../nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/septentrio-gps/nuttx-config/scripts/script.ld | 7 ++++--- boards/ark/teseo-gps/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/teseo-gps/nuttx-config/nsh/defconfig | 2 +- .../teseo-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/teseo-gps/nuttx-config/scripts/script.ld | 7 ++++--- boards/ark/x20-gps/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/x20-gps/nuttx-config/nsh/defconfig | 2 +- .../x20-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/x20-gps/nuttx-config/scripts/script.ld | 7 ++++--- platforms/nuttx/CMakeLists.txt | 3 +++ 17 files changed, 31 insertions(+), 24 deletions(-) diff --git a/boards/ark/f9p-gps/nuttx-config/canbootloader/defconfig b/boards/ark/f9p-gps/nuttx-config/canbootloader/defconfig index 5a4fcefcdec3..02930e91a5e6 100644 --- a/boards/ark/f9p-gps/nuttx-config/canbootloader/defconfig +++ b/boards/ark/f9p-gps/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/f9p-gps/nuttx-config/nsh/defconfig b/boards/ark/f9p-gps/nuttx-config/nsh/defconfig index aed760113ce9..5b0965648045 100644 --- a/boards/ark/f9p-gps/nuttx-config/nsh/defconfig +++ b/boards/ark/f9p-gps/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld index 6be5cffcd825..c9192c85cb4f 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld index 77322893e35a..4a4f2a1ad6c5 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 @@ -45,12 +45,13 @@ * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } diff --git a/boards/ark/septentrio-gps/nuttx-config/canbootloader/defconfig b/boards/ark/septentrio-gps/nuttx-config/canbootloader/defconfig index a265f04bc5cc..de5784c3ead7 100644 --- a/boards/ark/septentrio-gps/nuttx-config/canbootloader/defconfig +++ b/boards/ark/septentrio-gps/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/septentrio-gps/nuttx-config/nsh/defconfig b/boards/ark/septentrio-gps/nuttx-config/nsh/defconfig index 638a4b082134..dfb793f5d8fb 100644 --- a/boards/ark/septentrio-gps/nuttx-config/nsh/defconfig +++ b/boards/ark/septentrio-gps/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld index 48a59fe92d0e..439435cd89da 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld index 77322893e35a..4a4f2a1ad6c5 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 @@ -45,12 +45,13 @@ * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } diff --git a/boards/ark/teseo-gps/nuttx-config/canbootloader/defconfig b/boards/ark/teseo-gps/nuttx-config/canbootloader/defconfig index d6cfb24380c7..bd526d13bf34 100644 --- a/boards/ark/teseo-gps/nuttx-config/canbootloader/defconfig +++ b/boards/ark/teseo-gps/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/teseo-gps/nuttx-config/nsh/defconfig b/boards/ark/teseo-gps/nuttx-config/nsh/defconfig index b02b07bb9a83..7eb98be6f618 100644 --- a/boards/ark/teseo-gps/nuttx-config/nsh/defconfig +++ b/boards/ark/teseo-gps/nuttx-config/nsh/defconfig @@ -58,7 +58,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld index 48a59fe92d0e..439435cd89da 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld index 77322893e35a..4a4f2a1ad6c5 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 @@ -45,12 +45,13 @@ * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } diff --git a/boards/ark/x20-gps/nuttx-config/canbootloader/defconfig b/boards/ark/x20-gps/nuttx-config/canbootloader/defconfig index 7c87718686bb..7df280d7b026 100644 --- a/boards/ark/x20-gps/nuttx-config/canbootloader/defconfig +++ b/boards/ark/x20-gps/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/x20-gps/nuttx-config/nsh/defconfig b/boards/ark/x20-gps/nuttx-config/nsh/defconfig index dcff600355ae..5277ca45db57 100644 --- a/boards/ark/x20-gps/nuttx-config/nsh/defconfig +++ b/boards/ark/x20-gps/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld index 6be5cffcd825..c9192c85cb4f 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 diff --git a/boards/ark/x20-gps/nuttx-config/scripts/script.ld b/boards/ark/x20-gps/nuttx-config/scripts/script.ld index 77322893e35a..4a4f2a1ad6c5 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/script.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and * 256Kb of SRAM. SRAM is split up into three blocks: * * 1) 112Kb of SRAM beginning at address 0x2000:0000 @@ -45,12 +45,13 @@ * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index da052063f3e4..98eb46741fec 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -589,6 +589,9 @@ if(NOT NUTTX_DIR MATCHES "external") elseif(CONFIG_ARCH_CHIP_STM32F412CE) set(DEBUG_DEVICE "STM32F412CE") set(DEBUG_SVD_FILE "STM32F412.svd") + elseif(CONFIG_ARCH_CHIP_STM32F412VG) + set(DEBUG_DEVICE "STM32F412VG") + set(DEBUG_SVD_FILE "STM32F412.svd") elseif(CONFIG_ARCH_CHIP_STM32F427V) set(DEBUG_DEVICE "STM32F427VI") set(DEBUG_SVD_FILE "STM32F427.svd") From b564f3c8e75c6a3273417e4a80f4f2bb57df6ae4 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Aug 2026 15:26:57 -0600 Subject: [PATCH 03/10] fix(ark/cannode): use STM32F412CG and 960K of app flash The part is STM32F412CGU6, not the 512KB CE. App flash starts at 0x08010000 after the 64K bootloader+params window, so the region is 960K, not 928K. --- .../nuttx-config/canbootloader/defconfig | 2 +- boards/ark/cannode/nuttx-config/nsh/defconfig | 2 +- .../scripts/canbootloader_script.ld | 15 +++++++-------- .../ark/cannode/nuttx-config/scripts/script.ld | 17 ++++++++--------- boards/ark/cannode/src/boot_config.h | 6 +----- platforms/nuttx/CMakeLists.txt | 3 +++ 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/boards/ark/cannode/nuttx-config/canbootloader/defconfig b/boards/ark/cannode/nuttx-config/canbootloader/defconfig index c01fbae7a631..d0808d504a98 100644 --- a/boards/ark/cannode/nuttx-config/canbootloader/defconfig +++ b/boards/ark/cannode/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412CG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/cannode/nuttx-config/nsh/defconfig b/boards/ark/cannode/nuttx-config/nsh/defconfig index 13199bacc706..afa552651809 100644 --- a/boards/ark/cannode/nuttx-config/nsh/defconfig +++ b/boards/ark/cannode/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412CG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld index cbf9fddc32dc..1b9cdaaa8b69 100644 --- a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,18 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). + * + * The sram region below bounds .data and .bss only; the heap runs on to + * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/cannode/nuttx-config/scripts/script.ld b/boards/ark/cannode/nuttx-config/scripts/script.ld index 69d99d59bac9..8bf626135759 100644 --- a/boards/ark/cannode/nuttx-config/scripts/script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/script.ld @@ -33,24 +33,23 @@ * ****************************************************************************/ -/* The STM32F412CG has 1Mb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). + * + * The sram region below bounds .data and .bss only; the heap runs on to + * CONFIG_RAM_END. */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } diff --git a/boards/ark/cannode/src/boot_config.h b/boards/ark/cannode/src/boot_config.h index b43795ac4cb9..806a19bd62ce 100644 --- a/boards/ark/cannode/src/boot_config.h +++ b/boards/ark/cannode/src/boot_config.h @@ -92,11 +92,7 @@ * */ #define OPT_WAIT_FOR_GETNODEINFO 0 -/* The ARK CANnode uses PH1 for GPIO_BOOT_CONFIG but it is not - * compatible with px4_arch_gpioread as Port H = 7 which is greater - * than STM32_NPORTS - * #define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO 0 - */ +/* PH1 is OSC_OUT for the HSE clock, not a boot jumper. */ #define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 1 #define OPT_ENABLE_WD 1 diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 98eb46741fec..fa55a8abcfe8 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -589,6 +589,9 @@ if(NOT NUTTX_DIR MATCHES "external") elseif(CONFIG_ARCH_CHIP_STM32F412CE) set(DEBUG_DEVICE "STM32F412CE") set(DEBUG_SVD_FILE "STM32F412.svd") + elseif(CONFIG_ARCH_CHIP_STM32F412CG) + set(DEBUG_DEVICE "STM32F412CG") + set(DEBUG_SVD_FILE "STM32F412.svd") elseif(CONFIG_ARCH_CHIP_STM32F412VG) set(DEBUG_DEVICE "STM32F412VG") set(DEBUG_SVD_FILE "STM32F412.svd") From 1190aa81b439df98e9ed35552d75d665c9e2e830 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Aug 2026 15:35:07 -0600 Subject: [PATCH 04/10] fix(ark/mag): use STM32F412VG and 960K of app flash The part is STM32F412VGH6, not the 48-pin 512KB CE, and the app region after the 64K bootloader+params reservation is 960K, not 928K. --- .../mag/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/mag/nuttx-config/nsh/defconfig | 2 +- .../scripts/canbootloader_script.ld | 15 +++++++-------- boards/ark/mag/nuttx-config/scripts/script.ld | 17 ++++++++--------- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/boards/ark/mag/nuttx-config/canbootloader/defconfig b/boards/ark/mag/nuttx-config/canbootloader/defconfig index 66d9f4033944..a5a821c11e98 100644 --- a/boards/ark/mag/nuttx-config/canbootloader/defconfig +++ b/boards/ark/mag/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/mag/nuttx-config/nsh/defconfig b/boards/ark/mag/nuttx-config/nsh/defconfig index 23e92e78046f..c9b4b8db4a36 100644 --- a/boards/ark/mag/nuttx-config/nsh/defconfig +++ b/boards/ark/mag/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld index 48a59fe92d0e..97cf39c0c694 100644 --- a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,18 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). + * + * The sram region below bounds .data and .bss only; the heap runs on to + * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/mag/nuttx-config/scripts/script.ld b/boards/ark/mag/nuttx-config/scripts/script.ld index 77322893e35a..7b72774c22d9 100644 --- a/boards/ark/mag/nuttx-config/scripts/script.ld +++ b/boards/ark/mag/nuttx-config/scripts/script.ld @@ -33,24 +33,23 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). + * + * The sram region below bounds .data and .bss only; the heap runs on to + * CONFIG_RAM_END. */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } From 7e71834dc12e3a547e713a5f7ca0042bd24e63ff Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Aug 2026 15:35:07 -0600 Subject: [PATCH 05/10] docs(boards): fix the F412 SRAM description in the cannode linker scripts The F412 has one contiguous 256KB SRAM at 0x20000000. The block list these scripts carried is F42x boilerplate and describes memory the part does not have. --- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- .../ark/can-flow-mr/nuttx-config/scripts/script.ld | 9 ++------- .../nuttx-config/scripts/canbootloader_script.ld | 3 --- boards/ark/cannode/nuttx-config/scripts/script.ld | 3 --- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/f9p-gps/nuttx-config/scripts/script.ld | 9 ++------- .../mag/nuttx-config/scripts/canbootloader_script.ld | 3 --- boards/ark/mag/nuttx-config/scripts/script.ld | 3 --- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- .../septentrio-gps/nuttx-config/scripts/script.ld | 9 ++------- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/teseo-gps/nuttx-config/scripts/script.ld | 9 ++------- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/x20-gps/nuttx-config/scripts/script.ld | 9 ++------- 14 files changed, 30 insertions(+), 87 deletions(-) diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld index 439435cd89da..49875aa7078c 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld index 4a4f2a1ad6c5..9dc576df84f4 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld @@ -33,13 +33,8 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in diff --git a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld index 1b9cdaaa8b69..3915774903cc 100644 --- a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld @@ -42,9 +42,6 @@ * * The first 0x10000 of flash is reserved for the bootloader (32K) and * flash-backed parameters (32K). - * - * The sram region below bounds .data and .bss only; the heap runs on to - * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/cannode/nuttx-config/scripts/script.ld b/boards/ark/cannode/nuttx-config/scripts/script.ld index 8bf626135759..b632bcca9c7f 100644 --- a/boards/ark/cannode/nuttx-config/scripts/script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/script.ld @@ -42,9 +42,6 @@ * * The first 0x10000 of flash is reserved for the bootloader (32K) and * flash-backed parameters (32K). - * - * The sram region below bounds .data and .bss only; the heap runs on to - * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld index c9192c85cb4f..1a9eb37335a3 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld index 4a4f2a1ad6c5..9dc576df84f4 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld @@ -33,13 +33,8 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in diff --git a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld index 97cf39c0c694..49875aa7078c 100644 --- a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld @@ -42,9 +42,6 @@ * * The first 0x10000 of flash is reserved for the bootloader (32K) and * flash-backed parameters (32K). - * - * The sram region below bounds .data and .bss only; the heap runs on to - * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/mag/nuttx-config/scripts/script.ld b/boards/ark/mag/nuttx-config/scripts/script.ld index 7b72774c22d9..9dc576df84f4 100644 --- a/boards/ark/mag/nuttx-config/scripts/script.ld +++ b/boards/ark/mag/nuttx-config/scripts/script.ld @@ -42,9 +42,6 @@ * * The first 0x10000 of flash is reserved for the bootloader (32K) and * flash-backed parameters (32K). - * - * The sram region below bounds .data and .bss only; the heap runs on to - * CONFIG_RAM_END. */ MEMORY diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld index 439435cd89da..49875aa7078c 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld index 4a4f2a1ad6c5..9dc576df84f4 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld @@ -33,13 +33,8 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld index 439435cd89da..49875aa7078c 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld index 4a4f2a1ad6c5..9dc576df84f4 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld @@ -33,13 +33,8 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in diff --git a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld index c9192c85cb4f..1a9eb37335a3 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/x20-gps/nuttx-config/scripts/script.ld b/boards/ark/x20-gps/nuttx-config/scripts/script.ld index 4a4f2a1ad6c5..9dc576df84f4 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/script.ld @@ -33,13 +33,8 @@ * ****************************************************************************/ -/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in From 7a9a76cb7efb4612d599f1ff54af700e3da35933 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Tue, 1 Sep 2026 14:24:16 -0600 Subject: [PATCH 06/10] fix(ark/dist): use STM32F412VG and 960K of app flash The part is STM32F412VGH6, not the 48-pin 512KB CE. App flash starts at 0x08010000 after the 64K bootloader+params window, so the region is 960K, not 928K. Signed-off-by: Jacob Dahl --- .../ark/dist/nuttx-config/canbootloader/defconfig | 2 +- boards/ark/dist/nuttx-config/nsh/defconfig | 2 +- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/dist/nuttx-config/scripts/script.ld | 14 +++++--------- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/boards/ark/dist/nuttx-config/canbootloader/defconfig b/boards/ark/dist/nuttx-config/canbootloader/defconfig index a650a3cbcf3c..784b49988dd3 100644 --- a/boards/ark/dist/nuttx-config/canbootloader/defconfig +++ b/boards/ark/dist/nuttx-config/canbootloader/defconfig @@ -16,7 +16,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARMV7M_MEMCPY=y CONFIG_BOARDCTL=y diff --git a/boards/ark/dist/nuttx-config/nsh/defconfig b/boards/ark/dist/nuttx-config/nsh/defconfig index 3bb396bbac66..0f3e846bbe8d 100644 --- a/boards/ark/dist/nuttx-config/nsh/defconfig +++ b/boards/ark/dist/nuttx-config/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y -CONFIG_ARCH_CHIP_STM32F412CE=y +CONFIG_ARCH_CHIP_STM32F412VG=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_MEMCPY=y diff --git a/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld index 48a59fe92d0e..49875aa7078c 100644 --- a/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/dist/nuttx-config/scripts/script.ld b/boards/ark/dist/nuttx-config/scripts/script.ld index 77322893e35a..9dc576df84f4 100644 --- a/boards/ark/dist/nuttx-config/scripts/script.ld +++ b/boards/ark/dist/nuttx-config/scripts/script.ld @@ -33,24 +33,20 @@ * ****************************************************************************/ -/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412VG has 1MB of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY { - flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K + flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K } From f73f2d3133c7780f9b6cbd00a537878757483d82 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:28:33 -0600 Subject: [PATCH 07/10] fix(boards): give F412 cannodes a 256K SRAM region (#28498) NuttX now ends the F412 heap at 0x20040000. The linker scripts still capped .data/.bss at 192K, leftover from the F42x split. Signed-off-by: Jacob Dahl --- .../can-flow-mr/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/can-flow-mr/nuttx-config/scripts/script.ld | 2 +- .../ark/can-flow/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/can-flow/nuttx-config/scripts/script.ld | 2 +- boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/can-gps/nuttx-config/scripts/script.ld | 2 +- .../can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld | 2 +- boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/cannode/nuttx-config/scripts/script.ld | 2 +- boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/dist/nuttx-config/scripts/script.ld | 2 +- boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/f9p-gps/nuttx-config/scripts/script.ld | 2 +- boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/mag/nuttx-config/scripts/script.ld | 2 +- .../septentrio-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/septentrio-gps/nuttx-config/scripts/script.ld | 2 +- .../ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/teseo-gps/nuttx-config/scripts/script.ld | 2 +- boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld | 2 +- boards/ark/x20-gps/nuttx-config/scripts/script.ld | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld index 49875aa7078c..ef74be0945b5 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld +++ b/boards/ark/can-flow-mr/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld index cbf9fddc32dc..9168a1b9679d 100644 --- a/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-flow/nuttx-config/scripts/script.ld b/boards/ark/can-flow/nuttx-config/scripts/script.ld index 17a892f885ca..79d62b0e1612 100644 --- a/boards/ark/can-flow/nuttx-config/scripts/script.ld +++ b/boards/ark/can-flow/nuttx-config/scripts/script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 448K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld index cbf9fddc32dc..9168a1b9679d 100644 --- a/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-gps/nuttx-config/scripts/script.ld b/boards/ark/can-gps/nuttx-config/scripts/script.ld index 17a892f885ca..79d62b0e1612 100644 --- a/boards/ark/can-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/can-gps/nuttx-config/scripts/script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 448K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld index cbf9fddc32dc..9168a1b9679d 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld b/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld index 17a892f885ca..79d62b0e1612 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld @@ -51,7 +51,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 448K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld index 3915774903cc..fc6556d70bd1 100644 --- a/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/cannode/nuttx-config/scripts/script.ld b/boards/ark/cannode/nuttx-config/scripts/script.ld index b632bcca9c7f..035933b25b70 100644 --- a/boards/ark/cannode/nuttx-config/scripts/script.ld +++ b/boards/ark/cannode/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld index 49875aa7078c..ef74be0945b5 100644 --- a/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/dist/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/dist/nuttx-config/scripts/script.ld b/boards/ark/dist/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/dist/nuttx-config/scripts/script.ld +++ b/boards/ark/dist/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld index 1a9eb37335a3..0f135b499c2c 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/f9p-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/f9p-gps/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld index 49875aa7078c..ef74be0945b5 100644 --- a/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/mag/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/mag/nuttx-config/scripts/script.ld b/boards/ark/mag/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/mag/nuttx-config/scripts/script.ld +++ b/boards/ark/mag/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld index 49875aa7078c..ef74be0945b5 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/septentrio-gps/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld index 49875aa7078c..ef74be0945b5 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/teseo-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/teseo-gps/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld index 1a9eb37335a3..0f135b499c2c 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/canbootloader_script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) diff --git a/boards/ark/x20-gps/nuttx-config/scripts/script.ld b/boards/ark/x20-gps/nuttx-config/scripts/script.ld index 9dc576df84f4..6d71ed168a18 100644 --- a/boards/ark/x20-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/x20-gps/nuttx-config/scripts/script.ld @@ -47,7 +47,7 @@ MEMORY { flash (rx) : ORIGIN = 0x08010000, LENGTH = 960K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K } OUTPUT_ARCH(arm) From a9132acadaf4119f788a266705b6c8e33487e24a Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 3 Sep 2026 17:18:44 -0600 Subject: [PATCH 08/10] docs(boards): fix the F412 SRAM description on the 512K ARK cannodes The F412 has one contiguous 256KB SRAM at 0x20000000. The block list these scripts carried is F42x boilerplate and describes memory the part does not have. Signed-off-by: Jacob Dahl --- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/can-flow/nuttx-config/scripts/script.ld | 12 ++++-------- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- boards/ark/can-gps/nuttx-config/scripts/script.ld | 12 ++++-------- .../nuttx-config/scripts/canbootloader_script.ld | 12 ++++-------- .../ark/can-rtk-gps/nuttx-config/scripts/script.ld | 12 ++++-------- 6 files changed, 24 insertions(+), 48 deletions(-) diff --git a/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld index 9168a1b9679d..4512b05d5459 100644 --- a/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-flow/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-flow/nuttx-config/scripts/script.ld b/boards/ark/can-flow/nuttx-config/scripts/script.ld index 79d62b0e1612..e1c5a84f7c21 100644 --- a/boards/ark/can-flow/nuttx-config/scripts/script.ld +++ b/boards/ark/can-flow/nuttx-config/scripts/script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld index 9168a1b9679d..4512b05d5459 100644 --- a/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-gps/nuttx-config/scripts/script.ld b/boards/ark/can-gps/nuttx-config/scripts/script.ld index 79d62b0e1612..e1c5a84f7c21 100644 --- a/boards/ark/can-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/can-gps/nuttx-config/scripts/script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld b/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld index 9168a1b9679d..4512b05d5459 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld +++ b/boards/ark/can-rtk-gps/nuttx-config/scripts/canbootloader_script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY diff --git a/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld b/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld index 79d62b0e1612..e1c5a84f7c21 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld +++ b/boards/ark/can-rtk-gps/nuttx-config/scripts/script.ld @@ -33,19 +33,15 @@ * ****************************************************************************/ -/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 256Kb of SRAM. SRAM is split up into three blocks: - * - * 1) 112Kb of SRAM beginning at address 0x2000:0000 - * 2) 16Kb of SRAM beginning at address 0x2001:c000 - * 3) 64Kb of SRAM beginning at address 0x2002:0000 - * 4) 64Kb of TCM SRAM beginning at address 0x1000:0000 +/* The STM32F412CE has 512Kb of FLASH beginning at address 0x0800:0000 and one + * contiguous 256Kb block of SRAM beginning at address 0x2000:0000. * * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 * where the code expects to begin execution by jumping to the entry point in * the 0x0800:0000 address range. * - * The first 0x10000 of flash is reserved for the bootloader. + * The first 0x10000 of flash is reserved for the bootloader (32K) and + * flash-backed parameters (32K). */ MEMORY From 9ab2144ca5bcdf2cc98cfd1193c4b904ac32fdfd Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 3 Sep 2026 17:24:43 -0600 Subject: [PATCH 09/10] fix(ark/cannode): drop the PH1 boot jumper defines PH1 is OSC_OUT for the HSE crystal. The jumper option was already undefined, so these defines could not be enabled without stopping the clock. Signed-off-by: Jacob Dahl --- boards/ark/cannode/src/board_config.h | 3 --- boards/ark/cannode/src/boot_config.h | 28 --------------------------- 2 files changed, 31 deletions(-) diff --git a/boards/ark/cannode/src/board_config.h b/boards/ark/cannode/src/board_config.h index aa1225bf193e..6ed173046837 100644 --- a/boards/ark/cannode/src/board_config.h +++ b/boards/ark/cannode/src/board_config.h @@ -50,9 +50,6 @@ #define GPIO_CAN1_TERMINATION /* PC15 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN15) #define GPIO_CAN_TERM GPIO_CAN1_TERMINATION -/* Boot config */ -#define GPIO_BOOT_CONFIG /* PH1 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTH|GPIO_PIN1|GPIO_EXTI) - /* ICM42688p FSYNC */ #define GPIO_42688P_FSYNC /* PB8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8) diff --git a/boards/ark/cannode/src/boot_config.h b/boards/ark/cannode/src/boot_config.h index 806a19bd62ce..0559a920caf0 100644 --- a/boards/ark/cannode/src/boot_config.h +++ b/boards/ark/cannode/src/boot_config.h @@ -70,30 +70,7 @@ #define OPT_NODE_INFO_RATE_MS 50 #define OPT_BL_NUMBER_TIMERS 7 -/* - * This Option set is set to 1 ensure a provider of firmware has an - * opportunity update the node's firmware. - * This Option is the default policy and can be overridden by - * a jumper - * When this Policy is set, the node will ignore tboot and - * wait indefinitely for a GetNodeInfo request before booting. - * - * OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT is used to allow - * the polarity of the jumper to be True Active - * - * wait OPT_WAIT_FOR_GETNODEINFO OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO - * Jumper - * yes 1 0 x - * yes 1 1 Active - * no 1 1 Not Active - * no 0 0 X - * yes 0 1 Active - * no 0 1 Not Active - * - */ #define OPT_WAIT_FOR_GETNODEINFO 0 -/* PH1 is OSC_OUT for the HSE clock, not a boot jumper. */ -#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 1 #define OPT_ENABLE_WD 1 @@ -123,8 +100,3 @@ /* If this board uses big flash that have large sectors */ #define OPT_USE_YIELD - -/* Bootloader Option***************************************************************** - * - */ -#define GPIO_GETNODEINFO_JUMPER (GPIO_BOOT_CONFIG & ~GPIO_EXTI) From 96a02f5d54e911adc896b034eda879bf0af6438c Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 3 Sep 2026 17:51:05 -0600 Subject: [PATCH 10/10] fix(boards): correct ARK cannode I2C bitbang pins The bitbang GPIO defines did not match the schematic nets, so a bus reset would drive the wrong pins. Signed-off-by: Jacob Dahl --- boards/ark/can-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/can-rtk-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/can-rtk-gps/src/board_config.h | 3 --- boards/ark/cannode/nuttx-config/include/board.h | 2 +- boards/ark/f9p-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/f9p-gps/src/board_config.h | 3 --- boards/ark/septentrio-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/septentrio-gps/src/board_config.h | 3 --- boards/ark/teseo-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/x20-gps/nuttx-config/include/board.h | 4 ++-- boards/ark/x20-gps/src/board_config.h | 3 --- 11 files changed, 13 insertions(+), 25 deletions(-) diff --git a/boards/ark/can-gps/nuttx-config/include/board.h b/boards/ark/can-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/can-gps/nuttx-config/include/board.h +++ b/boards/ark/can-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/can-rtk-gps/nuttx-config/include/board.h b/boards/ark/can-rtk-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/can-rtk-gps/nuttx-config/include/board.h +++ b/boards/ark/can-rtk-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/can-rtk-gps/src/board_config.h b/boards/ark/can-rtk-gps/src/board_config.h index 4d18818edcba..88d168581a48 100644 --- a/boards/ark/can-rtk-gps/src/board_config.h +++ b/boards/ark/can-rtk-gps/src/board_config.h @@ -82,9 +82,6 @@ #define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) #define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) -#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) -#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) - #define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) #define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) diff --git a/boards/ark/cannode/nuttx-config/include/board.h b/boards/ark/cannode/nuttx-config/include/board.h index aa067118540a..c6be3dacabd2 100644 --- a/boards/ark/cannode/nuttx-config/include/board.h +++ b/boards/ark/cannode/nuttx-config/include/board.h @@ -144,6 +144,6 @@ #define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 #define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN6) -#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN7) +#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) #endif /* __ARCH_BOARD_BOARD_H */ diff --git a/boards/ark/f9p-gps/nuttx-config/include/board.h b/boards/ark/f9p-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/f9p-gps/nuttx-config/include/board.h +++ b/boards/ark/f9p-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/f9p-gps/src/board_config.h b/boards/ark/f9p-gps/src/board_config.h index 2d5f582075f1..81f0394944db 100644 --- a/boards/ark/f9p-gps/src/board_config.h +++ b/boards/ark/f9p-gps/src/board_config.h @@ -79,9 +79,6 @@ #define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) #define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) -#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) -#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) - #define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) #define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) diff --git a/boards/ark/septentrio-gps/nuttx-config/include/board.h b/boards/ark/septentrio-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/septentrio-gps/nuttx-config/include/board.h +++ b/boards/ark/septentrio-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/septentrio-gps/src/board_config.h b/boards/ark/septentrio-gps/src/board_config.h index 2d5f582075f1..81f0394944db 100644 --- a/boards/ark/septentrio-gps/src/board_config.h +++ b/boards/ark/septentrio-gps/src/board_config.h @@ -79,9 +79,6 @@ #define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) #define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) -#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) -#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) - #define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) #define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) diff --git a/boards/ark/teseo-gps/nuttx-config/include/board.h b/boards/ark/teseo-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/teseo-gps/nuttx-config/include/board.h +++ b/boards/ark/teseo-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/x20-gps/nuttx-config/include/board.h b/boards/ark/x20-gps/nuttx-config/include/board.h index 526392b92bbd..8fbd9a02b44e 100644 --- a/boards/ark/x20-gps/nuttx-config/include/board.h +++ b/boards/ark/x20-gps/nuttx-config/include/board.h @@ -141,8 +141,8 @@ #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 #define GPIO_I2C2_SDA GPIO_I2C2_SDA_4 -#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9) /* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 diff --git a/boards/ark/x20-gps/src/board_config.h b/boards/ark/x20-gps/src/board_config.h index 2d5f582075f1..81f0394944db 100644 --- a/boards/ark/x20-gps/src/board_config.h +++ b/boards/ark/x20-gps/src/board_config.h @@ -79,9 +79,6 @@ #define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) #define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) -#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) -#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9) - #define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) #define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15)