Commit graph

2203 commits

Author SHA1 Message Date
dechao_gong
a85db6d28f arch/arm/rtl8721f: bring up minimal NSH (P1)
Wire the RTL8721F km4tz core up to a working NuttShell:

- irq.h: renumber the KM4TZ external vector table to the RTL8721F
  APIRQn map (UART_LOG=24, IPC=5, +GPIOB/C, TIMER7/8, ...).
- ameba_loguart.c: fix the LOG-UART base to 0x40810000.  The former
  0x401C6000 belongs to a different Ameba part; the wrong base bus-
  faulted on the RX interrupt-enable write while TX still worked
  (LOGUART_PutChar uses its own ROM-internal base).
- ameba_app_start.c: adjust the MPU read-only / RAM regions for the
  RTL8721F memory map and seed the RTC on first power-on so the
  SDM32K-clocked SYSTIMER comes up (mirrors the SDK app_rtc_init).
- ameba_ipc.c: move the km4tz<->km4ns IPC to APIRQn 5 (IPC_CPU0).
- ameba_board.mk: pull in fwlib ameba_rtc.c for the RTC_* symbols.
- defconfig: RTL8721F RAM map, enable TIMER/TIMER_ARCH/ARMV8M_SYSTICK
  for a live system tick, and drop the WiFi/NET stack for now.
- scripts/Make.defs: use the RTL8721F_NOR flash profile.

Boots cleanly to nsh> on hardware; tick, RX and builtin apps verified.

Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
2026-07-30 17:04:14 +08:00
Marco Casaroli
df107380ad boards/rp23xx: Split the xipfs configuration into xipfs and xipfs-nxflat.
The xipfs configuration enabled CONFIG_NXFLAT and the nxflatxip example,
whose build runs mknxflat to generate the module thunk.  The NXFLAT tools
are not installed in the CI container, so every CI build of this
configuration failed with "mknxflat: command not found".

* xipfs keeps the file system, the xipfs command and the test suite.  It
  builds with a plain toolchain, so CI still covers the file system code.
* xipfs-nxflat adds CONFIG_NXFLAT and CONFIG_EXAMPLES_NXFLATXIP and is
  excluded from the CI build list, the same treatment the other NXFLAT
  configurations already get (eagle100:nxflat, lm3s6965-ek:qemu-nxflat,
  olimex-lpc1766stk:thttpd-nxflat).

Impact: CI and board configurations only.  No source or runtime change.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-07-29 07:49:03 -03:00
Alan Carvalho de Assis
c027e7c3e4 tools: fix stale archive members surviving a Kconfig-driven CSRCS change
During the Toybox port to NuttX, Claude noticed that changes in the
menuconfig weren't taking affect. This issue exists for a long time on
NuttX, in fact BayLibre's presentation from 2017 make jokes about our
building system not been reliable:
https://www.youtube.com/watch?v=XUJK2htXxKw&t=320s

Stale archive members from $(AR)'s additive-only behavior can linger
after Kconfig toggles change which files provide a symbol, causing dead
weight or "multiple definition" link errors on incremental builds.
Fixed by splitting ARCHIVE into two macros: ARCHIVE keeps the original
additive behavior for apps/libapps.a, which many independent
subdirectories contribute to across a build, while the new
ARCHIVE_REBUILD deletes then archives for the far more common case
of a single Makefile building its own self-contained $(OBJS)
- all 39 such call sites now use it.

Assisted-By: Claude Sonnet 5
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-07-28 21:26:03 -03:00
Marco Casaroli
1f166a970e tools/mkallsyms.py: let the dependency error actually reach the user
mkallsyms.py prints "Please execute the following command to install
dependencies: pip install pyelftools cxxfilt" and then calls
os._exit(errno.EINVAL).  os._exit() terminates without flushing stdio, so
when stdout is a pipe -- which it always is under make -- the message sits in
the buffer and is discarded.  What the developer sees is:

  make[1]: *** [Makefile:65: nuttx] Error 22

