Commit graph

57973 commits

Author SHA1 Message Date
Filipe Cavalcanti
034917e972 documentation/risc-v: update ESP32C3|C6|H2 documentation
Improve esptool installation docs.
Update supported peripheral list.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-17 11:31:31 -03:00
Filipe Cavalcanti
6b6247b10e documentation/xtensa: update ESP32|S2|S3 documentation
Improve esptool installation docs.
Update supported peripheral list.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-17 11:31:31 -03:00
Tomasz 'CeDeROM' CEDRO
b37a5277ac 202503 Apache NuttX RTOS Contributing Guidelines update.
* This change comes from vast mailing list discussions on low PR/COMMIT
  quality, breaking changes, code quality, long term self-compatibility
  and maintenance, review problems, and how to improve things.
* Contributing Guidelines updates vote history:
  1. https://www.mail-archive.com/dev@nuttx.apache.org/msg12584.html
  2. https://www.mail-archive.com/dev@nuttx.apache.org/msg12723.html

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-03-17 08:30:37 -03:00
chenwen@espressif.com
b60b54b476 esp32[s2|s3]: Add number of IRQ status lists for PHY initialization configuration
The current default number of IRQ state lists for PHY initialization is 3 (i.e. NR_IRQSTATE_FLAGS).
When calling in a nested manner, the number of times the concurrent behavior enters the critical section exceeds 3, which will trigger an assert crash.
Therefore, the size of NR_IRQSTATE_FLAGS needs to be increased, this PR makes NR_IRQSTATE_FLAGS configurable.
Please refer to the changes of esp-hal-3rdparty: 5d4868f08b

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2025-03-17 12:22:04 +01:00
dongjiuzhu1
cfd359141f fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post.
examples:
There are two threads involved: thread A with a priority of 100 and
thread B with a priority of 101. Here's how they interact:

When thread A releases a semaphore, thread B is scheduled to execute
some code and may reacquire the semaphore. If no other tasks are ready,
thread A will be scheduled to run.
This continuous process can lead to a busy loop.

Thread A:                                                   Thread B:

while (nxsem_get_value(&priv->wait, &semcount) >= 0 &&  <---
       semcount <= 0)                                      |  2)context switch
  {                                  1)contex switch       |
    nxsem_post(&priv->wait);         ------------->     run some code and nxsem_wait again
  }

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-03-17 10:44:26 +01:00
chao an
7a96bee46f audio/composite: merge composite instance allocate to one times
here is not need to allocate two times

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-17 10:26:54 +01:00
Laczen JMS
e83d31bee9 net/udp: correct icmp(v6) response from udp_input
Ensure that the correct icmp(v6) response is generated from udb_input.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-17 09:57:50 +01:00
Laczen JMS
24221b611f arch/xtensa/esp32:espnow pktradio simplify addressing
Modify addressing to allow only 2 byte node address.
Allow modifying the node address by modifying the ipv6 address
(the ipv6 address has a direct relation with the node address)
Introduce the option to add a 4 byte random number to the mac header
as a preparation for ciphered data exchange.
Introduce a FCB (frame control byte) as a replacement for the INFO
field in the mac header.
Update esp32-devkitc:espnow config to reflect address size change.
Update the documentation to reflect address size changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-17 09:15:09 +01:00
Laczen JMS
4ffedf4ec8 arch/xtensa/esp32: espnow pktradio improvements
Split handling of receive and transmit in their own work queue.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-17 09:15:09 +01:00
Lup Yuen Lee
9d80d6bb4f arch/arm64/a527: Add support for Allwinner A527 SoC
This PR adds support for the Allwinner A527 Arm64 SoC.
This will be used by the upcoming port of NuttX for
PINE64 Yuzuki Avaota-A1 SBC.

Most of the code was derived from NuttX for
QEMU Arm64 Kernel Build qemu-armv8a:knsh.
The modified code is explained here:
https://lupyuen.github.io/articles/avaota#appendix-port-nuttx-to-avaota-a1

Modified Files in arch/arm64:

Kconfig: Added ARCH_CHIP_SUNXI for Allwinner 64-bit SoCs.
Added ARCH_CHIP_SUNXI_A527 for A527 SoC.

New Files in arch/arm64:

