Commit graph

59096 commits

Author SHA1 Message Date
Michal Lenc
92661d9e03 .editorconfig: add .editorconfig file to help maintain coding style
Adds .editorconfig file to help maintain basic coding style
such as indent style and brackets across various IDEs. Editor
scans for this file and adheres to these rules.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-08-28 21:53:16 +08:00
wangjianyu3
b9203c1747 sched/signal: Old signal action need save sa_user
For example, set sigaction after create signalfd,
the sa_sigaction was restored but sa_user not,
causing signalfd_action() get the wild private data.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-28 21:52:44 +08:00
Filipe Cavalcanti
c15521af91 boards/risc-v: update board and defconfigs for Wi-Fi on ESP32-C3|C6
Updates the defconfigs and board source to support driver refactor.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-08-28 21:52:03 +08:00
Filipe Cavalcanti
1f7c3a32e5 arch/risc-v: refactor Wi-Fi driver for ESP32-C3|C6
Fixes low and inconsistent bandwidth issues.
Adds new configuration options for buffer management.
Moves code around to make the implementation cleaner and easier to debug.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-08-28 21:52:03 +08:00
simbit18
9c6d502531 boards/arm/imxrt: CMake added imxrt1020-evk imxrt1050-evk boards
Added CMake build for boards:

imxrt1020-evk
imxrt1050-evk

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-08-28 15:34:54 +08:00
simbit18
4838d712a7 boards/arm/imxrt: CMake added imxrt1060-evk imxrt1064-evk imxrt1170-evk boards
Added CMake compilation for boards:

imxrt1060-evk
imxrt1064-evk
imxrt1170-evk

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-08-28 15:21:53 +08:00
wangchengdong
a3e5ae9600 arch/tricore/src/common/tricore_irq.c: add up_affinity_irq
Add up_affinity_irq to tricore arch
2025-08-28 15:21:39 +08:00
v-tangmeng
e1b442b0e8 arm/sama5: fix ld unrecognized option '-g3'
ld: unrecognized option '-g3'
ld: use the --help option for usage information

Because `arch/arm/src/common/Toolchain.defs` already contains
`ARCHOPTIMIZATION += $(CONFIG_DEBUG_SYMBOLS_LEVEL)`, so
`boards/arm/sama5/jupiter-nano/scripts/Make.defs` here directly
delete `ARCHOPTIMIZATION += $(CONFIG_DEBUG_SYMBOLS_LEVEL)`.

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2025-08-28 15:21:05 +08:00
v-tangmeng
fec6e248b9 fix ld unrecognized option '-g3'
ld: unrecognized option '-g3'
ld: use the --help option for usage information

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2025-08-28 15:21:05 +08:00
Côme VINCENT
c36d067603 tools/nix: move nix flakes to tools/
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>
2025-08-28 10:04:01 +08:00
Tiago Medicci Serrano
585c25bac0 drivers/i2s/i2schar: Implement blocking read/write operations
This commit implements simple (blocking) read and write operations
for the i2schar driver. Although it already contained such methods,
the read/write operation was not being properly handled by the
`i2schar_[rx|tx]callback` (called when the operation has finished).
A semaphore is used to ensure that read data was received by the
receiver and another semaphore ensures that data was written by the
transmitter.

Please note that the already-existing mutex for the I2S peripheral
was replaced by two mutexes, one for the receiver and other for the
transmitter to allow full-duplex communication.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-08-27 11:07:05 +08:00
Tiago Medicci Serrano
6f5a8c6b25 drivers/i2s/i2schar: Implement ioctl commands for i2schar
This commit implements a set of commands to the i2s character
driver. The implemented commands allows getting and setting
parameters like data width, sample rate and number of channels for
both receiver and transmitter. If no ioctl is found, the command
is redirected to the lower driver implementation if it has the
ioctl callback registered.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-08-27 11:07:05 +08:00
simbit18
aadb929526 drivers/net/CMakeLists.txt: Aligned Cmake with Make
Add KSZ9477 driver #10503

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-08-27 11:05:32 +08:00
Jukka Laitinen
f4142626b9 net/can/can_recvmsg.c: Cleanup can_readahead
It is better to remove the iob from the readahead queue first,
and only after that work on the iob.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-26 20:42:01 +08:00
haitomatic
144ac23647 net/can/can_recvmsg.c: Remove IOB trimming as useless, can frames can always fit in one IOB
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-26 20:42:01 +08:00
haitomatic
8fc2ad20a7 net/can/can_callback.c: Take the timestamp size into account in "buflen"
In case CONFIG_NET_TIMESTAMP is enabled, subtract the timestamp size from the buflen

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-26 20:42:01 +08:00
Jani Paalijarvi
e2b1d186d7 drivers/net/ksz9477.c: Errata 16, reset SGMII always on init 2025-08-26 09:10:43 -03:00
Jari Nippula
56870fb0ea ksz9477: MMD indirect access check fix
Instead of verifying MMD indirect access by checking
EEE ADVERTISEMENT register has value 0x6 (which may be changed),
the verification is done by write and check LED MODE register.
1. Backup current LED_MODE register value
2. Write value Single-LED mode (0x10) to LED_MODE
3. Read LED_MODE register and verify it returns value 0x10
4. Write original (backup) value to LED_MODE
2025-08-26 09:10:43 -03:00
Jani Paalijarvi
fcab00d3a8 drivers/net/ksz9477: Implement errata fixes
From the ksz9477 errata, setup the configuration which is tested to work.