with no indication of the cause anywhere in the build output.  Error 22 is
just errno.EINVAL leaking out as an exit status.  The same applies to
usage(), which exits ENOENT the same way.

Use sys.exit() in both places, which raises SystemExit and lets the
interpreter flush on the way out.  Nothing else changes:  the exit statuses
are the same, and os is no longer referenced, so the import goes too.

Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 01:37:36 +08:00
raiden00pl
a4a12b1cd4 tools/nxstyle: add a script to check a whole tree at once
nxstyle checks one file per invocation.  nxstyle_sweep.sh runs it over
the directories given, or the whole repository, and collects what it
reports.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-07-28 02:43:24 +08:00
dechao_gong
f8d6160022 arch/arm/rtl8721dx: add shared Ameba UART driver.
Add a shared Ameba high-speed UART driver on top of the GPIO driver's
common/ameba/ infrastructure, exposing UART0/UART1 through the NuttX
serial upper half.

- arch/arm/src/common/ameba/ameba_uart.c/.h: serial lower-half driver
  built on the SDK fwlib UART register layer (ROM symbol table).  RX/TX
  dispatch through NuttX-native interrupts; TERMIOS get/set supported.
  The pins are muxed to the direction-specific UART crossbar function
  codes (TXD/RXD per controller) required by the amebadplus pinmux, and
  RX is pulled high through the SDK ROM.
- arch/arm/src/common/ameba/Kconfig: AMEBA_UART option (selects SERIAL
  and ARCH_HAVE_SERIAL_TERMIOS) plus RX/TX buffer-size knobs.
- arch/arm/src/rtl8721dx: wire ameba_uart.c into the Make/CMake builds
  and pull the fwlib ram_common UART table into the fwlib link set.
- boards/arm/rtl8721dx/pke8721daf: board UART port table registering
  UART0 at /dev/ttyS1 (PB18/PB19, 115200), bring-up hook, and a uart
  NSH config with the serialrx/serialblaster examples.
- Documentation: describe the driver and the uart board config.

Verified on hardware (PKE8721DAF): pinmux routing, TX/RX and interrupt
paths, and the TERMIOS ioctl path via loopback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
2026-07-27 09:31:37 -03:00
dependabot[bot]
840df9ca91 build(deps): bump pillow from 12.2.0 to 12.3.0 in /tools/pynuttx
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.2.0 to 12.3.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/12.2.0...12.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-22 11:35:43 +08:00
Abhishek Mishra
4761f15b3e !tools/mkpasswd: PBKDF2 host tool and ROMFS passwd build integration
Add standalone host PBKDF2-HMAC-SHA256 mkpasswd, board_romfs_mkpasswd.sh,
and promptpasswd.sh with confirm-password support. Integrate ROMFS passwd
generation in Board.mk and CMake. Drop TEA key checks from passwd_keys.mk.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-07-21 20:19:14 +08:00
dechao_gong
e2ff8be900 arch/arm/rtl8721dx: add shared Ameba GPIO driver.
Add a board-agnostic GPIO driver for Realtek Ameba chips, exposing pins
through the NuttX GPIO (ioexpander) upper half at /dev/gpioN.

- arch/arm/src/common/ameba/ameba_gpio.{c,h}: the shared driver, sitting
  directly on the SDK fwlib register layer.  The fwlib GPIO API it calls
  resolves at link time from the on-chip ROM symbol table, except
  GPIO_INTStatusGet/ClearEdge which are not in ROM and are compiled in
  from fwlib ram_common/ameba_gpio.c (that object also carries GPIO_Init,
  harmlessly overriding the equivalent ROM copy).  Pin interrupts are
  dispatched NuttX-natively: the port's NVIC vector is owned by NuttX
  via irq_attach, and the ISR reads and clears status through the fwlib
  GPIO_INTStatus* helpers.
