Commit graph

2181 commits

Author SHA1 Message Date
dependabot[bot]
e280ecf732 build(deps): bump pillow from 11.0.0 to 12.2.0 in /tools/pynuttx
Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.0.0 to 12.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/11.0.0...12.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 14:50:49 +08:00
raul_chen
6574028920 arch/arm: add Realtek RTL8721Dx and RTL8720F (Ameba WHC) support
Add the ARM architecture-level support and build system for the Realtek
Ameba WHC (Wi-Fi Host Controller) dual-core SoCs:

  - RTL8721Dx (KM4 Cortex-M33 host + KM0 NP)
  - RTL8720F  (KM4TZ Cortex-M33 secure host + KM4NS NP)

New directories under arch/arm/src/:
  - common/ameba/   -- IC-agnostic glue (os_wrapper, netdev, KV store,
                       flash MTD, WHC Wi-Fi, SDK bootstrap)
  - rtl8721dx/      -- RTL8721Dx register-level drivers
  - rtl8720f/       -- RTL8720F register-level drivers

New directories under arch/arm/include/:
  - rtl8721dx/      -- RTL8721Dx IRQ and chip headers
  - rtl8720f/       -- RTL8720F IRQ and chip headers

Also includes tools/nxstyle.c white-list entries for the Realtek SDK
CamelCase symbols and tools/ameba/Config.mk for the make flash target.

Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-01 09:18:06 -03:00
Catalin Visinescu
9ec50ceb0d tools/nxstyle.c: Add symbols for drivers/crypto/pnt/pnt_se05x_api.c
This file does not build with minor modifications due to nxstyle issues.
Adding symbols to the white_content_list to address_this.

Testing: "gcc -o nxstyle nxstyle.c" builds fine.

Signed-off-by: Catalin Visinescu <catalin_visinescu@yahoo.com>
2026-06-30 03:28:39 +08:00
Michal Lenc
6e239036bc test_os.py: fix foopencookie test spellcheck
succesfull => successful

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-29 14:44:17 +02:00
Michal Lenc
93975f0817 ci: add stdbit.h test
Test stdbit functions in CI.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-29 14:44:17 +02:00
raiden00pl
e5a9e5e1aa ci/arm-13.dat: update targets
update arm-13.dat build targets so they match state before stm32 split

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-24 14:54:44 -03:00
raiden00pl
07c4bf0048 !arch/stm32: move stm32l1 and finalize the directory split
Move the stm32l1 sources, headers and boards into arch/arm/src/stm32l1,
arch/arm/include/stm32l1 and boards/arm/stm32l1, then finalize the split:
source each split family directly in arch/arm/Kconfig and boards/Kconfig and
remove the now-empty combined arch/arm/src/stm32 and boards/arm/stm32 trees.

BREAKING CHANGE: The legacy STM32 architecture and board paths were split into
stm32f1, stm32l1, stm32f2, stm32f3, stm32f4, and stm32g4 directories.
Out-of-tree boards must move from stm32 to the matching split family.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-06-24 14:54:44 -03:00
simbit18
96a4778d59 ci/testlist/sim-02.dat enabled sim:ft2232h_gpio
enabled sim:ft2232h_gpio

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-06-22 10:40:24 -03:00
simbit18
c43050ae80 ci/docker: fix No package 'libftdi1' found
libftdi1-dev has been moved to the correct stage in the Dockerfile

Fix
https://github.com/apache/nuttx/pull/18951#issuecomment-4708056829

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-06-22 10:40:24 -03:00
Alan Carvalho de Assis
33f5cf9525 ci/test: Remove FTDI from CI to avoid failure
Even after installing the ftdi library on CI it doesn't work to
compile the sim:ft2232h_gpio, so remove it from CI test.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-06-20 15:29:47 -03:00
Tiago Medicci Serrano
6d52766ea3 boards/risc-v/esp32p4: Enable NuttX Web Panel for ESP32-P4
This commit adds a defconfig for enabling the NuttX Web Panel on
ESP32-P4. It also create entries to automatically call the Web
panel application after system's boot up.

