Add ESPRESSIF_FLASH_32M Kconfig option and the corresponding
esptool flash size mapping in Config.mk to support boards with
32MB NOR flash.
Signed-off-by: likun17 <likun17@xiaomi.com>
include/cxx contains NuttX's mini C++ ABI shims and must only be added
to the include path when CONFIG_LIBMINIABI is selected. tools/Config.mk
was adding it unconditionally for every non-LIBCXX/non-UCLIBCXX build,
and the platform.cmake files for arm, arm64, risc-v, x86_64 and tricore
were adding it inside the CONFIG_LIBCXXTOOLCHAIN block.
With an unpatched downloaded ARM GNU Toolchain, <cstdlib> uses
newlib's stdlib.h, defining div_t as an anonymous struct. A later
inclusion of NuttX's stdlib.h via <cstdio>->stdio.h->kmalloc.h then
redefines div_t with struct tag div_s, causing a conflicting declaration
error.
Guard the div_t/ldiv_t/lldiv_t definitions in stdlib.h with
redefinitions when a toolchain stdlib.h was already processed.
Also fix lldiv_s members typed as long instead of long long.
Signed-off-by: trns1997 <trns1997@gmail.com>
This is necessary because new defconfig were recently added to
Xtensa-based Espressif SoCs and the build job may exceed 2 hours.
In order to avoid increasing job timeout, a specific job for each
supported SoC (ESP32, ESP32-S2 and ESP32-S3) was created instead.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Fix 269 occurrences of duplicate "the" word typo found in 209 files
across source code, header files, and configuration.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This bl602evb:elf configuration has caused job risc-v-01 to fail on several occasions.
riscv-none-elf-ld: cannot find /github/workspace/sources/nuttx/arch/risc-v/src/crt0.o: No such file or directory
https://github.com/apache/nuttx/pull/17792
Added -bl602evb:elf to the risc-v-01.dat file to skip the build.
Signed-off-by: simbit18 <simbit18@gmail.com>
Replace pyelftools and capstone Python library dependencies with
subprocess calls to standard toolchain binaries (readelf, objdump,
addr2line). This eliminates all external Python package requirements,
removes manual DWARF parsing, and reduces the code from 818 to 563
lines.
Works with both GNU and LLVM toolchains via the -p/--prefix option:
-p arm-none-eabi- (GCC cross-compiler)
-p llvm- (LLVM/clang toolchain)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Added break to the dotest Blacklist and CMake loop: it stops at the first match instead of continuing unnecessarily.
Signed-off-by: simbit18 <simbit18@gmail.com>
This commit adds support for the Espressif's RISC-V-based ESP32-P4
chip along with its ESP32-P4-Function-EV-Board board.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
- Added functionality to read patch content from stdin when using the '--stdin' option with the '-p' flag.
- Updated usage instructions to clarify the new stdin option for patch checks.
- Improved error handling for unsupported combinations of options.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
- Updated the check workflow to conditionally include a '-b' option for breaking change enforcement based on PR labels.
- Modified the checkpatch script to support reading commit messages from stdin when using the '-m -g' flags.
- Improved usage instructions to clarify the new stdin option for commit message checks.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
- Introduced a new flag '-b' to enforce breaking change format in commit messages.
- Added checks to ensure that breaking change commits start with '!' and contain 'BREAKING CHANGE:' in the body before 'Signed-off-by'.
- Updated usage instructions to reflect the new breaking change option.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
- Introduced Kconfig options for stdbit.h, allowing architecture-specific and generic implementations.
- Added new documentation for stdbit.h, detailing its usage and configuration.
- Updated CMake and Makefile to handle the inclusion of stdbit.h based on configuration settings.
This enhances the NuttX library with optional C23 bit manipulation utilities, improving functionality for architectures that support it.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
I0680e48d8ff8847c8712e1a54efe32d320e7c84d changes the scope of the symbol definition.
So nxgdb needs to synchronize this modification.
Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
Commit 6ed4ea63d renamed the function `mm_initialize` to
`mm_initialize_heap`.
This caused the pynuttx modules (e.g. `mm dump`) to be missing.
Signed-off-by: Lars Kruse <devel@sumpfralle.de>
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>