include/a527/chip.h: A527 Definitions
include/a527/irq.h: External Interrupts
src/a527/chip.h: Memory Map
src/a527/a527_boot.c, a527_boot.h: Startup Code
src/a527/a527_initialize.c: Power Management
src/a527/a527_lowputc.S: UART Output
src/a527/a527_serial.c: Serial Driver
src/a527/a527_textheap.c: Text Heap
src/a527/a527_timer.c: A527 Timer
src/a527/Kconfig: A527 Config
src/a527/Make.defs, CMakeLists.txt: Makefiles

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-17 08:58:29 +01:00
Lup Yuen Lee
99067a6974 Documentation/platforms/arm64/a527: Add support for Allwinner A527 SoC
This PR adds support for the Allwinner A527 Arm64 SoC.
This will be used by the upcoming port of NuttX for
PINE64 Yuzuki Avaota-A1 SBC.

Most of the code was derived from NuttX for
QEMU Arm64 Kernel Build qemu-armv8a:knsh.
The modified code is explained here:
https://lupyuen.github.io/articles/avaota#appendix-port-nuttx-to-avaota-a1

platforms/arm64/a527/index.rst: Added A527 SoC

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-17 08:58:29 +01:00
wangjianyu3
0e71a944b9 drivers/thermal: Update state when temp is stable
Fix cooling state not decreasing error when the temperature is kept at low trip(stable, not dropping).

Test on "sim:thermal", log is from /proc/thermal/cpu-thermal and see thermal/thermal_dummy.c for trip point details.

e.g. The temperature decreasing from 71 to 65 and then kept.
       z:cpu-thermal t:71 t:1 h:16 l:0 c:fan0 s:16|16

     a. Without this patch, the cooling state of "fan0" will be kept at 15, even if the temperature is at a lower trip:
       z:cpu-thermal t:65 t:1 h:16 l:0 c:fan0 s:15|15
       ... ...
       z:cpu-thermal t:65 t:1 h:16 l:0 c:fan0 s:15|15

     b. With this patch, the cooling state of "fan0" was continually decreasing to zero according to current trip point:
       z:cpu-thermal t:65 t:1 h:16 l:0 c:fan0 s:15|15
       ... ...
       z:cpu-thermal t:65 t:1 h:16 l:0 c:fan0 s:0|0

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-17 09:21:52 +08:00
Huang Qi
2aab12ff56 boards/imx6: Add support for mounting tmpfs file system
Implement functionality to mount the tmpfs file system during the bring-up process.
* Added conditional compilation for tmpfs support
* Included error logging for mount failures

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-03-16 12:53:41 -03:00
Yangwei
0491e4db00 arm/nucleo-f746zg: Add board example with feature note
This patch provide a example with note, trace features

Signed-of-by: Yang Wei <yangwei3@lixiang.com>
2025-03-16 13:18:35 +08:00
Yangwei
b03c367501 arm/nucleo-f429zi: Add board flash size config for STM32F429ZI
Add board flash size config to avoid build warning

Signed-off-by: Yang Wei yangwei3@lixiang.com
2025-03-15 13:37:46 +01:00
Yangwei
1fe2deb01b arm/nucleo-f746zg: Exclude DTCM from the heap to avoid warning
This patch add STM32F7_DTCMEXCLUDE config for stm32f746zg.

Signed-off-by: Yang Wei yangwei3@lixiang.com
2025-03-15 13:37:46 +01:00
chenrun1
0532fa408a coredump:adjust BOARD_COREDUMP_COMPRESSION
Summary:
  In order to reduce the cost of using coredump, we disable BOARD_COREDUMP_COMPRESSION by default when it is not necessary.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-15 13:36:43 +01:00
ouyangxiangzhen
1ea3c01062 arch/x86_64: Implement TSC frequency query via CPUID 0x40000010
This commit introduces support for querying TSC frequency using CPUID 0x40000010. This function can be tested with the following command: `sudo qemu-system-x86_64 -enable-kvm -cpu host,+invtsc,+vmware-cpuid-freq -m 2G -kernel nuttx -nographic -serial mon:stdio -s`

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-15 13:35:16 +01:00
Matteo Golin
c009c386cc drivers/wireless/lpwan/rn2xx3: Fix SERIAL dependency
There is no 'UART' symbol to depend on, so this is updated to the
correct symbol, SERIAL.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-03-15 13:31:33 +01:00
Gao Feng
3194ef0e7c arch/xtensa: set PS.EXCM initial value to 1 while new thread created
To avoid level-1 interrupt break retrieve PC/A0/SP/A2 register,
PS.EXCM set to 1 by CPU HW while handling exception/interrupt.

But if context switching happens and new thread created,
the thread initial value of PS.EXCM is used.

