You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "neilberkman (via GitHub)" <gi...@apache.org> on 2026/03/08 17:34:57 UTC

[PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

neilberkman opened a new pull request, #18509:
URL: https://github.com/apache/nuttx/pull/18509

   ## Summary
   
   Add board integration for NuttX's first-party nxboot bootloader on nucleo-h743zi. This board currently only supports MCUboot for OTA. nxboot uses a three-slot layout (primary, secondary, tertiary) with no scratch partition.
   
   - Add `STM32_APP_FORMAT_NXBOOT` Kconfig choice alongside existing MCUboot choice, with tertiary slot config and nxboot-specific defaults
   - Gate scratch partition on MCUboot; generalize MCUboot-specific Kconfig labels to be format-neutral
   - Add nxboot linker script selection in Make.defs and CMakeLists.txt
   - Add tertiary partition entry in stm32_progmem.c (compile-time selected via `#ifdef`)
   - Add linker scripts: flash-nxboot-loader.ld (256K bootloader) and flash-nxboot-app.ld (512K-1K app with 1K header offset)
   - Add defconfigs: nxboot-loader and nxboot-app


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4019772617

   Updated the PR description to include the template's Impact and Testing sections. I also pushed a follow-up commit () that validates the fixed nxboot layout at build time so mismatched settings fail during the build instead of producing a bad image.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #18509:
URL: https://github.com/apache/nuttx/pull/18509


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4019887908

   Force-pushed an update to add the missing Signed-off-by on the top commit and fix the cmake-format issue in boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt. The PR description still includes the detailed Impact and Testing sections.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4038662994

   > Hardware verification on Nucleo-H743ZI (ST-LINK V2J47M34).
   > 
   > `nucleo-h743zi:nxboot-loader` and `nucleo-h743zi:nxboot-app` both build successfully. Loader flashed and verified via OpenOCD:
   > 
   > ```
   > Info : Device: STM32H74x/75x
   > Info : flash size probed value 2048k
   > Info : STM32H7 flash has dual banks
   > Info : Bank (0) size is 1024 kb, base address is 0x08000000
   > ** Programming Finished **
   > ** Verified OK **
   > ```
   > 
   > **Loader boots and runs correctly on target.** Serial output (USART3, 115200 8N1, via ST-Link virtual COM port):
   > 
   > ```
   > *** nxboot ***
   > *** nxboot **Could not find bootable image.
   > *
   > Validating recovery image
   > Validating primary image
   > Validating update image
   > ERROR: No bootable image found
   > ```
   > 
   > "No bootable image found" is expected — the OTA slots are empty. The bootloader validated all three slots correctly.
   > 
   > **NSH console also verified.** Switching the entrypoint to `nsh_main` (one config change, no code changes) confirms the full board support stack works end-to-end:
   > <img alt="image-3" width="611" height="423" src="https://private-user-images.githubusercontent.com/37657/561423265-2844d7ae-6efc-4572-99b6-af75813aed75.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMyMjcyOTYsIm5iZiI6MTc3MzIyNjk5NiwicGF0aCI6Ii8zNzY1Ny81NjE0MjMyNjUtMjg0NGQ3YWUtNmVmYy00NTcyLTk5YjYtYWY3NTgxM2FlZDc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzExVDExMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAyOGFiMGViZWZkYmVkZjM4MTE0MDJmMzU5OTRiYTJjNjU2NjFjODQ4MzA5NjNmZTBmMzU5YzUzNDI2MzdhZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YtHN_CDwcaYxfc4xSfbWOwlj3rs4w1UKRLD8tzQUZAw">
   > 
   > ```
   > NuttShell (NSH) NuttX-12.12.0
   > Welcome to NuttX nxboot Loader!
   > nsh>
   > ```
   
   I think this Hercules serial console doesn't have VT102 support, it explains why you see this "[K". I think TeraTerm has support.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "linguini1 (via GitHub)" <gi...@apache.org>.
linguini1 commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4019767257

   Hi @neilberkman , thanks for the patch!
   
   Please take a look at the contributing guide :) Your PR description is a good summary, but still needs the impact & testing sections from the template.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4037127290

   Tested on hardware (Nucleo-H743ZI, ST-LINK V2J47M34).
   
   **Both configs build successfully.** Loader flashed and verified via OpenOCD:
   
   ```
   Info : Device: STM32H74x/75x
   Info : flash size probed value 2048k
   Info : STM32H7 flash has dual banks
   Info : Bank (0) size is 1024 kb, base address is 0x08000000
   ** Programming Finished **
   ** Verified OK **
   ```
   
   **Loader boots and runs correctly on target.** Serial output (USART3, 115200 8N1, via ST-Link virtual COM port):
   
   ```
   *** nxboot ***
   *** nxboot **Could not find bootable image.
   *
   Validating recovery image
   Validating primary image
   Validating update image
   ERROR: No bootable image found
   ```
   
   "No bootable image found" is expected — the OTA slots are empty. The bootloader validated all three slots correctly.
   
   **NSH console also verified.** Switching the entrypoint to `nsh_main` (one config change, no code changes) confirms the full board support stack works end-to-end:
   
   <img width="611" height="423" alt="image-3" src="https://github.com/user-attachments/assets/2844d7ae-6efc-4572-99b6-af75813aed75" />
   
   ```
   NuttShell (NSH) NuttX-12.12.0
   Welcome to NuttX nxboot Loader!
   nsh>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4027292692

   Thanks @acassis! These are pre-existing Clang warnings in the nxboot app code — this PR is the first defconfig that builds nxboot with Clang, so they hadn't been caught before. Fix submitted: apache/nuttx-apps#3419. CI on that PR has one failed job (`risc-v-05`) which died at Docker Login (infra issue, not a build failure) — all jobs that actually built passed. Will rebase this PR once that merges.
   
   Re two-partition support for nxboot — would be great to see that happen. I won't be able to take it on myself though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4026838914

   @neilberkman nice work, please fix this issue:
   
   ```
   Configuration/Tool: nucleo-h743zi/nxboot-loader,CONFIG_ARM_TOOLCHAIN_CLANG
   2026-03-08 22:18:56
   ------------------------------------------------------------------------------------
     Cleaning...
     Configuring...
     Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
     Enabling CONFIG_ARM_TOOLCHAIN_CLANG
     Building NuttX...
   Error: loader/flash.c:140:54: error: format specifies type 'long' but the argument has type 'off_t' (aka 'int') [-Werror,-Wformat]
     140 |       syslog(LOG_ERR, "Could not seek to %ld: %s\n", off, strerror(errno));
         |                                          ~~~         ^~~
         |                                          %d
   Error: loader/flash.c:148:15: error: format specifies type 'long' but the argument has type 'off_t' (aka 'int') [-Werror,-Wformat]
     147 |       syslog(LOG_ERR, "Write to offset %ld failed %s\n",
         |                                        ~~~
         |                                        %d
     148 |               off, strerror(errno));
         |               ^~~
   Error: loader/flash.c:198:54: error: format specifies type 'long' but the argument has type 'off_t' (aka 'int') [-Werror,-Wformat]
     198 |       syslog(LOG_ERR, "Could not seek to %ld: %s\n", off, strerror(errno));
         |                                          ~~~         ^~~
         |                                          %d
   Error: loader/flash.c:205:59: error: format specifies type 'long' but the argument has type 'off_t' (aka 'int') [-Werror,-Wformat]
     205 |       syslog(LOG_ERR, "Read from offset %ld failed %s\n", off,
         |                                         ~~~               ^~~
         |                                         %d
   4 errors generated.
   make[2]: *** [/github/workspace/sources/apps/Application.mk:239: loader/flash.c.github.workspace.sources.apps.boot.nxboot.o] Error 1
   Error: nxboot_main.c:132:17: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
     132 |   va_start(arg, type);
         |                 ^
   nxboot_main.c:127:43: note: parameter of type 'enum progress_type_e' is declared here
     127 | void nxboot_progress(enum progress_type_e type, ...)
         |                                           ^
   1 error generated.
   make[2]: *** [/github/workspace/sources/apps/Application.mk:330: nxboot_main.c.github.workspace.sources.apps.boot.nxboot.o] Error 1
   make[2]: Target 'all' not remade because of errors.
   make[1]: *** [Makefile:54: /github/workspace/sources/apps/boot/nxboot_all] Error 2
   make[1]: Target 'all' not remade because of errors.
   make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
   make: Target 'all' not remade because of errors.
   /github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
     [1/1] Normalize nucleo-h743zi/nxboot-loader
   ```
   
   @neilberkman do you have plans to participate of the GSoC and contribute the two partitions support to NXBoot?
   
   https://cwiki.apache.org/confluence/display/COMDEV/GSoC+2026+Ideas+list


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4019772942

   Updated the PR description to include the templates Impact and Testing sections. I also pushed follow-up commit 7578f4655a, which validates the fixed nxboot layout at build time so mismatched settings fail during the build instead of producing a bad image.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] boards/nucleo-h743zi: Add nxboot bootloader support [nuttx]

Posted by "neilberkman (via GitHub)" <gi...@apache.org>.
neilberkman commented on PR #18509:
URL: https://github.com/apache/nuttx/pull/18509#issuecomment-4020368289

   CI failure in `Linux (arm-13)` is due to pre-existing Clang warnings in the nxboot app code (this PR is the first to build nxboot with Clang). Fix submitted: https://github.com/apache/nuttx-apps/pull/3419


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org