The `webpanel` is removed from regular ESP32-P4 CI testing because
it ships with Python and that would overload CI infrastructure.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-06-18 08:57:17 -03:00
Shoji Tokunaga
59a66fa17d tools: Enable Rust sim builds on Intel Macs
Add support for building Rust apps on the NuttX simulator running on
Intel (x86_64) macOS.

- Add tools/x86_64-unknown-nuttx-macho.json, a Mach-O Rust target for
  the macOS sim.
- Rust.defs: select the new x86_64 macho target for sim on macOS.
- boards/sim/.../Make.defs: keep the default PIC/PIE-compatible code
  generation on macOS by not adding -fno-pic/-mcmodel=medium.
- sethost.sh: enable CONFIG_HOST_X86_64 for non-arm64 hosts.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-06-08 21:22:45 +08:00
Serg Podtynnyi
b8cd0435b2 ci/docker: bump risc-v toolchain gcc14
Revert to latest gcc144 due libcxx incompability

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2026-06-04 08:25:40 +08:00
Serg Podtynnyi
20a50a48c5 ci/docker: bump risc-v toolchain
Bump risc-v toolchain to 15.2.0-1

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2026-06-03 12:27:08 +02:00
Arjav Patel
34e0663e2d tools/nxstyle: Whitelist Micro XRCE-DDS uxrCustomTransport prefix.
The Micro XRCE-DDS Client custom-transport API expects user
callbacks with prototypes of the form

  bool open_cb (struct uxrCustomTransport *transport);
  size_t read_cb(struct uxrCustomTransport *transport, ...);

The struct tag is fixed by the upstream public header
<uxr/client/profile/transport/custom/custom_transport.h> and
cannot be renamed. nxstyle currently flags every callback
signature in apps/system/microros/transport with 'Mixed case
identifier found'.

