Commit graph

2092 commits

Author SHA1 Message Date
dongjiuzhu1
8c0850b0bd toos/scipts: add script to find symbol caller
Usage: ./tools/find_symbol_callers.sh <elf_file> <symbol_name> [source_root]

Examples:
  ./tools/find_symbol_callers.sh nuttx __aeabi_f2d
  ./tools/find_symbol_callers.sh nuttx malloc

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-31 08:47:23 -03:00
Laczen JMS
8896242b9d espressif: improve esp-hal-3rdparty handling
Reduce the downloads of esp-hal-3rdparty when using nxtmpdir to store
esp-hal-3rdparty and speedup compilation after `make distclean`.

Usage:
```
~/nuttxspace/nuttx/make distclean
~/nuttxspace/nuttx/./tools/configure.sh -l -S esp32-devkitc:nsh
~/nuttxspace/nuttx/make flash -j 8 ESPTOOL_PORT=/dev/ttyUSB0
~/nuttxspace/nuttx/picocom /dev/ttyUSB0 --baud 115200
```

Result:
```
load:0x40080000,len:30516
entry 0x40082880
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb2020 len 0xe30    (3632)
iram: lma 0x00001e58 vma 0x40080000 len 0x7734   (30516)
padd: lma 0x00009598 vma 0x00000000 len 0x6a60   (27232)
imap: lma 0x00010000 vma 0x400e0000 len 0x11e50  (73296)
padd: lma 0x00021e58 vma 0x00000000 len 0xe1a0   (57760)
dmap: lma 0x00030000 vma 0x3f410000 len 0x2d3c   (11580)
total segments stored 6
WARNING: NuttX supports ESP32 chip revision >= v3.0 (chip is v1.0).
Ignoring this error and continuing because `ESP32_IGNORE_CHIP_REVISION_CHECK` is set...
THIS MAY NOT WORK! DON'T USE THIS CHIP IN PRODUCTION!

NuttShell (NSH) NuttX-12.8.0
nsh> uname -a
NuttX 12.8.0 edf89ddedd-dirty Dec 22 2025 09:21:37 xtensa esp32-devkitc
nsh>
Terminating...
```

Any new `make distclean` and configure for a different espressif device
no longer requires the downloading of modules or patching.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-12-27 11:38:13 +08:00
Luchian Mihai
172dd3959a docs/guides/lwl: move lwl's README.txt to lwl.rst
This PR moves the lwl's READEME.txt file to Documentation/guides/lwl.rst

Signed-off-by: Luchian Mihai <luchiann.mihai@gmail.com>
2025-12-23 15:20:06 +01:00
anjiahao
0e92053bd9 pynuttx:remove pthread_tcb_s cast
Just remove cast

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-12-22 17:55:45 +08:00
Tomasz 'CeDeROM' CEDRO
7069e77370 tools/nxtagspkgsfetch.sh: Fetch tags packages for NuttX and Apps.
This script downloads all NuttX RTOS and Application snapshot packages
from the upstream git repository based on the provided git tags list.
These are NOT official release packages as checkum will differ.

When launched from the local NuttX git repository clone the script will
obtain all available tags to be downloaded, otherwise list of tags needs
to be provided manually (or when just selected tag is required).
This script uses ``wget`` underneath, make sure this tool is installed.
Fetch log file is created with a timestamp in name next to the packages.

Having all tags packaged is important for changes comparison
between specific versions, testing a specific version, compatibility
checks, searching for a feature introduction timeline, etc.

Usage: `./nxtagspkgsfetch.sh [download_path] [tags_list_space_separated]`

You can provide optional download path (default `../../nuttx-packages`)
and tags list to get packages for (default all tags from local git clone).
When providing tags you also need to provide download path.

