From 1fbfeff9424d59c048ce1d8d88c81b539e930e54 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 19 Nov 2026 13:49:50 +1300 Subject: [PATCH] build(boards/io-v2): trim the RAM NuttX 12.12 added on the IO boards With NuttX 12.12 the IO firmware has only 424 B of free heap left out of the F100's 8 KB, down from about 1.8 KB with the same sources on the previous NuttX. Each task group now embeds its three std streams with a 64 B buffer each, once statically for the kernel thread group and once on the heap for the IO task. Nothing on the IO uses stdio streams (syslog is disabled), so drop the buffers. The IO also never uses signals, so don't preallocate signal actions. This frees 528 B of static RAM plus 192 B of heap: free_memory_bytes in "px4io status" goes from 424 to 1144 on a Cube Orange+. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julian Oes --- boards/cubepilot/io-v2/nuttx-config/nsh/defconfig | 3 +++ boards/px4/io-v2/nuttx-config/nsh/defconfig | 3 +++ 2 files changed, 6 insertions(+) diff --git a/boards/cubepilot/io-v2/nuttx-config/nsh/defconfig b/boards/cubepilot/io-v2/nuttx-config/nsh/defconfig index f3f0876538c..32546cd2b56 100644 --- a/boards/cubepilot/io-v2/nuttx-config/nsh/defconfig +++ b/boards/cubepilot/io-v2/nuttx-config/nsh/defconfig @@ -46,9 +46,12 @@ CONFIG_RAM_SIZE=8192 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_SERIAL_TERMIOS=y +CONFIG_SIG_PREALLOC_ACTIONS=0 +CONFIG_SIG_PREALLOC_IRQ_ACTIONS=0 CONFIG_STACK_COLORATION=y CONFIG_START_DAY=30 CONFIG_START_MONTH=11 +CONFIG_STDIO_BUFFER_SIZE=0 CONFIG_STM32_ADC1=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_DMA1=y diff --git a/boards/px4/io-v2/nuttx-config/nsh/defconfig b/boards/px4/io-v2/nuttx-config/nsh/defconfig index c419008fcc9..9c676c09c81 100644 --- a/boards/px4/io-v2/nuttx-config/nsh/defconfig +++ b/boards/px4/io-v2/nuttx-config/nsh/defconfig @@ -46,9 +46,12 @@ CONFIG_RAM_SIZE=8192 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_SERIAL_TERMIOS=y +CONFIG_SIG_PREALLOC_ACTIONS=0 +CONFIG_SIG_PREALLOC_IRQ_ACTIONS=0 CONFIG_STACK_COLORATION=y CONFIG_START_DAY=30 CONFIG_START_MONTH=11 +CONFIG_STDIO_BUFFER_SIZE=0 CONFIG_STM32_ADC1=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_DMA1=y