Commit graph

57947 commits

Author SHA1 Message Date
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
Daniel Martín Gómez
9ab9b31682 arch/arm/src/stm32f0l0g0: Fix SPI reads when nbits is 8
I found an issue when using SPI with nbits=8: SPI reads return unreliable
results because SPI ignores nbits value and always performs 16-bit reads.

Signed-off-by: Daniel Martín Gómez <danielmartingomez@geotab.com>
2025-03-08 00:19:45 +08:00
SPRESENSE
0938671485 sched/init: Fix build error with CONFIG_BOARD_CRASHDUMP_CUSTOM
Fix build error with the following condition.
- CONFIG_BOARD_CRASHDUMP_CUSTOM=y
- CONFIG_COREDUMP=n

The condition for calling `coredump_initialize()` is incorrect.
CONFIG_BOARD_CRASHDUMP_CUSTOM is not dependent on CONFIG_COREDUMP.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-03-08 00:18:25 +08:00
Javier Casas
73f9ef00e2 net/can: fix timestamp
Fix timestamp in socket CAN. Right now the timestamp is only generated
if there is no reader and the frame is stored in the read ahead list.
This is solved by moving the timestamp generation before the code flow
branch.

Signed-off-by: Javier Casas <javiercasas@geotab.com>
2025-03-07 12:31:40 -03:00
Lup Yuen Lee
e15f7b13c7 Documentation/platforms/risc-v/eic7700x/boards/starpro64: Add photo of PINE64 StarPro64 SBC
This PR adds a photo of PINE64 StarPro64 SBC to the StarPro64 page.
I shot the photo myself with a Sony NEX-7 camera.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-06 10:21:41 +01:00
Roy Feng
70cfe18f0c lpc31xx: typo fix in board olimex-lpc-h3131 document
`NSH_DISABLE_NSFMOUNT` should be `NSH_DISABLE_NFSMOUNT`

Signed-off-by: Roy Feng <roy.feng@sony.com>
2025-03-06 06:11:41 -03:00
Matteo Golin
c1858a23fb Documentation: Add documentation for RN2XX3 driver
Adds a documentation page about the driver's programming interface and
new WLIOC commands.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-03-06 06:10:19 -03:00
Matteo Golin
b9b505a2b2 wireless/lpwan: Add support for the RN903 and RN2483 family of LoRa
radio transceivers. This initial support includes transmit and receive
functionality and configuration and reading of radio parameters like
frequency and bandwidth.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-03-06 06:10:19 -03:00
ouyangxiangzhen
219fb1a717 arch/arm64: Add up_perf_init for qemu.
This commit added up_perf_init for qemu.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-03-06 09:31:32 +01:00
Michal Lenc
9a02572e8e arch/arm/samv7/spi: fix ifdelay setup in spi_setdelay call
ifdelay description (delay between frames) matches the DLYBCT field
(delay between consecutive transfers without removing chip select)
much better compared to stopdelay (delay between last CLK and CS
innactive). The option for stopdelay does not seem to be configurable
in SAMv7 peripheral.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-03-06 09:20:16 +01:00
Filipe Cavalcanti
5e52e75631 drivers/net: update format specifier on lan9250 driver
Fix print statement for uint8 and uint16 types.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-05 19:54:58 +01:00
yangsong8
9bfde6b934 drivers/syslog: add ramlog write multiple bytes for interrupt handler
make sc_write_force pointing to ramlog_write in struct syslog_channel_ops_s.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 13:47:05 -03:00
Lup Yuen Lee
3235ee8836 Documentation/platforms/risc-v/eic7700x/boards/starpro64: Add support for PINE64 StarPro64 SBC (ESWIN EIC7700X SoC)
This PR adds support for the PINE64 StarPro64 64-bit RISC-V SBC,
based on ESWIN EIC7700X SoC. Most of the code was derived from NuttX
for Milk-V Duo S (SOPHGO SG2000). The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

`platforms/risc-v/eic7700x/index.rst`:
  Added StarPro64 to EIC7700X SoC
`platforms/risc-v/eic7700x/boards/starpro64/index.rst`:
  Building and booting NuttX for StarPro64

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-05 12:52:44 -03:00
Lup Yuen Lee
d52e5b2eb0 boards/risc-v/eic7700x/starpro64: Add support for PINE64 StarPro64 SBC (ESWIN EIC7700X SoC)
This PR adds support for the PINE64 StarPro64 64-bit RISC-V SBC,
based on ESWIN EIC7700X SoC. Most of the code was derived from NuttX
for Milk-V Duo S (SOPHGO SG2000). The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

Modified Files:

boards/Kconfig: Added StarPro64 board

New Files in boards/risc-v/eic7700x/starpro64:

src/eic7700x_appinit.c: Startup Code
include/board.h: StarPro64 Definitions
include/board_memorymap.h: Memory Map
src/etc/init.d/rc.sysinit, rcS: Startup Script
src/.gitignore: Ignore the tmp filesystem
scripts/ld.script: Linker Script
scripts/Make.defs: StarPro64 Makefile
src/Makefile: StarPro64 Makefile
Kconfig: StarPro64 Config
configs/nsh/defconfig: Build Config for starpro64:nsh

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-05 12:52:44 -03:00
yangsong8
21c8ed80bd boards/defconfig: remove fixed CDCACM BUFFER SIZE
Use usb req buf to replaced cdcacm rxbuffer and txbuffer,
so this macro is no longer needed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 12:52:00 -03:00
yangsong8
c497c5feb0 drivers/serial/cdcacm: Reduce one copy of data between serial and cdcacm framework
Data form serial framework will be written to usb reqbuf directly,
and data form cdcacm will be read form reqbuf directly.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 12:52:00 -03:00
Filipe Cavalcanti
3011a19f1a documentation/esp32s3: add qemu_toywasm defconfig
Add description of qemu_toywasm defconfig to ESP32S3 documentation.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-05 15:53:36 +01:00
Filipe Cavalcanti
a00730e6f1 boards/esp32s3: move QEMU toywasm to different defconfig
Create a separate defconfig for running WebAssembly in QEMU for the ESP32S3.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-05 15:53:36 +01:00
Jukka Laitinen
20378b0150 arch/risc-v/common: Fix unaligned stack access on 64-bit risc-v
This fixes a crash at boot on 64-bit risc-v systems which need to store
64-bit registers to the stack aligned to 8 byte boundary.