- Improve PHY receive performance
- Disable EEE for ports 1-5
- Fix supply current values

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2025-08-26 09:10:43 -03:00
Michal Lenc
47cd5ba279 arch/arm/src/samv7/sam_emac.c: fix compile warning
The following warning occurred if ARCH_CHIP_PIC32CZCA70 option was
selected. The variable is not used in case of PIC32CZ CA70 series.

CC:  task/task_getgroup.c chip/sam_emac.c: In function ‘sam_emac_initialize’:
chip/sam_emac.c:4758:12: warning: unused variable ‘regval’ [-Wunused-variable]
 4758 |   uint32_t regval;
      |

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-08-26 14:02:13 +02:00
Jukka Laitinen
5c7c7f8ca3 arch/arm/src/stm32f7/stm32_ethernet.c: Fix "unused variable" warning
Fix build warning when CONFIG_STM32F7_AUTONEG is not set

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-26 14:01:47 +02:00
wangchengdong
28206007e0 board/tricore: rename tc397 chip board name
"tc397" is a chip name which is not appropriate to act as a board name.
 the board supported here is actually "a2g-tc397-5v-tft".
 The correct definition is : tricore is arch name, tc3xx is arch family
 name, tc397 is chip name and the borad name is a2g-tc397-5v-tft
2025-08-26 16:09:34 +08:00
Jouni Ukkonen
9b8c8bdd7b drivers/tca64xx: Add support for PCAL6416
- Added new part support for PCAL6416
- Added pullup/pulldown configuration support

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-26 09:46:09 +08:00
Jukka Laitinen
710bd199e5 drivers/ioexpander/tca64xx.c: Fix polarity register address
This corrects a copy-paste error; polarity register is tp_polarity, not tp_output

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-26 09:46:09 +08:00
Jouni Ukkonen
38fbe166ee drivers/ioexpander/tca64xx: Fix compile errors
- Fix gpioinfo argument type
- Fix unused variable "ret" warning when CONFIG_TCA64XX_INT_POLL is not defined

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-26 09:46:09 +08:00
Jukka Laitinen
3cf28dd0b2 arch/arm64/src/imx9/imx9_lpi2c.c: Fix bus reset
imx9_lpi2c_reset didn't quite work. It tried to toggle scl line as GPIO, but the line was not even muxed properly.

Instead, set the bus to relaxed mode, and drive address 0 to the bus. This toggles the clock, and also generates start and stop sequences on the bus.

"Relaxed mode" is a new feature on the LPI2C block used in imx93.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-26 09:39:33 +08:00
Michal Lenc
78e41861e6 boards/arm/samv7/pic32czca70-curiosity: add progmem to configuration
PIC32CZCA70 Curiosity evaluation kit now initializes and registers
a partition in an embedded flash. The end of the flash is used as
an example to avoid the interference with the actual code.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-08-25 16:44:24 -03:00
Michal Lenc
5d21aa823e arch/arm/src/samv7: support progmem for pic32czca70 series
There were missing ifdef conditions for pic32czca70 series.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-08-25 16:44:24 -03:00
Jukka Laitinen
4baad0aa22 arch/risc-v/src/mpfs/mpfs_clockconfig.c: Flag out code only used in bootloader
This removes the need to have all the DDR/clock configuration related
"LIBERODEFS" flags defined, when not building a standalone/coldboot
configuration

