Commit graph

57996 commits

Author SHA1 Message Date
wangjianyu3
a99c1839f1 boards/xtensa: Add support for szpi-esp32s3
Add configurations for nsh, adb, fastboot, etc.

Build & Burn

  ./tools/configure.sh -l lckfb-szpi-esp32s3:adb
  make flash -j8 ESPTOOL_PORT=/dev/ttyUSB0

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-22 08:40:40 +08:00
wangjianyu3
0dc3445bbd Documentation/esp32s3: Add doc for SZPI ESP32-S3
Add documentation for LCKFB SZPI ESP32-S3.

Official website: https://wiki.lckfb.com/zh-hans/szpi-esp32s3/

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-22 08:40:40 +08:00
Eren Terzioglu
453c6f75cf Documentation/esp32: Add snake defconfig docs for esp32
Add snake defconfig docs for esp32 devkitc board

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-21 10:28:45 -03:00
Eren Terzioglu
9c2b481cfe boards/esp32: Add snake defconfig
Add snake defconfig for esp32 devkitc board

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-21 10:28:45 -03:00
Eren Terzioglu
8ffc6689f4 Documentation/games: Add snake game docs
Add snake game documentation on docs

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-21 10:28:45 -03:00
wangjianyu3
e513cea6da boards/esp32s3: Merge common configurations
So that when adding new boards, duplicate content will not be copied.

Test:

  1. Refreshing board configurations

    ./tools/refresh.sh --silent arch:xtensa

  2. Check if there is anything missing

    $ git diff HEAD . | grep "^[+-]" | sed 's/^[-+]*//' | sed 's/^ [ab]*//' | grep -v "^$" | sort -u | wc -l
    66
    $ git diff HEAD . | grep "^[+-]" | sort -u | wc -l
    132

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-21 08:51:46 -03:00
raiden00pl
19a99205c2 include/nuttx/math.h: add missing HUGE_VALF and HUGE_VALL
add missing HUGE_VALF and HUGE_VALL definitions to NuttX math.h

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-21 08:57:13 +01:00
Lup Yuen Lee
cf6781efad boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC)
This PR adds support for the PINE64 Yuzuki Avaota-A1 SBC,
based on Allwinner A527 Arm64 SoC.
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:

boards/Kconfig: Added Avaota-A1 board

New Files in boards/arm64/a527/avaota-a1:

src/a527_appinit.c: Startup Code
src/a527_boardinit.c: Init Code
src/a527_bringup.c: Bringup Code
src/a527_power.c: Power Off and Reset
src/avaota-a1.h: Board Declarations
include/board.h: Board Definitions
include/board_memorymap.h: Memory Map
scripts/ld.script, gnu-elf.ld: Linker Scripts
Makefile, scripts/Make.defs: Makefiles
CMakeLists.txt, src/CMakeLists.txt: CMakefiles
Kconfig: Avaota-A1 Config
configs/nsh/defconfig: Build Config for avaota-a1:nsh

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-21 07:17:07 +08:00
Lup Yuen Lee
79f0f530a0 Documentation/platforms/arm64/a527/boards/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC)
This PR adds support for the PINE64 Yuzuki Avaota-A1 SBC,
based on Allwinner A527 Arm64 SoC.
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 Avaota-A1 to Allwinner A527 SoC

platforms/arm64/a527/boards/avaota-a1/avaota-a1.jpg:
  Photo of Avaota-A1, taken by me

platforms/arm64/a527/boards/avaota-a1/index.rst:
  Building and booting NuttX for Avaota-A1

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-21 07:17:07 +08:00
raiden00pl
35818c5f87 arch/arm: add missing itm_syslog.h include
add missing itm_syslog.h include for archs that use itm_syslog_initialize()
to fix compiler errors:

  error: implicit declaration of function 'itm_syslog_initialize'

Issue reported by rentzboy in https://github.com/apache/nuttx/issues/16017

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-19 12:17:28 -03:00
Gao Feng
4b8e19b2c7 Revert "arch/xtensa: set PS.EXCM initial value to 1 while new thread created"
This reverts commit 3194ef0e7c.

since level-2 and above interrupt, PS.EXCM is still 1.
window rotation related instruction is undefined behavior.