Documentation update contains new tool description (above).

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-12-17 08:12:44 -03:00
Filipe Cavalcanti
49d6177c68 espressif: automate build system for flash enc
Modifies Kconfig and build tools to support flash encryption
and E-Fuse burning when flash encryption is enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
3a74b82e09 arch/xtensa: flash encryption support for ESP32|S2|S3
Deprecates ESP32_STORAGE_MTD_ENCRYPT and ESP32_OTA_PARTITION_ENCRYPT options.
Add ESPRESSIF_SECURE_FLASH_ENC_ENABLED Kconfig option.
Updates SPI Flash driver to handle encryption automatically.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
Filipe Cavalcanti
0835b345e8 arch/risc-v: flash encryption support for ESP32-C3|C6|H2
Add Kconfig option to enable flash encryption.
Default E-Fuse state is now VIRTUAL.
Modifies SPI Flash driver for encrypted operation.
Limitations:
- Requires MCUBoot
- Flash fully encrypted (no unencrypted MTD part. support)

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-12-11 11:29:26 +01:00
dependabot[bot]
dd5f562b58 build(deps): bump fonttools from 4.54.1 to 4.60.2 in /tools/pynuttx
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.54.1 to 4.60.2.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](https://github.com/fonttools/fonttools/compare/4.54.1...4.60.2)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-version: 4.60.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 22:43:44 +08:00
Yanfeng Liu
c38042941f arch/crt0.c: revert entry _start
This reverts crt0.c entry name to _start to fix LTO issue/17443,
needs apps/ side pull/3235.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2025-12-10 19:06:04 +08:00
simbit18
b749dfba23 ci/platforms: necessary changes for macos-15-intel and macos-14 Apple Silicon
macos-15-intel  and  macos-14 Apple Silicon
- bloaty()
   aligned with the latest version

macos-15-intel
 - avr_gcc_toolchain()
     Latest version not available for Intel,
     so it needs to be built from source, which takes over an hour.
     The latest version prebuilt for Intel is 9.4.0
     Added an workaround for installation.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-11-28 11:04:21 +08:00
simbit18
6161fececf tools/checkpatch.sh: Improved error display on GitHub
The improvement includes symbols that help employees visualise any errors detected during the PR check phase (check.yml).

Error ->  U+274C  Cross Mark
             https://en.wikipedia.org/wiki/X_mark

Checks pass -> ✔️ U+2714 Heavy Check Mark
             https://en.wikipedia.org/wiki/Check_mark

These characters are emojis that are recognized by the Unicode standards which define what each character represents.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-11-14 16:50:25 -03:00
wangchengdong
d8304979b4 tools/nxgdb: Add gdb and statenames for TSTATE_WAIT_EVENT
This patch add new taskstate entry in tools/pynuttx/nxgdb/thread.py
   and in sched_get_stateinfo.c/g_statenames for the new added task
   state: TSTATE_WAIT_EVENT

   test log is:
     nsh> ps
       PID  PPID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK    USED FILLED COMMAND
         0     0     0   0 FIFO     Kthread   - Ready              0000000000000000 0001008 0000196  19.4%  Idle_Task
         1     0     0 192 FIFO     Kthread   - Waiting  Semaphore 0000000000000000 0001984 0000016   0.8%  hpwork 0x70000100 0x7000014c
         2     0     2 100 FIFO     Task      - Running            0000000000000000 0002008 0000740  36.8%  nsh_main
         4     0     0 100 FIFO     Kthread   - Waiting  Event     0000000000000000 0000984 0000012   1.2%  event_wait_task

Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
2025-10-31 19:56:32 -03:00
trns1997
c705b278d1 cmake: Remove unused BUILD_OOTCPP guard from configuration.
Clean up the CMake configuration by removing the obsolete
`BUILD_OOTCPP` guard. This variable is no longer required
since out-of-tree build handling is now managed via the
enhanced `nuttx_add_subdirectory()` with EXCLUDE support.

* Simplifies CMake configuration command.
* Avoids redundant or unused build options.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-10-17 17:06:46 -03:00
Karel Kočí
29d44e5227 nxgdb: fix remote-register regular expression match
The code clearly expects the output of the 'maint print
remote-registers' to be indented by white-space character but at least
in my case it is not. This changes the match to consume any number of
white-space characters before it encounteres the register name.

Signed-off-by: Karel Kočí <cynerd@email.cz>
2025-10-16 12:48:31 +08:00
Filipe Cavalcanti
df6e5384fe arch/xtensa: update MCUBoot and virtual E-Fuse offset
Updates MCUBoot version and default address for virtual E-Fuse, depending
if MCUBoot is enabled.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-10-14 17:44:15 +08:00
simbit18
893cf19356 tools/ci/testlist: skip the build of <board>:cxxtest
Problems downloading the uClibc++-0.2.5.tar.bz2 package

cURL error 60: SSL certificate expired

net::ERR_CERT_DATE_INVALID
Subject: cxx.uclibc.org

Issuer: R10

Expires on: 27 set 2025

This blocks the jobs:

- arm-12
- sim-02

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-28 12:47:09 -04:00
trns1997
d7b2df6d85 ci/cxx: Add out-of-tree build CI test.
Introduce a new CI test to validate out-of-tree builds
and prevent regressions in the `make export` workflow.
Specifically, this change adds `test-oot-build.sh` that:
* Builds NuttX using a selected configuration.
* Runs `make export` to generate the export package.
* Copies the `nuttx-export` to the OOT build project.
* Verifies that compilation and linking succeed.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-27 21:36:22 +08:00
simbit18
206d031bd5 tools/ci: Added CMake build for Raspberry Pi Pico on Windows Native
ci/platforms/windows.ps1 added:

  - pre-built picotool

  - pico-sdk

testlist/windows.dat:

  - Added the entry CMake,raspberrypi-pico:nsh

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-24 12:05:56 -03:00
simbit18
4c3dbed5b5 arm/rp2040: CMake build for Raspberry Pi RP2040 implemented
- CMake added board Raspberry Pi Pico

- Added the entry:

     CMake,raspberrypi-pico:bmp280

   to the file arm-06.dat.

- Moved the search for the Python 3 interpreter to the
  root CMakefile to avoid unnecessary repetition.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-24 14:42:27 +08:00
simbit18
ac47c9d41a ci/docker: add Raspberry Pi picotool and fix GN build
- Add prebuilt Raspberry Pi picotool

- fix GN build with:
     git checkout 5d0a4153b0bcc86c5a23310d5b648a587be3c56d

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-19 09:32:54 +08:00
trns1997
918505e13d build/export: Fix missing gnu-elf.ld copy and toolchain script.
Fix missing `gnu-elf.ld` file copy during export generation
and update `toolchain.cmake` script to ensure proper toolchain
detection and configuration.
* Prevents build failures when exporting projects.
* Improves reproducibility of generated exports.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-14 10:44:51 +08:00
Matteo Golin
f8e5d07477 docs/codeowners: Add preliminary code owner file
This code owner file is auto-generated by the Python script in tools/
based off the git logs. It will allow new contributors to get better
auto-suggestions for which reviewers to request on their PRs. It also
creates an easy way to track down authors of certain NuttX subsystems
when refactors/changes are to be made.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-05 19:53:06 -04:00
wangchengdong
3629a3b5a1 tools/configure.sh: align tools/configure.sh with CmakeLists.txt
Add include patch to configure.sh when processing deconfig file to keep alignment with
 CmakeLists.txt

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-05 09:50:11 +08:00
Filipe Cavalcanti
42254ffcbe arch/risc-v: improve E-Fuse support for ESP32-C3|C6|H2
This commit fixes E-Fuse driver to get proper block and bit offset.
Also adds support for virtual and flash E-Fuses.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-03 09:01:44 -03:00
raiden00pl
4b1b3c58a0 tools/checkpatch.sh: fix check for HEAD commit
fix checkpath.sh usage for HEAD commit:

  ./tools/checkpatch.sh -c -u -m -g HEAD

regression after 93911d52a8

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-03 09:34:36 +08:00
raiden00pl
93911d52a8 tools/checkpatch.sh: check format for all commits in patch
If more than one commit is present in the patch, the commit format
must be checked separately for each commit in patch, otherwise not
all errors are detected.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-01 16:37:16 +02:00
raiden00pl
a6305fbf55 tools/checkpath.sh: check git commit format
check git commit format:

- line length less than 80 for commit title
- affected subsystem (detecting colon in commit title ":")
- Signed-off-by line
- blacklist [VELAPLATO-*, WIP:] string in commit body

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-08-29 22:25:18 +08:00
Côme VINCENT
c36d067603 tools/nix: move nix flakes to tools/
This commit moves the flake.lock and flake.nix files from root and
Documentation/ to the tools/ directory, according to @anchao's
suggestion in PR #16763.
Updates documentation to reflect this change.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-08-28 10:04:01 +08:00
wangchengdong
be36d42da5 Cmake: add defconfig preprocess capability in Cmake build environment(recursively expand #include)
Add:
    cmake/nuttx_process_config.cmake
    tools/process_config.py

    Update nuttx/CMakeLists.txt to call process_config defined ini
    nuttx_process_config.cmake to process defconfig before actually using it
2025-08-25 20:30:16 +08:00
Niccolò Maggioni
86c466b6bc tools/rp{2040,23xx}: Ensure that picotool is found or built
The current logic failed silently on some systems, maybe because of a
different default shell? This resulted in builds that completed
successfully but generated invalid UF2 files, which were refused by
the uC bootloader.

Now the check is properly enforced and picotool is either found in
the $PATH or built from the pico-sdk source.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-22 00:30:28 +08:00
Niccolò Maggioni
0f005b7b8c tools/ci: Include fetching pico-sdk in the CI environment setup
The Raspberry Pi pico-sdk was not available in the CI build process,
so the test builds for the rp2040 and rp2350 uCs could not execute the
last packaging stage. The SDK is now fetched and included, both at
runtime and in the Docker image.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-20 02:23:37 +08:00
zhanghongyu
e953bbd47c Dockerfile: fix matter build error
when the version of nodejs used during the installation of the dependency
library is too different from the version of nodejs actually used, we may
encounter version incompatibility issues, resulting in a runtime crash.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-08-19 14:05:54 +08:00
Jorge Guzman
433b7170fe ci: add zip package to Docker environment 2025-08-16 20:21:27 +08:00
Jorge Guzman
b78b870d68 tools/nxstyle.c: Updating white list to xedge example
Update nxstyle whitelist to allow MixedCase
identifiers used by the Xedge (Barracuda App Server) example.

  The following prefixes were added to g_white_prefix[]:
  - Ba
  - Thread
  - LThread
  - Http
  - Disk
  - Xedge

  The following exact identifiers were added to g_white_content_list[]:
  - baGetUnixTime
  - baParseDate
  - setDispExit
  - xedgeInitDiskIo
  - xedgeOpenAUX
  - platformInitDiskIo
  - ltMgr
  - Lt

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2025-07-24 11:37:16 -03:00
Filipe Cavalcanti
7807109524 tools/ci: temporarily disable test of esp32-devkitc:nxlooper
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-18 14:55:52 -03:00
wangmingrong1
359c65543c tools/ci: Compile mps3-an547/gcov with clang using cmake in ci
armv8m ci:
1. use makefile clang: /arm/mps/mps3-an547/configs/clang,CONFIG_ARM_TOOLCHAIN_CLANG
2. use cmake clang: CMAKE,mps3-an547:gcov

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-18 22:37:36 +08:00
simbit18
be0057c928 ci/platforms/darwin_arm64.sh: bump Xtensa ESP32|S2|S3 toolchain
Bump Xtensa esp-14.2.0_20241119
2025-07-18 22:36:29 +08:00
simbit18
5b3c5ac667 ci/platforms/darwin.sh: bump Xtensa ESP32|S2|S3 toolchain
Bump Xtensa esp-14.2.0_20241119
2025-07-18 22:36:29 +08:00
simbit18
47c6ed0b23 ci/platforms/msys2.sh: bump Xtensa ESP32|S2|S3 toolchain
Bump Xtensa esp-14.2.0_20241119
2025-07-18 22:36:29 +08:00
simbit18
26c36f243a ci/platforms/ubuntu.sh: bump Xtensa ESP32|S2|S3 toolchain
Bump Xtensa esp-14.2.0_20241119
2025-07-18 22:36:29 +08:00
simbit18
983c832572 ci/platforms/linux.sh: bump Xtensa ESP32|S2|S3 toolchain
Bump Xtensa esp-14.2.0_20241119
2025-07-18 22:36:29 +08:00
simbit18
3ff603fc52 ci/platforms/windows.ps1: bump risc-v toolchain
Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
simbit18
4df40dcb66 ci/platforms/ubuntu.sh: bump risc-v toolchain
Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
simbit18
32474985ab ci/platforms/msys2.sh: bump risc-v toolchain
Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
simbit18
665d608e68 ci/platforms/linux.sh: bump risc-v toolchain
Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
simbit18
e66fbcf708 ci/platforms/darwin_arm64.sh: bump risc-v toolchain
Darwin arm64 Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
simbit18
0f6e385a37 ci/platforms/darwin.sh: bump risc-v toolchain
Bump xPack GNU RISC-V Embedded GCC v14.2.0-3
2025-07-16 01:16:36 +08:00
Eren Terzioglu
30a567453c tools/espressif: Add risc-v compiler info dump for Espressif devices
Add xpack risc-v compiler info on diagnostic tool

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-15 01:51:04 +08:00
zhongzhijie1
f725c59387 tools/checkpatch.sh: simplify Python file type check.
Use existing is_python_file() helper to replace manual string comparison
when checking Python file types.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-07 23:43:41 +08:00