casaroli opened a new pull request, #21994: URL: https://github.com/apache/nuttx/pull/21994
## Summary The MemBrowse memory report tracks 9 targets, all flat builds. This PR adds four targets to `.github/membrowse-targets.json`: `mps2-an500:citest` (flat build), `mps2-an500:citest_protected` (protected build), `qemu-armv7a:citest` (flat build) and `qemu-armv7a:citest_knsh` (kernel build). These are the first protected and kernel builds that MemBrowse tracks. CI also runs the four configurations in QEMU with NTFC (#21972, #21974). The target names follow the board names of the existing targets, with the configuration name: `mps2-an500-citest`, `mps2-an500-citest-protected`, `qemu-armv7a-citest`, `qemu-armv7a-citest-knsh`. For the protected build and the kernel build, `elf` is the kernel image `nuttx`. `nuttx.map` is the link map of this image. In a kernel build, `make` builds only `nuttx`; the programs are built by `make export` and `make import`, which the report job does not do. The user image of the protected build (`nuttx_user.elf`) has no link map, and a target for it would build the same configuration a second time. `ld` gives the linker script of each build. `qemu-armv7a/scripts/dramboot.ld` uses `CONFIG_FLASH_SIZE` and other `CONFIG_` values, thus the entry gives the preprocessed `dramboot.ld.tmp`, as `esp32-devkitc` does (the job keeps the `.tmp` files). With the plain `dramboot.ld`, `membrowse report` stops with `Could not resolve memory regions after 3 iterations: RAM, ROM`. `mps2-an500/scripts/flash.ld` has no preprocessor lines and gives the same report as `flash.ld.tmp`. The protected kernel also links with `flash.ld` (the memory configuration in `nuttx.map` is `flash` and `sram1`). ## Impact CI only: four more `analyze` jobs in the MemBrowse workflow for each PR and each push to master (and four more targets for the onboard workflow). No change to any build or to the other targets. In the master run 44249638975, the 9 `analyze` jobs took 238 to 346 s each: 133 to 164 s for `docker pull`, 33 to 97 s for the build, 2 to 10 s for the analysis. The four new builds take 57 to 97 s (see Testing), thus each new job takes about 4.5 to 6 minutes. The jobs run in parallel with the others. ## Testing The steps of the `analyze` job, on an x86_64 Linux host in the CI image `ghcr.io/apache/nuttx/apache-nuttx-ci-linux` of 2026-11-18 (podman, 4 CPUs, a new container for each target, empty ccache): `./tools/configure.sh -l <board_config>`, the two `CONFIG_DEBUG_*` lines, `make olddefconfig`, the `sed` on the arch Makefiles, `make -j4`. nuttx master 508ec3d223d, nuttx-apps master 5c925768cbf. The host had other work (load average about 7 on 12 CPUs). | Target | Build time | text | data | bss | |---|---|---|---|---| | `mps2-an500-citest` | 57 s | 241384 | 1000 | 15264 | | `mps2-an500-citest-protected` (kernel `nuttx`) | 89 s | 114864 | 944 | 7432 | | `qemu-armv7a-citest` | 71 s | 527908 | 17684 | 19648 | | `qemu-armv7a-citest-knsh` (kernel `nuttx`) | 97 s | 155168 | 1352 | 15496 | All four builds pass. The `.tmp` linker scripts and `nuttx.map` are in the tree after the build. `membrowse report` 1.3.0 in local mode (no upload, no API key, no network) on each ELF with the `ld` and `map_file` of its entry: all four pass in 11 to 14 s and give the regions of the linker script, for example `flash` 242,384 bytes (5.8%) and `sram1` 16,260 bytes for `mps2-an500-citest`, `ROM` 156,992 bytes (15.0%) and `RAM` 16,376 bytes for `qemu-armv7a-citest-knsh`. With `ld` empty, the default regions do not include `.text`. `jq -c '.' .github/membrowse-targets.json` (as `load-targets` does) gives 13 targets with unique names. `tools/checkpatch.sh -c -u -m -g` passes. -- 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]
