Commit graph

58907 commits

Author SHA1 Message Date
Filipe Cavalcanti
bbdb75b1f7 documentation: update documentation for MCUBoot on Espressif devices
Updates MCUBoot documentation and usage example.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
Filipe Cavalcanti
3468c8e0cf arch/risc-v: change offset for SPI Flash on Espressif devices
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
Filipe Cavalcanti
8c932b50fb boards/risc-v: fixes SPI Flash for MCUBoot usage
Adds partitions required for MCUBoot usage and a sample defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
Filipe Cavalcanti
a7cd6bb401 arch/xtensa: add E-Fuse support on ESP32S2
Adds support for e-fuse on ESP32S2 and fixes a gitignore issue.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
Filipe Cavalcanti
3f8cde728d boards/xtensa: fixes SPI Flash for MCUBoot usage
Fixes partitions for MCUBoot usage.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
SPRESENSE
664277039e arch: cxd56xx: Fix bug that causes wake-up by unused gpio interrupt
Set level high for unused interrupt trigger to avoid waking up from cold sleeping.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 16:21:26 +08:00
guanyi
ac5b38c9e5 arch/sim: avoid host-call being interrupted before getting errno
Sim use coroutine base on one thread in host to do switch context. but if we allow switch context with in one API (host-API and errno get), maybe the switch context from coroutine cause re-enter host-API call. Make the errno get behavior not work as expected.

Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
2025-07-21 19:19:05 -03:00
jingfei
db54331479 drivers/fs:Always use register_mtddriver() to register the MTD device (patch2)
This is a supplement to the patch:1936126210a56b6d1b033d6d940669413dd6e1b0

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code.

So we have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize()  with register_mtddriver().
2025-07-21 15:15:30 -03:00
xuxin19
956a50bb7d cmake(bugfix):add missing c++ toolchain search path
when libcxx or uClib++ is not selected, we use the default NUTTX cxx

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2025-07-21 19:21:02 +08:00
chao an
9e53aab5b3 xtensa/isa: fix build break if compiler without ISA - XCHAL_HAVE_THREADPTR support
common/xtensa_context.S: Assembler messages:
common/xtensa_context.S:134: Error: invalid register number (231) for 'rur' instruction
common/xtensa_context.S:283: Error: invalid register number (231) for 'wur' instruction
clang-10: error: Xtensa-as command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:143: xtensa_context.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-07-21 12:56:31 +02: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
Michal Lenc
e96ef8abe3 drivers/ioexpander/icjx.c: reconfigure icjx after undervoltage
According to a reference manual, VCC and VDD undervoltage
and VDD burst leads to the reset of all registers.
Therefore we have to reconfigure the expander to make
it functional again.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-18 12:08:39 -03:00
wangmingrong1
cbdc1a4108 toolchain/arm/clang: fix nuttx_find_toolchain_lib function error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-18 22:37:36 +08: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
wangmingrong1
5f5eeda55a compiler-rt/cmake: Fix compilation error
The target is wrong

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-18 22:37:36 +08:00
wangmingrong1
d3dd43cb59 arch/arm32v8m/cmake: Fix clang's error in specifying cfg and target
1. -target should be in front, otherwise clang will not be able to find the corresponding libgcc.a
2. When using clang++ compiler to link, you also need to specify the corresponding arch, otherwise ld.lld will report an error due to arch mismatch.

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
nuttxs
d1fababfc5 arch/xtensa: esp32(s3)_async_op() using nxsem_wait(), threads may
return early due to signal interruption (EINTR). This makes the
main thread think the async operation is done, but the background
worker thread is still running—risking access to freed memory,
race conditions, crashes or undefined behavior.

Using nxsem_wait_uninterruptible():the main thread waits until the
worker thread finishes, preventing these issues.

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-07-18 22:34:13 +08:00
Windsor Schmidt
1e6289b543 style: fix spelling in documentation 2025-07-18 15:21:08 +08:00
wangmingrong1
1bdbf0effd toolchain/arm64/cmake: Corrected the writing of arm64 cmake search library
Align the writing style of arm cmake, and each compiler defines its own find library
function, otherwise use the default

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-17 19:17:55 +08:00
Filipe Cavalcanti
bc8ce393cb documentation: update docs on SDMMC for ESP32C3|C6|H2
Adds sdmmc_spi defconfig documentation for ESP32C3, ESP32C6 and ESP32H2 boards.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
Filipe Cavalcanti
bd18bda0d7 boards/risc-v: add SDMMC defconfigs for ESP32C3|C6|H2
Adds defconfig to support SDMMC over SPI for esp32c3-generic, esp32c6-devkitc,
esp32c6-devkitm and esp32h2-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
Filipe Cavalcanti
6f19c59d26 boards/risc-v: add support for SD Card over SPI on ESP32-C3|C6|H2
Add board support for SD Card over SPI for ESP32C3, ESP32C6 and ESP32H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
chao an
7352e8ebfa arm64/qemu: decouple qemu board from chip
decouple qemu board from chip to support custom boards

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-07-16 10:12:57 -03:00
George Poulios
589c0e13b8 drivers/misc/optee: Cache coherency when MMU is disabled
When the MMU is disabled (CONFIG_ARCH_USE_MMU=n) the
data passed back and forth with the TEE needs to be
synced from/to the cache, otherwise we get random data
in either world.