Add the 'uxrCustom' prefix to g_white_prefix, following the same
pattern used for the ROS 2 message type names added in
commit bc3a2596c8 ("tools/nxstyle: Whitelist ROS 2 message type
identifiers.").

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-06-01 09:56:23 +08:00
Shoji Tokunaga
3d446bd674 tools/rust: Move NuttX Rust target specs into nuttx
Move the NuttX-specific Rust target specification files from apps/tools
to nuttx/tools so files with the same purpose are kept in one place.

The existing aarch64 Mach-O target spec for macOS simulator builds
already lives under nuttx/tools. Keeping the remaining NuttX Rust target
specs there as well makes the layout consistent and lets both Make and
CMake builds refer to target specs from the NuttX tree.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-06-01 00:02:41 +08:00
Arjav Patel
bc3a2596c8 tools/nxstyle: Whitelist ROS 2 message type identifiers.
The ROS 2 C client API generates symbols via rosidl token-pasting
macros. Each message type ends up with a name of the form
<pkg>__msg__<Type>, and the bare type token (Int32, Float64, ...)
appears in user code as an argument to ROSIDL_GET_MSG_TYPE_SUPPORT().
Neither form can be renamed without breaking the public API.

Add the ROS 2 standard message package prefixes (std_msgs,
geometry_msgs, sensor_msgs, nav_msgs, builtin_interfaces,
rcl_interfaces) and the rosidl scalar type names (Int8/16/32/64,
UInt8/16/32/64, Float32/64) to g_white_prefix so nxstyle does not
flag the resulting mixed-case identifiers in apps that consume
micro-ROS via apps/system/microros.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
2026-05-31 11:46:18 +08:00
Alan Carvalho de Assis
e256e50e5e nuttx/ci: Add libftdi1-dev to get FT2232H working on CI
This commit is needed to get PR #18951 passing on CI test.
I think this USB Device could be used in the future to do
real hardware tests, including automated tests on our CI.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-05-29 18:05:07 -03:00
Shoji Tokunaga
7c38d58675 tools/rust: Fix aarch64 NuttX Rust target specs
Add a custom aarch64 Mach-O Rust target for macOS sim builds and use it
instead of an Apple Darwin Rust target. This keeps Rust cfg values aligned
with NuttX while producing Mach-O objects required by the simulator link.

Also align sim host handling for aarch64 Linux by detecting `aarch64` as
`HOST_ARM64` and avoiding x86-specific `-mcmodel` and `-no-pie` options
on ARM64 hosts.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-29 10:25:10 +02:00
Eren Terzioglu
be257fb910 tools/espressif: Add UF2 output support
Add UF2 file output support for Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-05-27 14:29:35 -04:00
Lup Yuen Lee
c2de12153f Dockerfile & Docs: Change bitbucket.org/nuttx/tools to github.com
The repo bitbucket.org/nuttx/tools is no longer available. This PR changes it to to github.com/patacongo/tools, as explained in https://github.com/apache/nuttx/pull/18890. This PR updates the URL in Dockerfile and Docs.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-05-25 08:34:45 -03:00
simbit18
45fbb41a05 ci/platforms/ubuntu.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
81c48957ee ci/platforms/linux.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
84949a2882 ci/platforms/darwin_arm64.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
simbit18
054fc2a1b5 ci/platforms/darwin.sh: Updated URL of kconfig-frontends src
- New Url https://github.com/patacongo/tools.git

   https://github.com/apache/nuttx/pull/18883#issuecomment-4467204640

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-24 07:17:16 +08:00
Tiago Medicci Serrano
11cf7c13c0 tools/ci/testlist: Remove ESP32-P4 python defconfig from regular CI
Remove `esp32p4-function-ev-board:python` defconfig from being
built for the regular CI pipelines to avoid overloading it.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-05-23 09:35:16 -03:00
Filipe Cavalcanti
ec9a849e15 tools: add build path support on host_info tool
Adds a build_path argument for when CMake builds are used.
This solves a problem when building the nxdiag tool with CMake.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-05-20 13:12:38 -04:00
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
ImBonkers
be30590504 arch/arm/stm32n6: Add STM32N6 chip support.
Introduce minimal chip support for the STMicro STM32N6 family
(Cortex-M55, ARMv8.1-M with TrustZone and FPU), sufficient to bring
up an NSH console over USART1.

Scope (deliberately minimal first drop):

  - Chip selector ARCH_CHIP_STM32N6 wired into arch/arm/Kconfig and
    chip-name mapping ("stm32n6").
  - Sub-Kconfig under arch/arm/src/stm32n6 with the STM32N657X0 chip
    selector and a single user-selectable USART (USART1).
  - Boot path: stm32_start with a naked dispatcher that clears the
    boot-ROM MSPLIM/PSPLIM stack limits before any compiler-emitted
    prologue, then runs vector relocation and SRAM-only heap init.
    The chip runs entirely in the Secure state; SAU is left in its
    reset configuration.
  - PLL1-based clock tree fed from HSI64 targeting 200 MHz CPU, with
    USART1 kernel-clock routed to HSI for a predictable BRR that is
    independent of any later clock change.
  - Low-level USART driver with full serial framework support.
    stm32_serial.c is adapted from arch/arm/src/stm32h5/stm32_serial.c
    (sibling ARMv8-M Mainline port with the same USART IP), stripped
    of DMA-RX, LPUART, the per-USART2..5 plumbing, RS-485 driver-enable,
    TIOCSINVERT/SWAP and HALFDUPLEX paths.
  - SysTick system timer.
  - GPIO, PWR and RCC helpers.

TrustZone, MPU, I/D-cache and Helium (MVE) are left disabled to
minimise bring-up surface; these will be added in follow-up patches
alongside the drivers that need them.

Signed-off-by: ImBonkers <samuelnlinden@pm.me>
2026-05-18 14:50:29 -03:00
Agnimitra sasaru
7a04cddb78 build: clean previous compiled files after menuconfig updates
Fixes #16151. Compares .config state before and after kconfig-mconf and triggers 'make clean' if the configuration was modified to prevent orphaned object files.

Signed-off-by: Agnimitra sasaru <158492301+HyphenAlpha456@users.noreply.github.com>
2026-05-18 22:00:05 +08:00
Jiri Vlasak
f8289b2e29 tools: Update note about first line of a block
When checking the first line of a block, the returned value is
incremented by one.

This commit updates doc to explain why.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2026-05-18 21:53:54 +08:00
Liam Hickey
13ba91a33f arch/*/src/Makefile: Avoid uncessary relinking of the nuttx binary.
The goal is to only execute recipes when there is an actual change in
the prerequisites.

There are several issues which cause the nuttx binary target to be
re-made every time the top level make is run.

1. Previously the target nuttx$(EXEEXT), was used, but make resolved
this in the relative directory make -C $(ARCH_SRC), and couldn’t find
it (need an absolute path: `$(TOPDIR)/..).

2. The .tmp prerequisite for nuttx was always deleted

3. libboard's recipe had a sub-make which may or may not update that
target. This was a phony target, and was therefore always considered out
of date.

These issues were causing the nuttx recipe to be run every make, which
was hiding some missing prerequisites:

1. the .config is a prerequisite for the .tmp target
2. libapps.a (and other linklibs) are pre-requisites for nuttx

Changes:

The changes are only in the build system, and only for arm.

Track nuttx$(EXEEXT) via vpath so Make knows when it's already up to
date without an explicit path. Add $(TOPDIR)/.config as a dependency
to the linker script preprocessing so config changes trigger
re-preprocessing.

Keep the .tmp linker script on disk (clean already removes it) so
timestamp-based dependency checking works across builds. These .tmp
files need to be added to the gitignore or the CI will complain.

Use FORCE pattern for board/libboard to ensure it's always checked
but use the actual library file as the link dependency so nuttx is
only re-linked when library content changes. Add staging libs as
dependency to nuttx link rule so changed app libs trigger re-link.

Signed-off-by: Liam Hickey <williamhickey@geotab.com>
2026-05-18 09:33:58 +02:00
simbit18
6f46d0e932 ci/platform: Fix the “Repository not found” error for kconfig-frontends
MSYS2
Fix
Repository not found
https://bitbucket.org/nuttx/tools.git

Now use URL https://github.com/patacongo/tools

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-05-17 07:44:48 +08:00
Daniel Fanache
8b988e8bd9 tools/Config.mk: eval compiler include-prefix detection only once
Three `export VAR ?= $(shell ...)` assignments cause GNU make to
re-run the embedded ${shell ...} every time the variable is exported
to a recipe's environment.  That spawns `tools/incdir` and
`tools/define` once per recipe, serialised through the master make
thread, which adds per recipe overhead to multi-job builds.

Wrap each with `ifeq ($(origin VAR),undefined)` + `:=` so the shell
call runs once at parse time while preserving the override semantics
of `?=`.

Measured impact on a 20-core build host is a ~26% speedup of wall
time.

Signed-off-by: Daniel Fanache <dan@rts.ro>
2026-05-12 16:34:52 +08:00
Serg Podtynnyi
9c1b2e12ce tools:mksyscall fix compilation warning
mksyscall.c:145:19: warning: initialization discards ‘const’ qualifier
from pointer target type [-Wdiscarded-qualifiers]
  145 |   char *pactual = strchr(arg, '|');
      |                   ^~~~~~
Change to use const char* on pointers

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2026-05-09 09:42:58 +08:00
Peter Bee
7771cbd0d0 sim: fix mkallsyms for Objective-C symbols on macOS
/Library/Developer/CommandLineTools/usr/bin/c++filt: error: unknown argument '-['

Signed-off-by: Peter Bee <bijunda@bytedance.com>
2026-05-08 19:51:39 +08:00
simbit18
9035fba275 ci/testlist/risc-v-02.dat: Added boards build with CMake
-  Boards build by CMake

    esp32c3-xiao

    esp32-c3-zero

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
simbit18
ce7326bf14 testbuild.sh: CMake Added -DNXTMPDIR
- It is now possible to create folder for third-party packages in CMake as well. (Aligned with Make)

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
Lup Yuen Lee
3e570aa219 CI: Remove corrupted downloads for build retry
We have implemented CI Build Retry for mitigating Download Failures. But right now it will reuse any Corrupted Downloads (instead of deleting them), which will cause CI Build Retry to fail repeatedly: https://github.com/apache/nuttx/actions/runs/24611381081/job/71966407518#step:10:627

```
Ignored files: system/argtable3/v3.2.0.7402e6e.tar.gz
gzip: stdin: not in gzip format
make[3]: *** [Makefile:76: argtable3] Error 2
```

This PR proposes to change `git clean -fd` to `git clean -xfdq`. This will remove any Corrupted Downloads, preventing their reuse for CI Build Retry:

```bash
## Simulate a corrupted download for argtable3
$ tools/configure.sh qemu-armv8a/netnsh
$ Downloading v3.2.0.7402e6e.tar.gz--argtable3
## Press Ctrl-C to stop the build

## `git clean -fd` won't remove the corrupted download
$ cd ../apps
$ git clean -fd
$ find . -name "v3.2.0.7402e6e.tar.gz"
./system/argtable3/v3.2.0.7402e6e.tar.gz

## `git clean -xfdq` removes the corrupted download
$ git clean -xfdq
$ find . -name "v3.2.0.7402e6e.tar.gz"
## Corrupted download is deleted correctly
```

`git clean -xfdq` is also found in the same testbuild script, so we are using it consistently:

12e8f92a28/tools/testbuild.sh (L286-L291)

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-19 14:21:58 +08:00
simbit18
de87075134 tools/CMakeLists.txt: Add mkpasswd binaries
- Add mkpasswd binaries

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-16 01:45:48 +08:00
Lup Yuen Lee
12e8f92a28 CI: Retry build upon failure
In Jan-Feb 2026: NuttX CI hit a [record high usage of GitHub Runners](https://github.com/apache/nuttx/issues/17914), exceeding the limit enforced by ASF Infrastructure Team. We analysed the PRs and discovered that most GitHub Runners were wasted on __(1) Failure to Download the Build Dependencies__ for DTC Device Tree, OpenAMP Messaging, MicroADB Debugger, MCUBoot Bootloader, NimBLE Bluetooth, etc __(2) Resubmitting PR Commits__:

- [Video: Analysing the Most Expensive PR](https://youtu.be/swFaxaTCEQg)
- [Video: Second Most Expensive PR](https://youtu.be/uSpQkzBogEw)
- [Video: Third Most Expensive PR](https://youtu.be/J7w1gyjwZ1w)
- [Video: Most Expensive Apps PR](https://youtu.be/182h8cRpfvI)
- [Spreadsheet: Most Expensive PRs](https://docs.google.com/spreadsheets/d/1HY7fIZzd_fs3QPyA0TX7vsYOjL86m1fNOf1Wls93luI/edit?gid=70515654#gid=70515654)

Why would __Download Failures__ waste GitHub Runners? That's because Download Failures will terminate the Entire CI Build (across All CI Jobs), requiring a restart of the CI Build. And the CI Build isn't terminated immediately upon failure: NuttX CI waits for the CI Job to complete (e.g. arm-01), before terminating the CI Build. Which means that CI Builds can get terminated 2.5 hours into the CI Build, wasting 2.5 elapsed hours x [7.4 parallel processes](https://lupyuen.org/articles/ci3#live-metric-for-full-time-runners) of GitHub Runners.

This PR proposes to __Retry the Build for Each CI Target__. NuttX CI shall rebuild each CI Target (e.g. `sim:nsh`), upon failure, up to 3 times (total 4 builds). Each rebuild will be attempted after a Randomised Delay with Exponential
Backoff, initially set to 60 seconds, then 120 seconds, 240 seconds. The rebuilds will mitigate the effects of Intermittent Download Failures that occur in GitHub Actions. (And eliminate developer frustration)

If the build fails after 3 retries: Subsequent CI Targets will __not be allowed to rebuild__ upon failure. This is to prevent cascading build failures from overloading GitHub Actions, and consuming too many GitHub Runners.

Note that NuttX CI shall retry the build for __Any Kind of Build Failure__, including Download Failures, Compile Errors and Config Errors. We designed it simplistically due to our current constraints: (1) Lack of CI Expertise (2) NuttX CI is Mission Critical (3) Legacy CI Scripts are Highly Complex. To prevent Compile Errors and Config Errors: We expect NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before submitting to NuttX.

What about __Resubmitting PR Commits__ and its wastage of GitHub Runners? We also require NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before resubmitting to NuttX. GitHub Runners will then be charged to the developer's quota, without affecting the GitHub Runners quota for Apache NuttX Project. We plan to [Kill All CI Jobs](https://youtu.be/182h8cRpfvI?si=MmAuwLISZPPMoqDq&t=1479) for PRs that have been switched to Draft Mode. We'll monitor this through the [NuttX Build Monitor](https://github.com/apache/nuttx/issues/18659).

Modified Files:

`tools/testbuild.sh`: We introduce a New Wrapper Function `retrytest` that will call the Existing Function `dotest`, to build the CI Target and retry on error.

`Documentation/components/tools/testbuild.rst`: Updated the `testbuild.sh` doc with the Retry Logic.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-15 12:30:17 +02:00
simbit18
9fd11a01d5 tools/Unix.mk: fix Untracked files defconfig.tmp-e on macOS
fix

On branch fix_sim_mac
Your branch is up to date with 'origin/fix_sim_mac'.

Untracked files:
	defconfig.tmp-e

nothing added to commit but untracked files present

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-15 17:10:22 +08:00
Abhishek Mishra
ab6b1fd6f9 !build: add build-time password generation with mkpasswd tool.
Introduce mkpasswd, a pure-C host tool for generating encrypted password
files at build time using TEA encryption. This enables secure,
credential-free firmware images while allowing build-time password
configuration.

Changes:
* Add mkpasswd.c host tool for TEA-based password hashing and encryption
* Integrate mkpasswd into Make build system (tools/Makefile.host)
* Add CMake support for mkpasswd compilation and ROMFS passwd generation
* Add CONFIG_BOARD_ETC_ROMFS_PASSWD_* configuration options to Kconfig
* Implement credential exclusion from defconfig to prevent password leaking
* Update savedefconfig.cmake to strip sensitive credentials
* Fix mkdir() portability for Windows Native builds (CONFIG_WINDOWS_NATIVE)
* Change default username from "admin" to "root" (POSIX convention)
* Improve build-failure error message with full menuconfig navigation path

BREAKING CHANGE: Boards enabling CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE
must set CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD to a non-empty string
of at least 8 characters. The build now fails with an explicit error if
this config is left empty. To fix: run 'make menuconfig' and navigate to:
  Board Selection --->
    Auto-generate /etc/passwd at build time --->
      Admin password

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-04-14 16:06:30 +08:00
simbit18
944ba20a69 tools/ci: Added esptool for Windows Native
- Added esptool for Windows Native

- Added build for esp32-c3-zero

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-13 23:55:10 +08:00
simbit18
f20084225e ci/platforms/linux.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18
c585e97a1b ci/platforms/ubuntu.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18
f8621bc0a1 ci/platforms/darwin_arm64.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
simbit18
8500421d97 ci/platforms/darwin.sh: bump Espressif esptool
- Bump Espressif esptool 5.2.0

   #18696

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-10 14:34:28 -03:00
Filipe Cavalcanti
46d2b59666 tools/ci: upgrade esptool on CI Dockerfile
Upgrades esptool from v4.8.dev4 to v5.2.0, enabling support for newer chips.
Also adds 'upgrade pip' to allow this upgrade.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-09 22:56:42 +08:00
zhangyuan29
895a9423ee tools/mksyscall: fix union illegal type for cast
Some compilers (e.g., Tasking) do not allow forced type casting of
unions. When CONFIG_ARCH_TOOLCHAIN_TASKING is enabled, replace the
direct cast with memcpy to copy the union parameter into a local
variable, avoiding the illegal cast while preserving the correct
behavior. Other compilers still use the original cast approach.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-08 18:38:39 +08:00