- The driver keeps nothing IC-specific: the port count, the per-port
  NVIC vectors and the RCC gate bits come from a per-chip
  <ameba_gpio_chip.h> resolved on the include path, so bringing up a new
  Ameba chip only adds that header, not a change to the shared driver.
- arch/arm/src/common/ameba/Kconfig: a shared "Ameba Peripheral Support"
  menu with the AMEBA_GPIO option, sourced by each Ameba chip's Kconfig so
  it is reused across ICs (RTL8721Dx, RTL8720F, ...).
- arch/arm/src/rtl8721dx: provide ameba_gpio_chip.h, wire the driver into
  both the Make/Kconfig and CMake builds, and compile the fwlib
  ameba_gpio.c register layer into libameba_fwlib for the RTL8721Dx.
- boards/arm/rtl8721dx/pke8721daf: board pin table (rtl8721dx_gpio.c),
  bring-up registration, and a standalone gpio defconfig.
- Documentation: describe the gpio configuration and pin encoding.

tools/nxstyle: whitelist the Ameba "GPIO_" SDK ROM symbol prefix (alongside
the existing FLASH_/IPC_/... Ameba prefixes) so the vendor GPIO API's mixed-case
identifiers do not trip nxstyle, matching how the other Ameba SDK prefixes are
handled.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
2026-07-21 08:34:05 +02:00
Filipe Cavalcanti
5d4f776cdc ci: exclude esp32p5-tab5:python from CI
Ignores Python defconfig from esp32p4-tab5 board.
Python builds are excluded due to its long build time.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-07-20 20:56:30 -03:00
Ansh Rai
522ae4cb3f tools/Zig.defs: Fix Zig builds on sim:x86_64
Building Zig applications on sim:x86_64 with Zig 0.13.0 fails because
the generated target "x86_64-freestanding-sysv" is not recognized by
Zig. Introduce a Zig-specific ABI mapping that translates "sysv" to
"gnu" without affecting other toolchains.

After correcting the target ABI, linking still fails due to unresolved
references to __zig_probe_stack. Add -fcompiler-rt so Zig includes the
required compiler runtime during linking.

Verified on sim:nsh with CONFIG_EXAMPLES_HELLO_ZIG=y:

  nsh> hello_zig
  [sim]: Hello, Zig!

Fixes #19475

Signed-off-by: Ansh Rai <anshrai331@gmail.com>
2026-07-20 09:36:56 +08:00
Alan C. Assis
90c9ae5680 tools/uncrustify: Update uncrustify for better support
When porting external projects to NuttX using uncrustify could help
to convert "alien code" (maybe we are the aliens) to NuttX coding
style.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Hermes Agent using Deepseek-4-pro
2026-07-17 15:00:06 -03:00
raul_chen
84106b9152 arch/arm/ameba: resolve the asdk toolchain per-IC
Each ameba IC pins its asdk (arm-none-eabi) version in the SDK
(component/soc/<soc>/project/CMakeLists.txt): RTL8720F needs 12.3.1 while
RTL8721Dx needs 10.3.1.  Both share the same arm-none-eabi triple and differ
only by install directory.  The make + cmake setup previously read only the
global default, so the NuttX objects for an IC pinning a newer asdk were built
with the wrong compiler (not the one its SDK archives were built with).

Resolve the version per-IC from a single helper (ameba_asdk_version.sh, keyed
by the SoC) used by every caller:
  - toolchain.mk / ameba_board.mk: make picks the right asdk automatically
    (it already knows the SoC), no user action.
  - ameba_fetch_toolchain.sh: fetches the version the SoC pins.
  - tools/ameba/env.sh: takes an optional board (`. tools/ameba/env.sh
    <board>`) so cmake, which locks the compiler at project() time, gets the
    matching asdk on PATH before it probes.  No board -> the global default.
  - ameba_sdk.cmake: fail configure with a fix-it message if the on-PATH
    compiler is not the version this IC needs (e.g. a stale env from another
    board), instead of silently mis-compiling.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-17 08:30:47 -03:00