Specifically, this uses 8 bytes to store ra and s0 on rv32 and 16 bytes on
rv64, and does the register stores and loads properly aligned acc. to the
register size.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-03-05 15:50:03 +01:00
chao an
fc870d0984 libc/strings: fix compile warning if enable -Wshadow
Replace inline functions with macros to avoid confilcts with builtin definition

nuttx/include/strings.h:80:28: warning: declaration of 'ffs' shadows a built-in function [-Wshadow]
   80 | static inline_function int ffs(int j)
      |                            ^~~
nuttx/include/strings.h:94:28: warning: declaration of 'ffsl' shadows a built-in function [-Wshadow]
   94 | static inline_function int ffsl(long j)
      |                            ^~~~
nuttx/include/strings.h:109:28: warning: declaration of 'ffsll' shadows a built-in function [-Wshadow]
  109 | static inline_function int ffsll(long long j)
      |                            ^~~~~

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-05 11:20:01 -03:00
Felipe Moura
94f210ded6 arch/risc-v/espressif: Remove usb serial workaround for esp32 modules
This commit includes a change to the esp_txint function in the arch/risc-v/src/common/espressif/esp_usbserial.c file. The change primarily involves removing an optimization workaround and adding a call to flush the transmit FIFO.

After this change the usbserial config is able to work using all optimization levels.

Changes in esp_txint function:

Removed the __attribute__((optimize("O0"))) workaround.
Added a call to usb_serial_jtag_ll_txfifo_flush() at the beginning of the function.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2025-03-05 10:59:53 +01:00
yangsong8
7bad94a964 drivers/usbhost: recognize sim usb cdcacm composite device
In the USB interface descriptor of the cdcacm device, class:2 (CDC)
subclass:2 (ACM) protocol:0 (NONE) may appear. At this time, the
usb host does not match the correct protocol byte, which will cause
the device identification to fail.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 10:11:29 +01:00
Michal Lenc
66f464936a drivers/lcd/st7789: add option for SPI delay control
It is now possible to configure SPI delays for st7789 controller if
CONFIG_SPI_DELAY_CONTROL is set. Default values for SPI peripheral
may be too long or too short, therefore the display controller set
its own values as required. The default values in configuration
are taken from the reference manual, but it is possible they may
require tuning for different revisions or temperatures for
example.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-03-05 09:18:56 +01:00
Lup Yuen Lee
825b745408 arch/risc-v/eic7700x: Add support for ESWIN EIC7700X SoC
This PR adds support for the ESWIN EIC7700X RISC-V SoC.
This will be used by the upcoming port of NuttX for PINE64 StarPro64 SBC.

Most of the code was derived from NuttX for SOPHGO SG2000 SoC.
The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

Modified Files in arch/risc-v:

Kconfig: Added ARCH_CHIP_EIC7700X for EIC7700X SoC

New Files in arch/risc-v:

include/eic7700x/chip.h: EIC7700X Definitions
include/eic7700x/irq.h: External Interrupts
src/eic7700x/chip.h: Interrupt Stack Macro
src/eic7700x/eic7700x_allocateheap.c: Kernel Heap
src/eic7700x/eic7700x_head.S: Linux Header and Boot Code
src/eic7700x/eic7700x_irq.c: Configure Interrupts
src/eic7700x/eic7700x_irq_dispatch.c: Dispatch Interrupts
src/eic7700x/eic7700x_memorymap.h: Memory Map
src/eic7700x/eic7700x_mm_init.c, eic7700x_mm_init.h: Memory Mgmt
src/eic7700x/eic7700x_pgalloc.c: Page Allocator
src/eic7700x/eic7700x_start.c: Startup Code
src/eic7700x/eic7700x_timerisr.c: Timer Interrupt
src/eic7700x/hardware/eic7700x_memorymap.h: PLIC and UART Base Address
src/eic7700x/hardware/eic7700x_plic.h: PLIC Register Addresses
src/eic7700x/Kconfig: EIC7700X Config
src/eic7700x/Make.defs: Makefile

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-04 09:27:48 -05:00
Lup Yuen Lee
76dfa9af57 Documentation/platforms/risc-v/eic7700x: Add support for ESWIN EIC7700X SoC
This PR adds support for the ESWIN EIC7700X RISC-V SoC.
This will be used by the upcoming port of NuttX for PINE64 StarPro64 SBC.

Most of the code was derived from NuttX for SOPHGO SG2000 SoC.
The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

platforms/risc-v/eic7700x/index.rst: Added EIC7700X SoC

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-04 09:27:48 -05:00
yangsong8
02f55f2c70 boards/sim: enable ADB shell service
enable adb shell service when build usbdev

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-04 11:20:50 -03:00
zhanghongyu
7f0a670bde net/socket/getsockopt: move the options check to the upper layer
check parameters at the top level to avoid errors when assigning
values in si_getsockopt.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-03-04 09:29:06 +01:00