Commit graph

2064 commits

Author SHA1 Message Date
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
zhongzhijie1
8c4343c28b tools/checkpatch.sh: add -x option to auto-format Python files.
Currently only .py files are supported. Non-Python files will report "format not implemented".

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-07 23:43:41 +08:00
Antoine Juckler
eea2975b36 tools/process_config.sh: Fix sed errors
Ignore commented-out lines when deleting repeated defines in defconfig

Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
2025-07-03 09:41:56 -03:00
wangmingrong1
3648e5db3f gcov: Refactoring the implementation framework of gcov
All implementations of gcov are sunk to the kernel implementation
1. Support three dump modes: serial port output, single file output, standard output

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-03 00:17:58 +08:00
Filipe Cavalcanti
e57d2a5247 arch/risc-v: update lower-half drivers for ESP32-C3|C6|H2 2025-06-30 22:40:26 +08:00
Serg Podtynnyi
0883d664c4 ci/docker: bump risc-v toolchain
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-06-28 17:54:52 +08:00
wangmingrong1
ecd6a1db1a ci/arm64: Enhance CI inspection
1. nsh_fiq: arm64 clang makefile
2. nsh_gicv2: arm64 clang cmake

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
Filipe Cavalcanti
1a5f051fbf ci: update ESP32 Xtensa compiler version
Updates ESP32, ESP32S2 and ESP32S3 compiler version to 14.2.0 of 20241119.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-06-27 20:41:43 +08:00
simbit18
9f84695ef7 CI checkpatch: fix cvt2utf not found and add check of all necessary tools
check.yml:
   added missing cvt2utf installation
tools/checkpatch.sh
   Added checking all necessary tools and installation info  (more user-friendly)
2025-06-21 21:15:54 +08:00
Alan Carvalho de Assis
578d62b480 tools: Modify refresh.sh to support update all configs from a board
This modification will simplify the case where the developer wants
to update all board configs from a specific board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-06-21 04:21:10 +08:00
simbit18
3cc7b29866 tools/testbuild.ps1: Windows fix the redirect error stream
Windows cmake fix the redirect error stream
2025-06-18 23:14:18 +08:00
xuxingliang
28b2e01c22 nxgdb: fix style issue
Fix style issue reported after upgrading flake8 to 7.2.0

1 file would be left unchanged.
/home/nuttx/tools/pynuttx/nxgdb/utils.py:237:5: F824  is unused: name is never assigned in scope
    global g_type_cache
    ^
/home/nuttx/tools/pynuttx/nxgdb/utils.py:294:5: F824  is unused: name is never assigned in scope
    global long_type
    ^

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-06-13 20:37:04 +08:00
chenzhijia
341292064d nxgdb/utils.py: Fix source gdbinit.py script error report
Registering NuttX GDB commands from /home/mi/code/stable_oh2/nuttx/tools/pynuttx/nxgdb
set pagination off
set python print-stack full
"handle SIGUSR1 "nostop" "pass" "noprint"
Load macro: /tmp/6024dea73606400ae39a7b7da42cecbf.json
Please pip install debugpyIgnore module: elf, error: 'NoneType' object has no attribute 'code'
Traceback (most recent call last):
  File "/home/mi/code/stable_oh2/nuttx/tools/pynuttx/nxgdb/_init_.py", line 54, in init_gdb_commands
    module = importlib.import_module(f"{_package_}.{m}")
  File "/usr/lib/python3.10/importlib/_init_.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/mi/code/stable_oh2/nuttx/tools/pynuttx/nxgdb/elf.py", line 35, in <module>
    CONFIG_ARCH_USE_SEPARATED_SECTION = has_field("struct module_s", "sectalloc")
  File "/home/mi/code/stable_oh2/nuttx/tools/pynuttx/nxgdb/utils.py", line 488, in has_field
    return get_type_field(obj, field) is not None
  File "/home/mi/code/stable_oh2/nuttx/tools/pynuttx/nxgdb/utils.py", line 267, in get_type_field
    while t.code in (gdb.TYPE_CODE_PTR, gdb.TYPE_CODE_ARRAY, gdb.TYPE_CODE_TYPEDEF):