All of this code is unused when not building with CONFIG_MPFS_BOOTLOADER

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-08-25 23:37:55 +08:00
michal matias
4a4235b5a2 drivers/net: Remove the NCV7410 10BASE-T1S MAC-PHY driver
This commit removes existing support for the NCV7410 10BASE-T1S MAC-PHY.
The driver will be replaced by its generalized version with different organization.
The new driver has naming clashes with the old, therefore the old has to be removed first.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-08-25 20:32:35 +08:00
michal matias
76c2038d97 boards/risc-v/esp32c6: Remove board support for the NCV7410
The NCV7410 driver will be replaced. This commit removes current support for
the NCV7410 driver from the board level.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-08-25 20:32:35 +08:00
wangchengdong
be36d42da5 Cmake: add defconfig preprocess capability in Cmake build environment(recursively expand #include)
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
2025-08-25 20:30:16 +08:00
Thiago Finelon
e87c43b798 arch/xtensa/esp32s3: Add EXT1 wakeup support in power management
Introduce EXT1 wakeup functionality to the ESP32-S3 power management
subsystem. With this feature, the ESP32-S3 can wake up from PM_STANDBY
or PM_SLEEP when one or more RTC GPIOs trigger the EXT1 condition.

Changes include:
- Added EXT1 wakeup configuration and preparation logic in rtc code.
- Integrated EXT1 handling in pmstandby() and pmsleep().
- New board-level Kconfig options under ESP32-S3 DevKit menu:
  - CONFIG_PM_EXT1_WAKEUP: enable EXT1 wakeup support
  - CONFIG_PM_EXT1_WAKEUP_RTC_GPIO<n>: select RTC GPIOs as wake sources
  - CONFIG_PM_EXT1_WAKEUP_TRIGGER_MODE: choose wakeup on HIGH or LOW level
- Fixing Kconfig style
- Fixing comments standard
- Adding PM documentation for esp32s3-devkit

Impact:
- No build impact unless CONFIG_PM_EXT1_WAKEUP is enabled.
- When enabled, ESP32-S3 can wake from low-power states via RTC GPIOs.
- No new public API introduced; controlled via board Kconfig.

Tested on ESP32-S3 DevKit:
- Configured GPIO4 and GPIO5 as EXT1 wake sources.
- Verified wakeup from light sleep and deep sleep on external signals.
- Wakeup reason correctly reported as EXT1.

Signed-off-by: Thiago Finelon <thiago.sfinelon@gmail.com>
2025-08-24 11:32:10 -03:00
Jukka Laitinen
67d0b975a5 arch/arm64/gicv3: Improve initialization in warm reboot case
- In case of warm reboot, clear active and pending interrupts from GICv3
and also from the CPU interface.
- Fix default IGROUPMODR to the reset value (0)
- Move gic_wait_rwp calls to after modifying ICENABLER
- Improve some comments

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-24 11:31:37 -03:00
Jukka Laitinen
80cb2cf9c6 arch/xtensa/esp32,esp32s3: Start the "spiflash_op" thread with correct affinity
Set the affinity of the task before activating it. There is no parameter
or other interface in "kthread_create" to set the affinity mask,
like in "pthread_create".

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-22 15:46:47 -03:00
Alan Carvalho de Assis
eec50c183c build.yml: Excludes the workflow run if the file is CONTRIBUTING.md
CI does not compile everything for a simple modification of the CONTRIBUTING.md file.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-08-22 23:29:15 +08:00
lipengfei28
d45dfb8a9e arch/arm64: porting config iomux use scmi form arm imx95
pinctrl use same format scmi and config regs

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-08-22 20:54:05 +08:00
lipengfei28
c90349348e arch/arm64: porting config clock use scmi form arm imx95
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-08-22 20:54:05 +08:00
lipengfei28
909d9f1351 arch/arm64: porting mu drv and scmi from arm imx9
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-08-22 20:54:05 +08:00
p-szafonimateusz
92186c1942 Documentation/posix.rst: fix typos
fix typos in Documentation/standards/posix.rst

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
p-szafonimateusz
9fd1478a99 pthread: add pthread_{get|set}concurrency support
Add support for pthread_{get|set}concurrency support.

NuttX uses 1:1 threading model (every pthread is a kernel-managed thread),
so this function has no real effect on the scheduling behavior.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
p-szafonimateusz
b1e03bca0c libc: add support for sigsetjmp() and siglongjmp()
Add support for sigsetjmp() and siglongjmp().

This implementation is build on top of setjmp() and longjmp().
sigsetjmp() in that case must be implemented as a macro otherwise
we lose setjmp context.
siglongjmp() is kept as inline function to satisfy the PSE52 VSX
tests requirement.

An alternative implementation requires writing these function in
assembly code for each architecture.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
p-szafonimateusz
396f5b40ce unistd: add support for confstr()
add support for POSIX defined confstr()

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
p-szafonimateusz
8108aad1a4 pthread: add pthread_attr_{get|set}guardsize support
This commit adds simple implementation of guardsize for pthreads.
At this moment this option simply increases the size of allocated pthread stack.

At default pthread guard size is set to 0.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
nuttxs
46bbde02b1 esp32/esp32_spiflash.c: during the SPI Flash erasure operation, task
scheduling (yield) is added to prevent the Watchdog Timer from
triggering a reset due to timeout

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-08-22 20:47:03 +08:00
simbit18
95f1cf4748 drivers/spi/CMakeLists.txt: Aligned Cmake with Make
Add iCE40 driver #12012

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-08-22 08:18:50 -03:00
p-szafonimateusz
4ed174a7e0 drivers/can/kvaser_pci.c: configure number of passes in interrupt handler
Configure number of passes in interrupt handler logic to avoid losing RX frames
in QEMU environment.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 15:34:38 +08:00
“wangchengdong”
e2cdb7ef34 arch/tricore: add up_trigger_irq
Add up_trigger_irq in arch/tricore/src/common/tricore_irq.c
  Select ARCH_HAVE_IRQTRIGGER in config ARCH_TC3XX
2025-08-22 15:04:06 +08:00
Niccolò Maggioni
86c466b6bc tools/rp{2040,23xx}: Ensure that picotool is found or built
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>
2025-08-22 00:30:28 +08:00
Niccolò Maggioni
3e70a7edc7 boards/arm/rp2040: Add ADS7046 example config
Add a new defconfig that includes support for an ADS7046 sensor
and extend the existing documentation to include its description.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-22 00:29:55 +08:00