Fix this by cleaning before a call and invalidating after.
This has to be done both on the optee msg arg, and the shm
buffers therein. Cleaning and invalidating the page list
used to describe non-contiguous shm buffers did not seem
mandatory in my tests, but common sense says that it should
be, so we do that too.

This fix does not apply to the optee msg arg of the socket
transport (optee_socket.c), as that one _should_ be handled
by the socket send/recv methods. It does apply to all shm
buffers though, regardless of transport.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-07-16 15:35:00 +08:00
jingfei
4a765b557f Docs/drviers/mtd:Add description for MTD Device Registration and FTL Control
Documentation:
1. Updates the registration process description and flag usage guidelines
2. Includes the MTD open sequence diagram (mtd_open_flow.png)
2025-07-16 14:11:41 +08:00
jingfei
c3e87dd3d1 drivers/fs: Control the behavior of FTL by passing oflags during the open process.
To save more space (equivalent to the size of one erase sector of
MTD device) and to achieve faster read and write speeds, a method
for direct writing was introduced at the FTL layer.
This can be accomplished simply by using the following oflags during
the open operation:

1. O_DIRECT. when this flag is passed in, ftl internally uses
   the direct write strategy and no read cache is used in ftl;
   otherwise, each write will be executed with the minimum
   granularity of flash erase sector size which means a
   "sector read back - erase sector - write sector" operation
   is performed by using a read cache buffer in heap.

2. O_SYNC. When this flag is passed in, we assume that the
   flash has been erased in advance and no erasure operation
   will be performed internally within ftl. O_SYNC will take
   effect only when both O_DIRECT and O_SYNC are passed in
   simultaneously.

3. For uniformity, we remapped the mount flag in mount.h and
   unified it with the open flag in fcntl.h. The repetitive
   parts of their definitions were reused, and the remaining
   part of the mount flag redefine to the unused bit of open
   flags.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
jingfei
a6fdbc538b Revert "ftl: should pre-allocate eblock for car case"
This reverts commit 20fcdcf905f279a9c4527be399a90590f458db1f.
The reason is that the erase buffer isn't always used in most cases.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
jingfei
d12cf1cb75 drivers/fs:Always use register_mtddriver() to register the MTD device.
We have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize() and bchdev_register() with
register_mtddriver().

When registering MTD devices via register_mtddriver(),
FTL and BCH wrappers will be added during the open() process:

1. Character Device Mode:
   When accessing the MTD device node via the open() interface,
   the device will be automatically converted to a character
   device. Both FTL and BCH wrappers will be implicitly added,
   provided that BCH support is enabled in the configuration.

2. Block Device Mode:
   When accessing the MTD device node via open_blockdriver(),
   the device will be treated as a block device, with only
   the FTL wrapper automatically applied.

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code and should
be used only internally within fs and driver code.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
Filipe Cavalcanti
a754b73e4c documentation: update MCUBoot docs for local update agent example
Updates the example documentation for a new example: local update agent.
This example allows the user to update MCUBoot image from a locally stored file.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 09:12:41 +08:00
Alan Carvalho de Assis
54b2381c42 drivers/input: Create Single Button Multi Actions
This commit creates a sbutton device that uses a single button to
create a keyboard driver that returns TAB or ENTER depending how
long the user keeps the button pressed.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-15 18:39:59 -03:00
Alin Jerpelea
3c8859b509 AUTHORS: add Simone Falsetti
Simone Falsetti has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-07-15 15:12:44 -03:00
Peter van der Perk
def76c90d5 imx95: eDMA5 Allow sharing with Linux
Allows to offset channels and thus sharing the controller with A-core
2025-07-16 01:19:05 +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
wangmingrong1
be3cd43a1e toolchain/armclang: Fix armclang config
In the toolchain, ARCH_TOOLCHAIN_XXX is used to select the compiler to be used. If clang is selected here, subsequent errors will occur

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-15 21:56:46 +08:00
dongjiuzhu1
338132af8f fs/block_proxy: fix the issue of the refs count for filep being zeroed out by utilizing dup2
file_open will clear filep, include f_refs

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-07-15 19:46:24 +08:00
dongjiuzhu1
ae33447220 fs/vfs: fix bug about lost dup oflags in dup2
this issue is caused by commit: b8e30b54ec

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-07-15 19:46:24 +08:00
Daniel Byshkin
c51f749f9a /drivers/sensors/nau7802: Added frequency control
Added controls to the NAU7802 so that a user can change the frequency via orb_set_frequency/orb_set_interval
2025-07-15 09:39:57 +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
Matteo Golin
953ab4e287 docs/ads1115: Add trigger commands to documentation
Updates the ADS1115 documentation with information about the two new
commands for triggering conversion and reading the result.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-07-14 10:22:33 -04:00
Daniel Byshkin
4030eb892e drivers/analog/ads1115.h: Add ioctl for conversion trigger
Since the ADS1115 has a relative slow conversion rate, this additional
ioctl command makes it possible to trigger a conversion before reading
the reading the conversion result, allowing the user to perform other
computation in between instead of waiting for the conversion time to
complete. It improves sampling time.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-07-14 10:22:33 -04:00