This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b42ec9a2c1858d95f570736d2ceefcf9df5a9594
Author: yukangzhi <[email protected]>
AuthorDate: Wed Aug 26 14:21:15 2026 +0800

    boards/esp32s3-devkit: disable C++ in usbmsc to avoid esptool align assert
    
    The esp32s3-devkit:usbmsc config uses CONFIG_ESPRESSIF_SIMPLE_BOOT, so
    the image is packaged with "esptool elf2image --ram-only-header".  With
    esptool v5.2.0, that path asserts that each flash segment satisfies
      (f.tell() + 8 + BOOTLOADER_FLASH_OFFSET) % IROM_ALIGN
        == segment.addr % IROM_ALIGN
    When .flash.text lands right on a 64 KB (IROM_ALIGN) boundary the
    assertion cannot be satisfied and elf2image fails with AssertionError,
    even though NuttX itself links cleanly.
    
    usbmsc is a plain C test and does not need the C++ runtime.  Disabling
    CONFIG_HAVE_CXX / CONFIG_HAVE_CXXINITIALIZE moves .flash.text off the
    IROM_ALIGN boundary so the SIMPLE_BOOT image can be generated, without
    changing the boot mode or the test's intent.
    
    Signed-off-by: yukangzhi <[email protected]>
---
 boards/xtensa/esp32s3/esp32s3-devkit/configs/usbmsc/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbmsc/defconfig 
b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbmsc/defconfig
index a1f1886b8d6..9e481430cc9 100644
--- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbmsc/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbmsc/defconfig
@@ -11,3 +11,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/esp32s3flash"
 CONFIG_USBMSC=y
 CONFIG_USBMSC_EPBULKIN=2
 CONFIG_USBMSC_EPBULKOUT=1
+# CONFIG_HAVE_CXX is not set
+# CONFIG_HAVE_CXXINITIALIZE is not set

Reply via email to