raul_chen
541e9d13a2 arch/arm/ameba: add CMake build support for RTL8721Dx and RTL8720F
Both Ameba WHC boards (pke8721daf, rtl8720f_evb) previously built only via the
make build; the board CMakeLists fell back to a FATAL_ERROR.  Wire up the full
vendor-SDK machinery for CMake so `cmake --build` produces the same flashable
nuttx.bin as make, with no change to any shared/arch-common file:

  - tools/ameba/env.sh: source it once before cmake.  It resolves/auto-fetches
    the ameba-rtos SDK + its pinned asdk toolchain (reusing the same helper
    scripts the make build uses) and puts the toolchain on PATH, so cmake's
    normal compiler probe finds it -- exactly like every other NuttX board's
    toolchain.  No per-chip hook is added to the shared arch Toolchain.cmake.
  - common/ameba/cmake/ameba_sdk.cmake: resolve AMEBA_SDK + asdk dir from that
    environment (fall back to the in-tree checkout) and sanity-check the
    compiler; included by each arch chip CMakeLists before its SDK-relative
    source lists.
  - common/ameba/cmake/ameba_board.cmake: the shared mechanism -- autoconf,
    libameba_fwlib.a / libameba_wifi.a compiled with the isolated SDK include
    set, the image2 linker script, the image2 link flags + EXTRA_LIBS, nuttx.bin
    packaging and the flash target.  Per-IC inputs are set by each arch chip
    CMakeLists.
  - common/ameba/tools/{ameba_gen_ldscript,ameba_package,ameba_flash}.sh:
    shared shell steps used by both the make and cmake paths so the two produce
    identical output; tools/ameba/Config.mk now flashes via ameba_flash.sh too.
  - Fix a latent rtl8720f CMakeLists source list bug (ameba_ipc.c was missing
    for the WiFi / flash-fs configs).

The make build is unchanged (it still auto-fetches everything, so sourcing
env.sh is optional there and required only for cmake).  Verified on hardware:
both boards build, flash and boot with WiFi over the CMake path.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-17 08:30:47 -03:00
raul_chen
e0373cc39d arch/arm/ameba: cache SDK config, add ameba_menuconfig, silence vendor warning
The NP and bootloader images are built from the vendored ameba-rtos SDK.
Rework how that sub-build is configured and driven:

- Materialize the SDK menuconfig once, guarded by a stamp (SDK revision +
  board overlay).  A no-change rebuild no longer rewrites the SDK .config, so
  the SDK stops reconfiguring and recompiling most of the NP image every time;
  only the AP-driven "noused" file is regenerated.  (ameba_sdk_config.sh)
- Configure the SDK from 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, always applied last and re-applied after an
  edit), so options that must stay fixed cannot be overridden.
- Add "make ameba_menuconfig": edit the SDK options in the SDK's own native
  menuconfig UI and save the diff back to the board overlay.
- Silence -Wint-conversion for the vendored SDK sources (both the NuttX fwlib
  compile and the SDK NP/boot build): the SDK passes NULL to irq_register()'s
  u32 "Data" argument in many places; the warning is suppressed for vendor
  code instead of editing every call site.

Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-16 12:11:19 -04:00
Jorge Guzman
26ec938064 risc-v/gd32vw55x: add GigaDevice GD32VW553 port (Wi-Fi 6)
New RISC-V chip port for the GigaDevice GD32VW55x (Nuclei N307, Wi-Fi 6
and BLE 5.3 combo), with the GD32VW553K-START board.

Core:
- ECLIC interrupt controller, clock tree (160 MHz / 40 MHz HXTAL),
  64-bit machine timer, serial (USART0/UART1/UART2) and RTC.
- The instruction cache must be enabled in head.S or the UART drops
  characters under load; the mask ROM uses the first 0x200 bytes of SRAM
  so the image is linked at 0x20000200; the RTC needs PMU_CTL0.BKPWEN or
  the register writes are silently discarded.
