Commit graph

58955 commits

Author SHA1 Message Date
George Poulios
ddf74ae059 boards/imx93-evk: Add a flat build config with OP-TEE
Mostly for CI purposes to validate OP-TEE changes
against a flat build. It has not been runtime-tested
with any specific setup involving an actual OP-TEE.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-08-03 13:00:47 -03:00
George Poulios
c78e5b983a drivers/misc/optee_smc: Fix sched_yield() on flat builds
Previous change that introduced yielding upon OP-TEE
return with reason foreign interrupt, omitted to include
<sched.h>. This worked on kernel builds, but not on flat
builds. Include it.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-08-03 13:00:47 -03:00
wangjianyu3
8c32bed29e drivers/sensors/gnss: Skip copying extended satellite flags
The extended member `flags` of `info` of `struct sensor_gnss_satellite` is not parsed from GSV.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-03 10:41:06 +08:00
wangjianyu3
508418917e drivers/sensor: Add flags for GNSS satellite
Some applications require satellite information for positioning using the flag USED_IN_FIX.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-03 10:41:06 +08:00
kywwilson11
163bf0a906 arch/arm/stm32h5: Use double-buffer for ADC DMA in Circular Mode
Clear dma interrupt flags as before.

Change HTEF to HTF, fixes typo.

Remove ALL_FLAGS define. Clear CXFCR with all 1s like other instances do.

Handle half-transfer interrupt only if in circular mode.

Add ADC_HAVE_DMA guard around adc_rstart_dma. It is needed because priv->circular is guarded by ADC_HAVE_DMA.
2025-08-01 22:57:31 +08:00
lipengfei28
4fa6d4b791 drivers/pci: epc add dma heap
The PCI inbound address space and the CPU cache need to maintain cache coherence

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-08-01 20:47:43 +08:00
Jukka Laitinen
50d94863f2 arch/xtensa: Fix a race condition in xtensa_sig_deliver for SMP
After the signals have been delivered, the local irqs need to be
disabled until the context switch. But just calling
leave_critical_section(regs[REG_PS]) will enable them if they were
enabled in the context.

Any interrupt on this cpu before xtensa_context_restore() would set
the rtcb->xcp.regs to NULL, causing a crash in context restore.

Fix this by calling leave_critical_section(up_irq_save()) instead.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-01 08:54:39 -03:00
Shanmin Zhang
73cf02d63a Revert "libs/libc/stdlib/lib_exit.c: fix multiple definition of __dso_handle in msys2"
This reverts commit 8f96e59aee.

The implementation of __dso_handle is independent of the HOST OS but dependent on the specific compiler.
Therefore, this patch will cause compilation failures for other cross-compilers on the Windows platform, such as arm-none-eabi-gcc and aarch64-none-elf-gcc.
Constraints should be applied to compiler target rather than compiler host.
2025-07-31 22:10:36 +08:00
George Poulios
199c301a8e drivers/misc/optee_smc: Explicitly yield during NW interrupts
CPU heavy OP-TEE calls would starve the Normal World tasks.
OP-TEE foreign interrupts were delivered to NW but we would
resume OP-TEE immediately without giving any potentially
unblocked tasks a chance to run. This would violate real-
time guarantees. Fix that by calling sched_yield() during
OP-TEE return with reason foreign interrupts.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-07-31 09:14:34 -03:00
Alan Carvalho de Assis
59dc9a3884 arch/arm/imxrt: Initial modification to support two USB Controllers
Many iMXRT MCUs have internally two USB OTG controllers, however
NuttX currently only supports one USB controllers. This patch will
prepare the "house" to support both ports at same time.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-31 08:04:31 +02:00
Liu, Richard Jiayang
d2282ec26a fs/vfs/fs_rename: fix directory move operation.
* Recurrency is removed from filesystem directory rename.
* Fixes use after free in buffer that was used as output and argument.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-07-31 01:53:59 +08:00
Michal Lenc
f43d0f03c0 Documentation/platforms/arm/samv7: add entry for supported PIC32CZ CA70
This adds entry for a newly supported PIC32CZ CA70 MCU and its
evaluation kit, PIC32 CA70 Curiosity.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-30 19:28:07 +08:00
Michal Lenc
8841b338be boards: add support for PIC32CZ CA70 Curiosity Evaluation Kit
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-30 19:28:07 +08:00
Michal Lenc
cbfaf4224a arch/arch/src/samv7: add support for PIC32CZ CA70 series
PIC32CZ CA70 family is pin to pin and binary compatible with
SAMV70/SAME70 families, therefore the support is placed in samv7
directory. The only difference is larger RAM memory compared to SAM
families.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-30 19:28:07 +08:00
Alan Carvalho de Assis
e745b8ec7f Doc: Remove MOTD string from nsh shell on simulator
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-30 12:01:56 +08:00
Alan Carvalho de Assis
e9cb6907c8 doc: Fix quickstart since the login is not required and quit exists
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-30 12:01:56 +08:00
jianglianfang
b7156384d1 video: add sched_note_mark at fb_remove_paninfo and fb_notify_vsync
fb_notify_vsync is called when TE irq comming, and fb_remove_paninfo is called after paninfo comsumed

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2025-07-30 02:50:21 +08:00
Shanmin Zhang
5a91b1b0ee x86_64: allow specifying alternative compilers via CROSSDEV, rather than restricting to specific compiler
Test:

git clone -b dev -depth 1 https://github.com/open-vela/prebuilts_gcc_windows-x86_64_x86_64-none-elf.git ${HOME}/x86_64-none-elf
export CROSSDEV=${HOME}/x86_64-none-elf/bin/x86_64-none-elf-
./tools/configure.sh -l qemu-intel64:nsh
make

Output:

Create version.h
LN: platform/board to /home/shanmin/git/nuttx-apps/platform/dummy
Register: hello
Register: dd
Register: nsh
Register: sh
Register: ostest
LD: nuttx

Signed-off-by: Shanmin Zhang <zhangshanmin@xiaomi.com>
2025-07-30 02:41:29 +08:00
Shanmin Zhang
57d5d87d46 x86_64: Add the -Wa,--divide option for all x86_64 assemblers
Signed-off-by: Shanmin Zhang <zhangshanmin@xiaomi.com>
2025-07-30 02:41:29 +08:00
simbit18
a0c5d035d7 arm: CMake build for the i.MX RT series implemented.
CMake added board ARCX Socket Grid

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-07-30 02:41:08 +08:00
simbit18
141cd3478b [Kconfig] boards/arm: Fix Kconfig style
Remove spaces from Kconfig
Add TABs
Add comments

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-07-29 17:28:46 +02:00
Alan Carvalho de Assis
719ffdd994 Doc: Update weact-stm32h743 doc to include flashing instructions
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-29 22:15:45 +08:00
Alan Carvalho de Assis
934b7b4bf5 drivers/lcd/st7735: Don't define st7735_rdram if write only mode
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-29 08:18:30 -03:00
Alan Carvalho de Assis
a97355167b Doc: Add documentation to weact-stm32h743:st7735
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-29 08:18:30 -03:00
Alan Carvalho de Assis
94bb3e52f5 boards/weact-stm32h743: Add support to ST7735 display
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-29 08:18:30 -03:00
ligd
1bfe705226 libc: fix assert "Free memory from the wrong heap" with flat mode and user separated heap enabled mode
In flat mode:
kernel code, like net driver...
strdup    -> nx_strdup -> kmm_malloc
lib_free  -> kmm_free

app code, like stdlib...
strdup -> malloc
free   -> free

Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-07-28 16:04:03 -03:00
Alan Carvalho de Assis
4a90c179f8 Documentation: Add documentation to arc-socket-grid
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-28 11:13:07 -03:00
Alan Carvalho de Assis
a94dddabb9 boards/imxrt: Add ARCX Socket Grid board
This commit add support to ARCX Socket Grid board powered
by iMXRT-1052 MCU.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-28 11:13:07 -03:00
lipengfei28
5eea680e44 documentation/arm64/imx9: add imx95 support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-07-28 09:58:02 -03:00
lipengfei28
99103b79c5 boards/arm64/imx9: add imx95 support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-07-28 09:58:02 -03:00
lipengfei28
44016fbe77 arch/arm64/imx9: add imx95 support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-07-28 09:58:02 -03:00
Matteo Golin
b0760dceb6 drivers/sensors/l86xxx: Use uORB GNSS lower-half
Changes the implementation of the L86xxx driver to use the
gnss_lowerhalf driver implementation, simplifying this driver's logic.
It also fixes the `read_line` function which would early return on `\r`,
as well as adding some retries for response checking and better mutex
locking.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-07-28 10:46:55 +02:00
Rodrigo Sim
a8ac255386 boards/arm/stm32f401rc-rs485: Add support to MAX31855 and MAX6675
This commit adds support for MAX31855 and MAX6675 thermocouple
sensors on the STM32F401RC-RS485 board via SPI1. It also updates
the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-27 10:04:03 -03:00
Rodrigo Sim
80e1f70832 boards/arm/stm32f4discovery: Add support to HX711 ADC
This commit adds support for the HX711 ADC in the STM32F4-Discovery
board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-27 17:43:19 +08:00
Côme VINCENT
596a425066 nucleo-h743zi: Add ADC2 support and expand ADC channel list
- Added support for ADC2 initialization and registration.
- Defined new ADC2 channels and corresponding pin mappings.
- Expanded ADC1 channel list and updated pin mappings.
- Updated board.h with additional ADC channel definitions.
- Ensured all ADCs are properly initialized and registered.

- Tested by opening and reading /dev/adc0 and /dev/adc1, checking
  that the correct values are read.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-07-26 10:02:32 -03:00
