nuttx/tools/ci
Xiang Xiao 2c9f91526a board: enable LTO on g431 nsh boards and fix LTO link with toolchain switch
For boards b-g431b-esc1/nsh, nucleo-g431kb/nsh and nucleo-g431rb/nsh,
the `.data` section of nuttx.elf overflows the 128 KB flash region by a
few hundred bytes on default GNU EABI builds:

    arm-none-eabi-ld: nuttx section `.data' will not fit in region `flash'
    arm-none-eabi-ld: region `flash' overflowed by 296 bytes

Enabling CONFIG_LTO_FULL=y in the corresponding defconfigs brings flash
usage back below the 128 KB limit (~93%).

Additionally, fix arch/arm/src/cmake/gcc.cmake so that when LTO is
enabled it always uses the gcc-ar / gcc-nm / gcc-ranlib wrappers, not
just when CONFIG_ARM_TOOLCHAIN_GNU_EABI is also set.  CI tooling (via
tools/testbuild.sh) configures cmake first, then flips the toolchain
choice in .config with kconfig-tweak before running `cmake --build`.
With the previous "ARM_TOOLCHAIN_GNU_EABI && !LTO_NONE" guard the
regen step would switch to plain `ar` for the .a files, even though the
linker driver picked at configure time is still arm-none-eabi-g++ and
the object files contain GCC LTO IR.  The result was a flood of
"undefined reference to `printf' / `free' / `puts' ..." link errors
when running tools/testbuild.sh -A -N -R on the *_CLANG variants.

Now that we are inside gcc.cmake the toolchain is unambiguously GCC,
so dropping the redundant CONFIG_ARM_TOOLCHAIN_GNU_EABI conjunct keeps
the LTO-aware ar wrappers in place across kconfig-tweak toolchain
switches.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-19 16:21:28 +08:00
..
docker/linux tools/ci: upgrade esptool on CI Dockerfile 2026-04-09 22:56:42 +08:00
platforms ci/platform: Fix the “Repository not found” error for kconfig-frontends 2026-05-17 07:44:48 +08:00
testlist board: enable LTO on g431 nsh boards and fix LTO link with toolchain switch 2026-05-19 16:21:28 +08:00
testrun style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
cibuild-oot.sh cmake: Remove unused BUILD_OOTCPP guard from configuration. 2025-10-17 17:06:46 -03:00
cibuild.ps1 tools/ci: Added CI system on Windows Native 2025-03-19 19:59:44 +08:00
cibuild.sh CI: Improved speed to build nuttx on MSYS2 job 2025-03-26 22:35:19 +08:00
cirun.sh tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
README.md CI: Migrate ci tooling from testing repository to main os repo 2021-04-05 01:22:48 -05:00

CI Tools

These are tools and data used for the CI system. Some of what is here may also be useful for local testing.