Fix incorrect flag handling and string escaping in the `make host_info`
diagnostic target.
Previously, CFLAGS, CXXFLAGS, and LDFLAGS were passed in a form that caused
improper splitting and quoting, which resulted in malformed output and
incorrectly escaped configuration values such as CONFIG_APPS_DIR.
This change ensures that:
- Compilation flags are passed as proper shell strings
- Flags are split correctly using shlex
- Configuration values are escaped exactly once when generating sysinfo.h
- Parsed output matches the contents of the .config file
This change affects diagnostic output only and does not modify the NuttX
build process or generated binaries.
Signed-off-by: Adwait Godbole <adwaitngodbole@gmail.com>
To skip the style issue:
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/irq.c:194:5: error: Mixed case identifier found
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/irq.c:196:5: error: Mixed case identifier found
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/irq.c:199:5: error: Mixed case identifier found
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/phyplus_wdt.c:61:28: error: Mixed case identifier found
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/phyplus_wdt.c:104:2: error: Mixed case identifier found
Error: /home/runner/work/nuttx/nuttx/nuttx/arch/arm/src/phy62xx/phyplus_wdt.c:162:50: error: Mixed case identifier found
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
1. The input consists of multiple static libraries and an ELF file. The tool searches
for external APIs used by the static libraries, then locates these API function signatures
in the ELF file, and outputs the results as a JSON file.
2. Using the first feature, with the static libraries unchanged,
the tool can take a new ELF file and an old ELF file as input, output two JSON files,
and compare the function signatures of functions with the same name in the two JSON files.
The comparison includes return values, parameters, and if they are structures,
it also compares the structure size, member offsets, member types, etc.
3.When the input is a single ELF file, the tool can check if structures with the same name have different members.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
For the following code, we need to check 'type_attr.form'.
type_attr = DIE.attributes["DW_AT_type"]
base_type_die = dwarfinfo.get_DIE_from_refaddr(xxx)
When type_attr.form==DW_FORM_ref_addr, 'type_attr.value' means
global reference (across compilation units).
When type_attr.form==DW_FORM_ref4, 'type_attr.value' means
local reference (within the same compilation unit).
Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
Move pthread mutex operations from kernel-space syscall
interface to user-space implementations
to reduce syscall overhead. Relocate mutex holder list
tracking from task control block (tcb) to
thread local storage (tls) to improve memory layout and
cache efficiency. Add helper macros for
conditional mutex implementations and update syscall
interface accordingly.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Fix incorrect direct access to semcount field by using val intermediate
field in memory pool and network stats debugging scripts. This corrects
the data structure navigation to match actual kernel semaphore layout.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
1. enhanced process_config.py script: supports both preprocess and postprocess modes
2. in preprocess mode: handles include formats and recursively records the include config tree structure to prepare for postprocess
3. In postprocess mode: compares the original file with menuconfig to identify non-#include items that should be written back
4. olddefconfig stores the original compressed include defconfig file at the very beginning
5. savedefconfig saves both the original file and the written back include defconfig
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
[checkkconfig.py] is a tool that simulates the effects of modifying a CONFIG item,
Can be used to check whether my config changes are what I expected.
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
Remove unnecessary parentheses around case labels in switch statements
for power management callback functions. This fixes checkpatch style
violations for case statement formatting.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Executable files called "run" don't pass checkpath verification,
so we change the name to "run.sh"
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
export currently build configuration and path to artifacts
so these can be used by NTFC run script
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
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>
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>
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>
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>
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>
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>
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>
Updates MCUBoot version and default address for virtual E-Fuse, depending
if MCUBoot is enabled.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
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>
- 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>
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>
Add include patch to configure.sh when processing deconfig file to keep alignment with
CmakeLists.txt
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
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>
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>
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>
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>
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>
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
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>