kywwilson11
4995c836f3 arch/arm/stm32h5: Add DMA Support to STM32H5 Serial Driver
Style fixes.
2025-07-26 20:57:26 +08:00
Côme VINCENT
ec64401c62 docs: Add Nix flake development environment guide
This commit introduces a new guide in  that details how to set up a reproducible development environment for NuttX using Nix flakes.

The guide covers:
- Prerequisites for using Nix flakes.
- Steps to enter the NuttX development shell.
- Benefits of using the Nix flake (reproducibility, simplified onboarding, dependency management).
- An overview of the  contents.

A link to this new guide has also been added in index.rst to ensure discoverability.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-07-26 20:55:29 +08:00
Côme VINCENT
92be21982d tools/nix: Add Nix flake for reproducible dev environment
This commit introduces a Nix flake (flake.nix and flake.lock) to provide
a reproducible development shell for NuttX using Nix and flakes.

- Adds a devShell with all required build tools and dependencies for NuttX,
  including CMake, Ninja, GNU Make, clang-tools, ARM toolchain, and other
  utilities (automake, bison, flex, genromfs, gettext, gperf, kconfig-frontends,
  libelf, expat, gmp, isl, libmpc, mpfr, ncurses, zlib, kconfiglib).
- Uses flake-utils to support multiple platforms.
- Sets up a shell hook to enable CMake compile commands and provide a welcome
  message.
- Based on nixpkgs `nixos-unstable` for up-to-date packages.

Purpose:
- Simplifies onboarding and ensures a consistent build environment across
  contributors.
- Reduces "works on my machine" issues by pinning dependencies.

Tested by running `nix develop` and building NuttX on x86_64-linux.

No impact on runtime or target builds; this only affects developer tooling.

For more details, see the new flake.nix file.

Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
2025-07-26 20:55:29 +08:00
YAMAMOTO Takashi
0f73f92ffc add esp32s3-devkit:mbedtls kconfig
Note: CONFIG_LIBC_RAND_ORDER=2 is a workaround for
https://github.com/apache/nuttx/issues/16760

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-07-25 21:29:11 +08:00
makejian
ac54fe8875 crypto/cryptosoft: fix aadlen used uninitialized warning
Signed-off-by: makejian <makejian@xiaomi.com>
2025-07-25 08:59:53 -03:00
YAMAMOTO Takashi
69bcbfb207 esp32s3_extraheaps.c: add a missing include for xtensa_imm_initialize
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-07-25 15:51:38 +08:00
Matteo Golin
da72df9ab6 drivers/sensors/l86xxx: Fix kernel crashes on failed registration
Sometimes this driver will boot when the serial port is of the wrong
baud rate, and it cannot set the correct baud rate or verify
communication. This commit prevents registration if any settings fail to
be set, and also prevents the kernel thread from setting the L86 to
enabled (this is done only by the uORB upper half).

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-07-25 10:48:55 +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
Windsor Schmidt
6bbc8c701a documentation: spelling and grammar fixes 2025-07-24 14:44:02 +08:00
kywwilson11
cbd033ae90 arch/arm/stm32h5: Initial Driver for STM32H5 Digital Temperature Sensor (DTS)
- Committing initial code for DTS. Missing ISR. Works for PCLK1. Cannot get to work for LSE.
- Pushing everything. Working with LSE now.
- Many fixes. Fixed interrupt setting. Added data structures.
- Changed interrupt handling. Removed FARs. Added Kconfig options for selecting interrupts.
- Updated info and formatting.
- Formatting fixes.
- Formatting.
- Changed iten to regval.
- Removed Triggger
- Formatting fixes per Pull request.
- Changed private_types to have stm32_ prefix. Used depends on for DTS Kconfig Menu. Fixed formatting per PR.
- Fixed spacing of function prototypes.
- Fixed indent on line
- Added documentation for STM32H5 and Nucleo-H563ZI regarding DTS. Also added GPDMA support to STM32H5 documentation (previous PR). Made stm32_dts.c more modular. stm32_dts_activate is now much more readable. Added comments/descriptions to private functions. Lastly, added a nucleo-h563zi:dts configuration.
2025-07-23 15:08:02 +08:00
simbit18
b5ef0871d9 build.yml: Excludes the workflow if the file is AUTHORS
CI does not compile everything for a simple modification of the AUTHORS file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-07-23 02:26:45 +08:00
Martin Vajnar
150854c6f2 ESP_PCNT: add high and low limit Kconfig options
Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
2025-07-22 13:09:02 -03:00
simbit18
d7a05dfcc6 drivers/segger: Add a kconfig to override Segger SystemView target sources version
update:
    CMakeLists.txt
    Make.defs
    Kconfig

It allows the same version of SystemView target sources to be used for CMake and Make, to avoid discrepancies in the future.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-07-22 23:21:31 +08:00
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