AttributeError: 'NoneType' object has no attribute 'code'
No symbol g_version found in memory, skipping version check

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2025-06-13 20:37:04 +08:00
xuxingliang
00304a18ed nxgdb/fs: fix exception when failed to parse symbol
Parse struct fields to determine array length.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-06-13 20:37:04 +08:00
dongjiuzhu1
7927c8d105 tools/pynuttx: update fs.py base on new structure fd and file
Update the Python script based on the PR "Separate file
descriptors from file descriptions" in fs/vfs.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:42 +08:00
dongjiuzhu1
9ca5c1d9c6 fs/file: unify prefix f_ for member locked
update locked to f_locked

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:42 +08:00
Alin Jerpelea
895154881c tools/doreleasenotes: remove deprecater API
remove old API since github removed deprecated API support

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-05-27 20:34:54 +08:00
Lars Kruse
e5b675d4dc refactor: fix spelling in private field names
Fix some misspelled field names.
These field names seem to be used only in private contexts.
Thus, the probability of external code accessing these fields is very
low.
In the rare case of external usage, compile time errors will easily
direct users to the new field name.
2025-05-24 09:44:22 -03:00
raiden00pl
442bc1c041 tools/nxstyle.c: fix defined but not used warning
fix defined but not used warning from CI:

  Warning: nxstyle.c:767:13: warning: ‘backslash_to_slash’ defined but not used [-Wunused-function]
    767 | static void backslash_to_slash(char *str)

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-23 11:26:07 -03:00
simbit18
889a26db1d tools/ci/testlist/arm-05.dat: removed missing entries
Removed from the arm-05.dat file the entries:

CMake,nrf52832-dk:buttons
CMake,nrf52832-dk:wdog

CMake,nrf52840-dk:adc
CMake,nrf52840-dk:buttons
CMake,nrf52840-dk:pwm
CMake,nrf52840-dk:qspi
CMake,nrf52840-dk:timer

present in the jumbo configuration

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-23 09:29:43 +02:00
Lars Kruse
f4cc2c2628 tools/checkpatch: avoid repeated output of codespell configuration filename 2025-05-23 10:48:41 +08:00
Lars Kruse
3ce85ca54e style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
simbit18
8776147783 tools/Config.mk: add -DHAVE_STRNDUP=1
In all POSIX environments (Linux, Cygwin, MSYS2, macOS)
strndup() function is  available.

add HOSTCFLAGS += -DHAVE_STRTOK_C=1 -DHAVE_STRNDUP=1

Required after PR #16396

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-20 08:29:05 +08:00
simbit18
3b27b44435 tools/nxstyle.c: fix error Relative file path on Windows Native
fix
error: Relative file path does not match actual file

Windows paths are different from Unix.

Added:

realpath replacement macro.

 my_strndup() Implementation of strndup() for Windows Native.

backslash_to_slash() Replace backslashes \ to forward slashes /. Used to verify the relative path of a file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-19 22:30:49 +08:00
simbit18
91027563fa tools/CMakeLists.txt: Improvements to CMakeLists.txt file
More aligned to the tools/Makefile.host file

Added:
The option() command  It provides a way to enable or disable targets of the project based on the user's preference.

Default
option(NUTTX_INCLUDE_ALL_TOOLS "Build all NuttX Host Tools" ON)

Checking host system for compilation options.

Tools configure, mkconfig, mksymtab and mkversion.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-17 16:09:20 +08:00
Lars Kruse
4568110d63 fix misspelled names in locally scoped code
These misspelled words are used in strictly local scopes.
Renaming these variables should not cause any problems.
2025-05-15 10:12:12 +08:00
George Poulios
2799cba36b tools/nxstyle.c: Whitelist libteec mixed case symbols
Whitelist all symbols starting with "TEEC_" and a few
entire struct field names from tee_client_api.h.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 10:14:01 +08:00
Kerogit
22df1ed2ab tools: add permitted mixed case suffixes to nxstyle
Newer AVR chips (DA/DB family) use mixed-case constants in header
file defining constants for I/O register values (provided
by manufacturer.)

Based on mailing list discussion, this patch adds some
of the lowercase suffixes used (the less prevalent constants
are then redefined in NuttX.)
2025-05-08 15:58:18 +08:00
Alan Carvalho de Assis
7b3aad198e ci/testlist: Don't build breadxavr board 2025-05-08 15:58:18 +08:00