Same behevior as ESP-IDF code:
https://github.com/espressif/esp-idf/blob/master/
components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c#L366

Signed-off-by: Gao Feng <Feng.Gao@sony.com>
2025-03-15 11:39:23 +08:00
Rodrigo Sim
c42431a01f boards/arm/rp23xx Add missing header for rp23xx scripts
Add missing header for scripts under rp23xx board folder

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-14 19:16:28 -03:00
Rodrigo Sim
7c5b6e654b boards/arm/rp23xx/xiao-rp2350 Add support to XIAO RP2350 Board
Add initial support for Seeed Studio XIAO RP2350 Board. Initial
support includes serial and usb NuttShell, and a combo
configuration for gpio, leds and ws2812.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-14 19:16:28 -03:00
Eren Terzioglu
8abd5dfd8d arch/esp32[c3|c6|h2]: Fix efuse issue on MCUBoot
Fix build and initialization issues on EFuses using MCUBoot for RISC-V based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-14 11:36:40 -03:00
chenrun1
91d895d9a2 fs/virtio-9p:When virtio-9p is not supported, return -ENODEV
Summary:
  When the operating environment does not support virtio-9p and the virtio-9p server driver is not provided, -ENODEV should be returned for virtio-9p to avoid crash caused by continued execution.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-13 16:37:20 -03:00
chenxiaoyi
e0b02314e6 arch/xtensa: initial support for debugpoint api
Implement up_debugpoint_add/up_debugpoint_remove for xtensa.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-03-13 09:51:03 +01:00
Javier Casas
9c04b9ed4a net/can: Fix NULL dereference for I/O Block
In a recent patch the socketcan timestamp generation was moved
to add it also when there is an active reader (previously the timestamp
was only added before storing the CAN frame in the read-ahead list).

It was working fine but I realized that the can_callback function is
also called when sending frames. In this case, the IO block is not allocated
yet and the code breaks.

This PR is to only generate the timestamp if the IO block is not NULL
(reading path) and skip it when it is NULL (sending path)

Signed-off-by: Javier Casas <javiercasas@geotab.com>
2025-03-13 09:37:55 +01:00
Laczen JMS
96eb5e7819 net: sixlowpan icmpv6 return from udp_input
When a udp frame is processed without a listener a icmp frame is
returned indicating that there is no listener. The PR enables
sending this icmpv6 response over sixlowpan.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-13 12:29:48 +08:00
Ville Juven
4959e269d6 sched/sem_waitirq: Move kmm_map() call to sem_wait()
The kernel mapping should be performed in sem_wait (thread level) as
virtual memory mappings cannot be added from interrupt, at least for now.

The reason?

kmm_map() depends on mm_map_add(), which in turn uses a mutex for mutual
exclusion. Using mutexes from interrupt level is not permitted.

Mapping tcb->waitobj into kernel virtual memory directly in sem_wait()
makes sense, since accessing tcb->waitobj via a user virtual address can
lead to unexpected results (the wrong mappings can be in place).
2025-03-13 12:28:22 +08:00
Michal Lenc
ac3b0adb42 documentation/boot/nxboot: update nxboot documentation
This updates nxboot documentation with the last changes in nuttx-apps
repository.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-03-12 11:18:57 -03:00
Eritque arcus
50c0e13a29 typo: fix incorrect doc 2025-03-12 10:36:30 -03:00
chao an
f8fa86fca3 Documentation/uorb: fix typo in uorb chapter
fix typo "Two Tpyes" -> "Two Types"

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-12 10:35:32 -03:00
Jukka Laitinen
809de89608 arch/risc-v/src/common/riscv_mtimer.c: Correct mtimecmp setting in riscv_mtimer_cancel
Set the compare register to maximum value, UINT64_MAX, which can be expected to be never reached

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-03-12 06:11:59 +08:00
Jukka Laitinen
e398e4a4ff arch/risc-v/src/common/riscv_mtimer.c: Add risc-v tick timer operations
Add the mtimer _tick operations for use when tickless mode is not used.
This corrects the tick-based timing calculations, removing tick timer drift
and rounding errors causing early wdog expirations.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-03-12 06:11:59 +08:00
Rodrigo Sim
2e57ed24a7 boards/arm/stm32f401rc-rs485: Add support to GPIO
This commit adds support to GPIO Subsystem for STM32F401RC RS485 board.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-11 18:39:15 -03:00
Rodrigo Sim
bfc833cd3a Documentation: Fix Seeed Studio XIAO boards name
Fix Seeed Studio XIAO RP2040 and SAMD21 board name,
XIAO should be uppercase.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-11 06:19:35 -03:00
Rodrigo Sim
6922bfe247 Documentation: Add XIAO RP2350 Board
Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-11 06:19:35 -03:00
Aung Khant Maw
1a0a514122 boards/nrf5340dk: add dev gpio support for nrf5340dk
I found that the gpio example code can't be tested on nrf5340-dk.
Enabling CONFIG_DEV_GPIO wouldn't register gpio pins as /dev/gpio*.
NRF5340-dk has 4 LEDs and 4 User Buttons.
By setting CONFIG_DEV_GPIO=y,
- 4 LEDs will be configured as GPIO outputs
- 2 Buttons as GPIO inputs, and
- 2 Buttons as GPIO interrupt inputs
This PR will allows user to test GPIO examples on NRF5340-dk board.