https://github.com/apache/nuttx/pull/15985#issuecomment-2728509964
2025-03-19 11:47:31 -03:00
Filipe Cavalcanti
e0e562360e boards/xtensa/esp32s3: modify ARCH_CHIP for psram_usrheap
Change the ESP32S3-WROOM-2-N16R8V to ESP32S3-WROOM-1-N8R2.
Reason: not testing on 16MB but successfully tested smaller flash and PSRAM.
Also updated documentation on this defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-19 15:23:04 +01:00
Filipe Cavalcanti
238e0c05ac arch/xtensa/esp32s3: add ARCH_CHIP_ESP32S3WROOM1N8R2 option to ESP32S3
Add support for module with 2MB PSRAM and 8MB flash.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-19 15:23:04 +01:00
Ville Juven
3764ed06df arch/mcx-nxxx: Add LPTMR register descriptions
Add register definitions to control LPTMR (Low Power Timer)

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-03-19 20:00:38 +08:00
Ville Juven
c1726898fa arch/mcx-nxxx: Add SYSCON_CLOCKCTRL register definition
Adds register definitions to control FRO clock

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-03-19 20:00:38 +08:00
simbit18
34c4b15b4d tools/ci: Added CI system on Windows Native
This PR adds support for the CI system for native Windows as well. It allows you to build NuttX on GitHub and test it locally for Windows users.

With these CI tools with PowerShell scripts, it is possible to build NuttX for Windows Native using (for now only) Cmake + Ninja with the same logic as the CI system with Bash scripts.

This allows the msvc job to be used not only with the simulator (currently only with Visual Studio 17 2022), but also with other architectures using the same Windows runner to get more coverage and avoid future breakage.
As with the other jobs, we use artifacts to save the compilation result at the end of the workflow execution (previously for the simulator it was not done).

The proposed solution is based on the following additions and modified:

Modified Files
buildyml -> only CI Jobs MSVC

New Files in tools/
ci/cibuild.ps1 -> Added Powershell script for Run the CI Builds
ci/platforms/windows.ps1 -> Added Powershell script for installing toolchains and tools.
testlist/windows.dat -> Target (Add sim (msvc), risc-v arm)
tools/testbuild.ps1

We tested the NuttX build on GitHub and locally.

How we build on GitHub and test locally.

Locally
cd .\nuttx\tools\ci\

.\cibuild.ps1 -n -i -A -C -N .\testlist\windows.dat

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-03-19 19:59:44 +08:00
Inochi Amaoto
f0f54be9f9 arch/risc-v: Fix wrong source name in make script
AIA releted source files in the Make.defs are not right.
Replace them with the right source.

Fixes: 5f70307111 ("arch/risc-v: introduce AIA support")
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
2025-03-19 09:19:37 +01:00
Tomasz 'CeDeROM' CEDRO
5ad4667a63 tools/checkpatch: Use gmake on BSD, make otherwise.
* BSD has its own BSD Make that is incompatible with GNU Make.
* When BSD is detected use (gnu) gmake in place of (bsd) make.
* This fixes nxstyle build inside tools/checkpatch.sh.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-03-19 09:09:32 +01:00
Angus Jull
c7d72bc95c drivers/sensors/fakesensor: Add baro sensor type
Add a function `fakesensor_read_baro` that allows barometric data to be
read and published by fakesensor

Signed-off-by: Angus Jull <angusjull1@gmail.com>
2025-03-19 09:08:06 +01:00
Tomasz 'CeDeROM' CEDRO
3eddfe51fa tools/bdf-converter: Fix loop termination condition.
Changing readingbitmap from bool to int, initializing it to the number
of bitmaps allocated, decrementing it each time a bitmap is consumed,
and using it as the termination condition for the while loop,
ensures that loop termination does not depend on data from the file.

Note: Patch provided by Nathan Hartman.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-03-18 10:12:23 -03:00
Tiago Medicci Serrano
b1bab5c783 fs/vfs/fs_poll: Add noinstrument_function to poll_notify function
Add the noinstrument_function attribute to the poll_notify function
to avoid it being looped if -finstrument-functions is set to the
fs/vfs files.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-03-18 09:17:52 +08:00
chao an
bf73fbe774 sched: simplify call of get current tcb
Replace get current tcb method from nxsched_get_tcb(nxsched_gettid()) to this_task(),
change two function calls with inline function to improve performance:

FAR struct tcb_s *tcb = nxsched_get_tcb(nxsched_gettid());
FAR struct tcb_s *tcb = this_task();

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-18 00:22:37 +02:00
Ari Kimari
4bfbe82a3e arch/arm64/imx9: Support for imx9 edgelock enclave
Moved imx9 edgelock enclave (ELE) handling from imx9_trdc.c to own imx9_ele.c file.
Add some new messages to ele API.
Updated ele fw version to 1.3.0.
Fix channel bug on imx9_ele_sendmsg() and imx9_ele_receivemsg()

Signed-off-by: Ari Kimari <ari.kimari@tii.ae>
2025-03-17 21:35:25 +02:00
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