- The ECLIC only auto-clears the interrupt pending bit in hardware-vectored
  mode, so the trap dispatch clears it for edge-triggered sources or they
  re-fire forever (level-triggered peripherals clear their own).

Peripherals: DMA (8 channels), GPIO + EXTI, SPI (optional DMA), I2C0/I2C1
(the new STM32-v2-style IP, not the GD32F4 one), ADC, PWM and input
capture on the timers, both watchdogs, PROGMEM, TRNG and CRC.  All use
the standard NuttX lower-half interfaces and direct register access, not
the vendor SPL.  Three user LEDs (GPIOC), and a software reset through the
Nuclei SysTimer.

Internal flash: it is a system-in-package NOR die behind the real-time
decryption block, so it is not programmed through the FMC registers -- the
driver goes through the mask ROM API (rom_flash_*), the same way the
vendor code does.  PROGMEM can be mounted as LittleFS; the region sits
below the Wi-Fi NVDS and must not overlap it.

Wi-Fi (wlan0), station and softAP:
- The MAC/PHY, RF and WPA supplicant are linked as prebuilt BSD-3
  libraries.  They are RTOS-agnostic, so the OS binding is a sys_* facade
  on NuttX primitives (gdwifi/wrapper_nuttx.c).  Critical sections mask by
  ECLIC priority threshold, not by disabling every interrupt, or the MAC
  misses its microsecond deadlines.
- The lwIP stack of the SDK is not used: the interface is a
  netdev_lowerhalf driver driven by the standard tools (wapi, ifup, renew,
  ping, dhcpd).  EAPOL is handed to the supplicant instead of the IP
  stack.  The lowerhalf "priority" field is the work-queue id (HPWORK/
  LPWORK), not a task priority -- a wrong value makes receive() never run
  and every packet is dropped.
- The vendor gives the radio 32 KB of shared SRAM as an extra heap; this
  needs CONFIG_MM_REGIONS >= 2 or the kernel silently drops the region.
- The DHCP client needs CONFIG_NETUTILS_DHCPC_BOOTP_FLAGS=0x8000 so the
  server answers the OFFER by broadcast.
- softAP (wapi master mode -> wifi_management_ap_start): the single-VIF
  firmware does station or AP at a time.  Use WPA2, not WPA3: the SAE
  handshake is deep on the stack and overflows the elliptic-curve crypto
  with the default task stacks, so the Wi-Fi configs raise
  CONFIG_INIT_STACKSIZE/DEFAULT_TASK_STACKSIZE.

Vendor SDK: cloned by the build at "context" time, pinned to a validated
commit and patched in place -- so CI can build with nothing preinstalled,
the same pattern as esp-hal-3rdparty.  The prebuilt libraries are built
for the hard-float ilp32f ABI.

BLE 5.3, marked EXPERIMENTAL and off by default: the prebuilt libble is an
all-in-one controller plus RivieraWaves host (GAP/GATT/SMP inside the blob)
with no HCI transport, so the port drives the vendor host directly
(ble_adp_*, ble_adv_*, ble_gap_*) instead of registering a bt_driver_s.
The SDK's radio interrupt handlers must be attached to the NuttX IRQ table
(they are reached through the ECLIC hardware vector table in the vendor
build); attaching also keeps --gc-sections from dropping them.  It ships
with no configuration; enabling it advertises as "NuttX", connectable.

Boards: gd32vw553k-start with nsh, wapi, sta_softap, periph and littlefs
configurations, and the board added to the CI build list.

Tested on hardware (GD32VW553K-START): NSH, the peripheral drivers
(TRNG entropy and the LEDs exercised), LittleFS (write, read, survives a
reboot), the full Wi-Fi station path (scan, WPA2, DHCP, ping to the
internet), the softAP (a client associates with WPA2, gets an address
from the board's DHCP server, and pings the board), and BLE (advertises as
"NuttX"; a central connects and enumerates the GATT database).

