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

   ## Summary
   
   The NXP mr-canhubk3 board's `scripts/Make.defs` selects `sram.ld` when 
`CONFIG_BOOT_RUNFROMISRAM=y`, but the file was never added, so builds for 
run-from-internal-SRAM fail with a missing linker script. This change adds 
`boards/arm/s32k3xx/mr-canhubk3/scripts/sram.ld`, derived from the existing 
`flash.ld`. The new script places all sections in SRAM (no `AT > flash`) and 
defines the same symbols (`_framfuncs`, `FLASH_BASE_ADDR`, `FLASH_END_ADDR`, 
etc.) required by startup and MPU code so the link succeeds. No changes to 
`Make.defs` or defconfigs; only the missing file is added.
   
   Fixes #18365.
   
   ## Impact
   
   - **Users:** Builds with `CONFIG_BOOT_RUNFROMISRAM=y` for mr-canhubk3 now 
succeed; run-from-flash configs are unchanged.
   - **Build:** One new file; no changes to existing scripts or build logic.
   - **Hardware / documentation / security:** No impact.
   - **Compatibility:** No change for existing run-from-flash configs.
   
   ## Testing
   
   - **Host:** macOS; ARM cross-compiler: `arm-none-eabi-gcc` (e.g. via 
Homebrew). NuttX apps from `../nuttx-apps`.
   - **Board / config:** mr-canhubk3 with `nsh` defconfig.
   - **Run-from-flash:** Configured with `CONFIG_BOOT_RUNFROMFLASH=y`, ran 
`make`. Build completed; `nuttx` and `nuttx.bin` produced and linked with 
`flash.ld`.
   - **Run-from-SRAM:** Set `CONFIG_BOOT_RUNFROMISRAM=y` in `.config`, ran 
`make clean` then `make`. Build completed; linker used `sram.ld` (e.g. `CPP: 
.../sram.ld -> .../sram.ld.tmp`, `LD: nuttx`). Memory report showed SRAM in use 
(~34% of 272K); `nuttx` is a valid ARM ELF for SRAM.
   - **Conclusion:** Run-from-flash still works; run-from-SRAM build works with 
the new `sram.ld`. No regressions observed.
   


-- 
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