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

   ## Summary
   
     The NP and bootloader images are built from the vendored ameba-rtos SDK on
     every NuttX build. Three problems are addressed:
   
     - The SDK menuconfig was regenerated on every build, which rewrote the SDK
       `.config`, made CMake reconfigure, and recompiled most of the NP image 
even
       when nothing changed. It is now materialized once, guarded by a stamp
       (pinned SDK revision + the board config overlay); an unchanged rebuild
       reuses it, so only the AP-driven "noused" file is regenerated.
     - The SDK config is now driven by a two-tier prj.conf-style overlay per 
board:
       `ameba_sdk.conf` (user-editable) layered under `ameba_sdk_force.conf`
       (forced options such as `CONFIG_SHELL=n`, applied last and re-applied 
after
       an edit), so options that must stay fixed for the port cannot be 
overridden.
     - `make ameba_menuconfig` is added to edit the SDK options through the 
SDK's
       own native menuconfig UI and save the diff back to the board overlay
       (the SDK-side counterpart of `make menuconfig`).
     - `libameba_fwlib.a` compile and the SDK NP/boot build): the SDK passes 
`NULL`
       to `irq_register()`'s `u32` "Data" argument in many places, an 
intentional
       NULL-as-context idiom; the pedantic warning is suppressed for vendor code
       rather than editing every call site (which would also re-break on every 
new
       SDK file).
       
     ## Impact
     
     - Users: adds `make ameba_menuconfig`; existing build/flash usage 
unchanged.
     - Build: much faster incremental rebuilds for these boards (no-change 
rebuild
       recompiles ~3 files instead of most of the NP image); affects only the
       `arch/arm/src/{common/ameba,rtl8721dx,rtl8720f}` build glue and the two
       boards. No other arch/board.
     - Hardware / runtime: no change to the firmware itself.
     - Compatibility: no SDK source is modified (the warning suppression is a
       compile flag; the config is driven via the SDK's existing 
`--apply-file`).
   
     ## Testing
     
     **Build host:** Ubuntu 22.04 (x86_64, WSL2), GCC 11 for host tools; target
     toolchain: Realtek `arm-none-eabi` asdk (auto-fetched).
   
     **Targets:** `pke8721daf:nsh` (RTL8721Dx), `rtl8720f_evb:nsh` (RTL8720F).
   
     Incremental rebuild cost, no source change (after change):
     even after enabling CONFIG_SHELL in make ameba_menuconfig and saving,
   
     the built SDK config shows it forced back off:
   
     $ grep CONFIG_SHELL .../build_RTL8721Dx/menuconfig/.config
     CONFIG_SHELL is not set
   
   
     No `-Wint-conversion` warnings in the build log (previously emitted from
     `ameba_pmctimer.c` / `ameba_pmu.c`). Both boards built, flashed and booted
     (NSH + Wi-Fi STA).


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to