Assisted-by: Claude Opus 4.8
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-07-16 10:03:16 -03:00
simbit18
29c5ae62ad ci/platforms/darwin.sh: fix genromfs installation
fix
Error: Refusing to load formula px4/px4/genromfs from untrusted tap px4/px4.
Run `brew trust --formula px4/px4/genromfs` or `brew trust px4/px4` to trust it.
Error: Process completed with exit code 1.

Homebrew 6.0+ refuses to load formulae from third-party taps unless they
are explicitly trusted ("Refusing to load formula ... from untrusted tap").
Trust each tap non-interactively before installing from it. Without this,
`brew install` aborts before pouring any package (including ccache).
`brew trust` only exists on Homebrew 6.0+; guard it so older versions,
which don't gate untrusted taps, skip it silently.

50161b1f09/Tools/setup/macos.sh (L54-L64)

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-07-12 22:21:24 +02:00
raul_chen
31caf8497b boards/arm: Ameba produce nuttx.bin and derive flash offsets from the SDK layout
Rework the RTL8721Dx / RTL8720F flashable-image handling to match the common
NuttX convention:

- Name the packed application image nuttx.bin (was app.bin) and leave only it
  plus the map files in the top-level build directory; the prebuilt bootloader
  boot.bin stays in the board prebuilt/ directory.  Drop the redundant per-core
  and OTA image copies from the top-level directory.
- Read the boot and application flash offsets from the SDK flash layout
  (platform_autoconf.h) instead of hardcoding them, and write boot.bin and
  nuttx.bin each at its own offset.  A flash-layout change is then tracked
  automatically and no offsets are entered by hand.
- Update the board documentation to match.

Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-12 14:23:41 -04:00
aineoae86-sys
95e4561145 tools: rp2040: Drop uninitialized name length check
scan_dir() checked name_len before assigning it. Directory entries already compute and validate strlen(a_dirent->d_name) before allocating the dir item, while the root path passed to scan_dir() is not encoded as a directory entry name.

Remove the stale pre-opendir check so scan_dir() no longer branches on an uninitialized local variable.

Generated-by: OpenAI Codex
Signed-off-by: aineoae86-sys <ai.neo.ae86@gmail.com>
2026-07-10 12:39:44 +08:00
Abhishek Mishra
e9c9cba51d boards: add CI ROMFS passwd credentials and refresh docs
Support NUTTX_ROMFS_PASSWD_PASSWORD via update_romfs_password.sh for
configs that enable ROMFS passwd without a defconfig password (sim/login
CI). Enable RANDOMIZE_KEYS in sim/login defconfig. Update mkpasswd.c
header, platform docs, and the mkpasswd_autogen guide.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-07-09 22:41:11 +08:00
Abhishek Mishra
ffa6ba222f !boards: enforce secure ROMFS passwd and TEA key setup
Remove implicit default credentials and add build-time validation.
Add check_passwd_keys.sh and gen_passwd_keys.sh; run key setup via
passwd_keys.mk before config.h is generated. Mirror the same logic in
cmake/nuttx_add_romfs.cmake for CMake builds.

BREAKING CHANGE: Builds with CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y now
require an explicit admin password and non-default TEA keys. The
Kconfig default password "Administrator" and default TEA keys are no
longer accepted. Fix: run make menuconfig, set Admin password under
Board Selection -> Auto-generate /etc/passwd, enable random TEA keys or
set CONFIG_FSUTILS_PASSWD_KEY1..4 manually, and use NSH login with
Encrypted password file verification.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-07-09 22:41:11 +08:00
Mihai Pacuraru
d2d65c48d5 tools/nxstyle.c: Add exclusion for MQTTErrors
Added a Mixed case exclusion for MQTTErrors defined in
apps/netutils/mqttc/MQTT-C/include/mqtt.h

Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
2026-07-09 09:27:41 -03:00
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