Signed-off-by: Aung Khant Maw <aungkhantmaw64@gmail.com>
2025-03-10 12:39:44 -03:00
chao an
b802632761 audio/pcm_decode: fix typo in assert condition
should be shutdown not start

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-10 08:01:50 -03:00
yangsong8
9c55a19238 driver/syslog: add cdcacm channel
Use the CDCACM as a SYSLOG output device, send message to remote proc.
If there are more than one CDCACM devices, then a device minor number
may also need to be provided. Default: 0

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-10 13:43:54 +08:00
Kyle Wilson
46411495ef arch/arm/STM32H5: Initial ICACHE Support
Add support for the STM32H5 ICACHE peripheral. The CortexM33 does not have typical embedded icache and dcache. Instead STM32H5 provides the ICACHE as a separate peripheral that needs to be configured. This commit adds the stm32h5 specific icache driver. This driver named functions like those in <nuttx/cache.h>. However since the CortexM33 does not have cache itself, ARCH_ICACHE is not enabled. Therefore these stm32h5 specific functions were developed.

Signed-off-by: kywwilson11 <kwilson@2g-eng.com>
2025-03-10 13:24:02 +08:00
ouyangxiangzhen
fa5590d5b1 sched/wdog: Fix int-to-pointer-cast and pointer-to-int-cast warnings.
This commit fixed the wdparm to pointer and pointer to wdparm cast
warnings.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-08 13:52:37 -03:00
ouyangxiangzhen
bcad1d038a sched/wqueue: Rename periodic workqueue API.
This commit renamed the periodic workqueue API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-08 13:52:37 -03:00
ouyangxiangzhen
ed04000626 sched/wqueue: support for periodic workqueue.
This commit added support for periodic workqueue.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-08 13:52:37 -03:00
ouyangxiangzhen
f495cd4ffd sched/wdog: allow wd_cancel_period in the periodical wdog callback.
This commit addresses an issue where calling `wd_cancel_period` within the periodic watchdog callback would fail to cancel the watchdog timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-08 13:52:37 -03:00
ouyangxiangzhen
51399a76d9 sched/wdog: support for periodic wdog.
This commit added support for periodic wdog.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-08 13:52:37 -03:00
wangmingrong1
e28c0b4ef1 arm64: Initialize sctrl_el1 when running fork
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-03-08 23:43:09 +08:00
Tiago Medicci Serrano
e4ca1a2de9 CI: Move esp32s3-devkit:python from xtensa-02.dat to xtensa-03.dat
This prevents CI from testing esp32s3-devkit:python automatically,
avoiding it to be overloaded. Manual testing can be triggered to
test xtensa-03.dat.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-03-08 06:49:23 -03:00
Tiago Medicci Serrano
597b7efffc Documentation/python: Add entries for Python on ESP32-S3
This commit adds the entries in the documentation about running
Python on ESP32-S3.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-03-08 06:49:23 -03:00
Tiago Medicci Serrano
9990695afd esp32s3/python: add support for running Python on ESP32-S3
This defconfig allows using Python on ESP32-S3.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-03-08 06:49:23 -03:00
simbit18
4877e33058 tools/mksyscall: fix 106: Unexpected end of line: "FAR char * co"
line 106 exceeds the 256 character limit

106: Unexpected end of line: "FAR char * co"
make[1]: *** [makefile:108: .context] Error 4
make[1]: Leaving directory 'C:/nxtest/nuttx/syscall'
make: *** [tools/Win.mk:468: syscall\.context] Error 2

fixed tools/csvparser.h from

to

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-03-08 12:39:24 +08:00