This commit adds an entry for the ESP32-P4-Function-EV-Board's
`psram_usrheap` defconfig on docs.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit enables using ESP32-P4's PSRAM on Function-EV-Board.
The in-chip PSRAM memory is added to the user heap and the internal
memory is dedicated to a kernel heap.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Document that ntpc can use NTP servers learned from DHCP option 42 when DHCP client support is enabled.
Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
* Add `./tools/checkpatch.sh -c -u -m -g HEAD~...HEAD` example
to match checks performed by our CI.
* Add cross-reference to checkpatch.sh documentation.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
fix compilation error for CONFIG_SERIAL_TERMIOS=y
chip/stm32_serial_v2.c:923:35: error: 'struct up_dev_s' has no member named 'rxftcfg'
923 | regval |= USART_CR3_RXFTCFG(priv->rxftcfg);
Signed-off-by: raiden00pl <raiden00@railab.me>
The idle task is used during initialization and its stack size is
operating near the boundaries of a stack overflow, causing
occasional crashes during board's bringup. This commit increases
the idle task stack size to solve such an issue.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Added stm32_usbdrdhost.c which adds USB FS host mode support using the
embedded PHY. Added Kconfig to select Device or Host.
Example config nucleo-h563zi:usbmsc added to test functionality
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
In proxy_fstat(), the write permission bits for a block driver proxy
were gated on `i_ops->read` instead of `i_ops->write`:
The effect is that a driver implementing read but not write would have
S_IWOTH | S_IWGRP | S_IWUSR incorrectly set in the fstat() result,
reporting the file as writable when it is not.
Fix: replace `->read` with `->write` in the write check condition.
Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
Move the #endif preprocessor guard to after bmi160_transferspi()
so that both bmi160_configspi() and bmi160_transferspi() are
properly enclosed within the SPI conditional compilation block.
Signed-off-by: likun17 <likun17@xiaomi.com>
Serialization has been added to the paths of fb_read/fb_write, as well as
partial reading of plane/video information, updatearea, pandisplay, etc.
This covers the scenario where "one thread draws/switches via the character
device interface while another thread reads the framebuffer via the
character device interface", ensuring that the read framebuffer data
is complete and preventing screen tearing.
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
In Jan-Feb 2026: NuttX CI hit a [record high usage of GitHub Runners](https://github.com/apache/nuttx/issues/17914), exceeding the limit enforced by ASF Infrastructure Team. We analysed the PRs and discovered that most GitHub Runners were wasted on __(1) Failure to Download the Build Dependencies__ for DTC Device Tree, OpenAMP Messaging, MicroADB Debugger, MCUBoot Bootloader, NimBLE Bluetooth, etc __(2) Resubmitting PR Commits__:
- [Video: Analysing the Most Expensive PR](https://youtu.be/swFaxaTCEQg)
- [Video: Second Most Expensive PR](https://youtu.be/uSpQkzBogEw)
- [Video: Third Most Expensive PR](https://youtu.be/J7w1gyjwZ1w)
- [Video: Most Expensive Apps PR](https://youtu.be/182h8cRpfvI)
- [Spreadsheet: Most Expensive PRs](https://docs.google.com/spreadsheets/d/1HY7fIZzd_fs3QPyA0TX7vsYOjL86m1fNOf1Wls93luI/edit?gid=70515654#gid=70515654)
Why would __Download Failures__ waste GitHub Runners? That's because Download Failures will terminate the Entire CI Build (across All CI Jobs), requiring a restart of the CI Build. And the CI Build isn't terminated immediately upon failure: NuttX CI waits for the CI Job to complete (e.g. arm-01), before terminating the CI Build. Which means that CI Builds can get terminated 2.5 hours into the CI Build, wasting 2.5 elapsed hours x [7.4 parallel processes](https://lupyuen.org/articles/ci3#live-metric-for-full-time-runners) of GitHub Runners.
This PR proposes to __Retry the Build for Each CI Target__. NuttX CI shall rebuild each CI Target (e.g. `sim:nsh`), upon failure, up to 3 times (total 4 builds). Each rebuild will be attempted after a Randomised Delay with Exponential
Backoff, initially set to 60 seconds, then 120 seconds, 240 seconds. The rebuilds will mitigate the effects of Intermittent Download Failures that occur in GitHub Actions. (And eliminate developer frustration)
If the build fails after 3 retries: Subsequent CI Targets will __not be allowed to rebuild__ upon failure. This is to prevent cascading build failures from overloading GitHub Actions, and consuming too many GitHub Runners.
Note that NuttX CI shall retry the build for __Any Kind of Build Failure__, including Download Failures, Compile Errors and Config Errors. We designed it simplistically due to our current constraints: (1) Lack of CI Expertise (2) NuttX CI is Mission Critical (3) Legacy CI Scripts are Highly Complex. To prevent Compile Errors and Config Errors: We expect NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before submitting to NuttX.
What about __Resubmitting PR Commits__ and its wastage of GitHub Runners? We also require NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before resubmitting to NuttX. GitHub Runners will then be charged to the developer's quota, without affecting the GitHub Runners quota for Apache NuttX Project. We plan to [Kill All CI Jobs](https://youtu.be/182h8cRpfvI?si=MmAuwLISZPPMoqDq&t=1479) for PRs that have been switched to Draft Mode. We'll monitor this through the [NuttX Build Monitor](https://github.com/apache/nuttx/issues/18659).
Modified Files:
`tools/testbuild.sh`: We introduce a New Wrapper Function `retrytest` that will call the Existing Function `dotest`, to build the CI Target and retry on error.
`Documentation/components/tools/testbuild.rst`: Updated the `testbuild.sh` doc with the Retry Logic.
Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
fix
On branch fix_sim_mac
Your branch is up to date with 'origin/fix_sim_mac'.
Untracked files:
defconfig.tmp-e
nothing added to commit but untracked files present
Signed-off-by: simbit18 <simbit18@gmail.com>
This change sets three new compilation flags for avoiding cache miss
when using optimized builds and cache is manipulated.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This changes enables the use of the preprocessor function (nuttx_generate_preprocess_target) so it can properly
process the linker scripts, instead of using the original ones (must process some `#ifdefs`).
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Changes the global property manipulation of LD_SCRIPTS to APPEND.
This avoids rewriting this global property.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
message of the day aligned with defconfig modified in this PR https://github.com/apache/nuttx/pull/18715
Before the change
- CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator"
Now
- CONFIG_NSH_MOTD_STRING="This is an example NuttX Message Of The Day (MOTD). Have fun!"
Signed-off-by: simbit18 <simbit18@gmail.com>
When the macro SDADC_HAVE_TIMER is enabled, a compilation
error will occur due to the missing semicolon after the variable.
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
macOS does not provide full POSIX timer support for the host-side
simulator build, so references to timer_t and timer_create can fail when
building sim:fb on Apple hosts. Replace the POSIX timer path with a
Grand Central Dispatch timer on macOS while keeping the existing POSIX
implementation for other hosts.
The dispatch timer raises SIGALRM from its event handler so the host
side keeps the same timer-driven behavior expected by the simulator.
This preserves the existing timing model and fixes the macOS host build
failure for sim:fb.
Signed-off-by: Peter Bee <bijunda@bytedance.com>
macOS does not ship X11 headers and libraries in the default system
search paths, so sim:fb fails to build unless the XQuartz installation
prefix is detected explicitly. Probe /opt/X11 first and fall back to
/usr/X11 so the simulator can find the required X11 headers and libs on
common macOS setups.
This fixes the sim:fb build failure on macOS hosts that rely on XQuartz
for X11 development files.
Signed-off-by: Peter Bee <bijunda@bytedance.com>
When GDB opens a coredump file, it first selects a "current thread",
and the bt command by default only performs backtracing on this current
thread. When there is no dedicated "crash thread marker" for this current
thread in NuttX's coredump.elf, it usually degenerates to
"the first thread parsed in the core file".
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
Document the new mkpasswd-based password generation system and its
integration with the build process.
Changes:
* Add comprehensive mkpasswd tool documentation to components/tools
* Update SIM board docs to explain generated passwd workflow
* Update ESP32-C3-legacy board docs for passwd generation
* Update RX65N board docs with credential handling guidance
* Document how to configure and use BOARD_ETC_ROMFS_PASSWD_* options
* Explain security benefits of build-time generation vs static files
* Update all doc examples from default username "admin" to "root"
BREAKING CHANGE: Boards using static /etc/passwd files in ETC_ROMFS
must migrate to the new build-time generation workflow documented in
Documentation/components/tools/index.rst. The old static passwd files
are no longer present in migrated boards; boards that relied on them
will fail to build until credentials are configured via Kconfig.
Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
Migrate boards from static /etc/passwd files to build-time generation:
* Remove static etc/passwd files from SIM and ESP32-C3-legacy boards
* Update board configurations to enable BOARD_ETC_ROMFS_PASSWD_ENABLE
* Configure SIM board with login demo user (root/Administrator)
* Update board build rules to use newly generated passwd files
* Remove CMakeLists.txt dependency on static passwd in SIM
* Update MOTD string from username=admin to username=root
This completes the infrastructure migration for boards supporting
login functionality.
BREAKING CHANGE: The static etc/passwd files have been removed from
boards/sim/sim/sim/src/etc/passwd
boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd
These boards now require CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y and a
configured password. Any board carrying a custom static passwd file must
set RCRAWS to exclude etc/passwd and manage credentials via the new
Kconfig options or provide their own passwd generation. To fix: run
'make menuconfig' and navigate to:
Board Selection --->
Auto-generate /etc/passwd at build time --->
Admin password
Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
Introduce mkpasswd, a pure-C host tool for generating encrypted password
files at build time using TEA encryption. This enables secure,
credential-free firmware images while allowing build-time password
configuration.
Changes:
* Add mkpasswd.c host tool for TEA-based password hashing and encryption
* Integrate mkpasswd into Make build system (tools/Makefile.host)
* Add CMake support for mkpasswd compilation and ROMFS passwd generation
* Add CONFIG_BOARD_ETC_ROMFS_PASSWD_* configuration options to Kconfig
* Implement credential exclusion from defconfig to prevent password leaking
* Update savedefconfig.cmake to strip sensitive credentials
* Fix mkdir() portability for Windows Native builds (CONFIG_WINDOWS_NATIVE)
* Change default username from "admin" to "root" (POSIX convention)
* Improve build-failure error message with full menuconfig navigation path
BREAKING CHANGE: Boards enabling CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE
must set CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD to a non-empty string
of at least 8 characters. The build now fails with an explicit error if
this config is left empty. To fix: run 'make menuconfig' and navigate to:
Board Selection --->
Auto-generate /etc/passwd at build time --->
Admin password
Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
Add Kconfig guidance, mqttc_pub TLS options and default port, the
mqttc_mbedtls_pub example, and cross-links between the mqttc example and mbedtls overview pages
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
When both CONFIG_ESP32_SPIRAM and CONFIG_ESP32_SPIRAM_USER_HEAP
are selected, the device must not select CONFIG_NSH_ARCHINIT.
Instead, CONFIG_BOARD_LATE_INITIALIZE must be selected. This is
necessary because the SPI flash initialization disables the cache,
and only internal memory is then accessible. So, if the SPI flash
initialization is performed by the entry task (nsh_main, a regular
task), it would use the user heap to allocate memory, which would
cause a system crash when the cache is disabled. On the other hand,
by selecting CONFIG_BOARD_LATE_INITIALIZE, a kernel thread is
dedicated to perform the initialization, and the cache can be
safely disabled.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
When ESP32's flat build mode is selected with the external PSRAM
on USER_HEAP mode, the ROM strdup internally calls malloc which may
be mapped to a different heap than lib_free, causing cross-heap
allocation issues and system crashes.
This commit adds a new Kconfig option ESP32_DONT_USE_ROM_LIBC to
allow using NuttX libc instead of ROM newlib functions. When
USER_HEAP mode is selected, this option is automatically enabled.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
In ESP32-S3 flat build with USER_HEAP mode, ROM strdup internally calls
malloc which may be mapped to a different heap than lib_free, causing
cross-heap allocation issues and system crashes.
This commit adds a new Kconfig option ESP32S3_DONT_USE_ROM_LIBC to
allow using NuttX libc instead of ROM newlib functions. When USER_HEAP
mode is selected, this option is automatically enabled.
Fixes: 60ca804b56 ("esp32s3: Fix bug related to the PSRAM-allocated task stack")
Signed-off-by: 461911662 <461911662@qq.com>
Reviewed-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Reviewed-by: Almir Okato <almir.okato@espressif.com>
Reviewed-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Enabling CONFIG_NX_HWCURSORIMAGE or CONFIG_NX_SWCURSOR causes a compile error due to a missing semicolon after a structure variable.
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
Linux creates all files as long file name entries even if they
fit short 8.3 format. This caused issues when deleting or renaming
files as the long file name entry was not recognized and only deleted
it's short file name entry. This basically kept breaking the file
system as subsequent long file name files were not correctly stored.
The typical representation of this issue was long file name being
represented as it's short name alias.
This commit adjusts the LFN/SFN logic a bit - the code now always
fills in long file name and then checks if this could possibly be
a short file entry (we still have to do that because Windows stores
8.3 files as short file entry). This ensures compatibility with
files created both on Linux and Windows.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Git
- Enabled long path support by setting the core.longpaths setting to true.
Fix
Cloning into 'esp-hal-3rdparty'...
HEAD is now at 5d8324708f5 Enable using `esp_timer` on RISC-V devices
error: unable to create file tf-psa-crypto/drivers/everest/include/tf-psa-crypto/private/everest/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h: Filename too long
fatal: Unable to checkout '582ff482038db6e4010dbf6f943d97b05ad06ea5' in submodule path 'components/mbedtls/mbedtls'
error: unable to create file tf-psa-crypto/drivers/everest/include/tf-psa-crypto/private/everest/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.h: Filename too long
fatal: Could not reset index file to revision 'HEAD'.
Signed-off-by: simbit18 <simbit18@gmail.com>
enabling CONFIG_FB_HWCURSOR and CONFIG_FB_HWCURSORIMAGE causes a compile error: missing semicolon after a structure variable.
Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
Return ntotal (total bytes written) instead of ret (result of last
write call). This matches the expected semantics and is consistent
with net_writeroute_ipv4().
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Add kmm_free(alloc) before returning NULL when neigh is NULL in
netlink_get_neighbor(). Without this, the allocated memory is
leaked on the error path.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
In both convert_ipv4entry() and convert_ipv6entry(), the IPPROTO_UDP
case was incorrectly comparing against XT_MATCH_NAME_TCP instead of
XT_MATCH_NAME_UDP. This caused UDP filter rules to never match.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Remove a redundant net_unlock() call in the early return path of
mld_gendog_work(). The network lock is already released at the
common exit path, causing a double-unlock.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Change && to || in the fromlen validation of icmpv6_recvmsg().
The original condition (fromlen == NULL && *fromlen < sizeof(...))
would never be true when fromlen is NULL due to short-circuit
evaluation. The correct logic is: reject if fromlen is NULL or
the buffer is too small.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>