Commit graph

58239 commits

Author SHA1 Message Date
Leo Chung
5a1426d632 risc-v/esp32h2:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Leo Chung
931d80683d risc-v/esp32c3:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Leo Chung
d314329792 risc-v/esp32c6:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Serg Podtynnyi
37a1748dd3 arch/arm/rp23xx: fix irq priority levels
The RP2350 datasheet (Table 198) states that IRQ priority levels are
represented using 4 bits

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 20:59:42 -03:00
Serg Podtynnyi
c531de3329 arch/arm/rp23xx: Address the spinlock errata RP2350-E2
Due to Errata RP2350-E2 use only safe spinlocks during start and testset

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 20:59:23 -03:00
Serg Podtynnyi
9078ffa407 Documentation: update rp2350 peripheral status
Mark i2c and PWM as Working

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 17:04:55 -03:00
Matteo Golin
0cb7bd7f76 wireless/lpwan/rn2xx3: Fix invalid sync word bug.
This commit resolves issue #16009, where a sync word of less than 64
bytes was printed as 0-padded hex. 0-padding is invalid for the RN2xx3
modules, so now it has been removed.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-04-20 16:55:45 -03:00
Matteo Golin
da982e113e drivers/sensors/lis2mdl: Fix SYSLOG call.
This call to syslog was missing the '%' in its format string, and also
was using the wrong format string (lu instead of d) to print the `cmd`
argument. It is corrected and the compiler warning resolved.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-04-20 16:54:47 -03:00
Alan Carvalho de Assis
3fd22d40d8 Documentation: Fix bad practice instructions
It is not recommend to just copy defconfig to .config instead of
running ./tools/configure.sh. The configure script will do more
than just copying the defconfig, it will create backup config,
it will check if apps/ dir exists, etc.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-04-20 09:45:54 +08:00
dongjiuzhu1
b233d1494d Documentation: remove unused dd config
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:26 +08:00
dongjiuzhu1
c2abe4e994 boards/defconfig: remove unused config about dd
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:26 +08:00
Laczen JMS
dd29b8a4cf Documentation/applications/examples/elf/index.rst: Update for PR #3062 in nuttx-apps
Update the documentation to align with https://github.com/apache/nuttx-apps/pull/3062

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-19 08:55:13 -03:00
simbit18
047a40917c Cmake: Implement CMake build of Tiva arch
added TI/Stellaris Tiva

CMake added tm4c1294-launchpad and tm4c123g-launchpad board

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-04-19 08:53:18 -03:00
zhangshoukui
d3bb1eab0a fs/littlefs: Add read-only parameter
Test command:
./tools/configure.sh -l sim:tcpblaster
make -j
umount /mnt/lfs
mount -t littlefs -o ro /dev/rammtd /data

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-18 12:30:29 +08:00
zhangshoukui
60111786d6 fs/littlefs: Code comment correction
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-18 12:30:29 +08:00
Filipe Cavalcanti
6a721b859c boards/xtensa: fix build errors related to data types on ESP32|S3
Fix format specifier macros after compiler type changes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>

Fix boards with PRI
2025-04-18 09:32:58 +08:00
Filipe Cavalcanti
b8e9bc3313 arch/xtensa: fix build errors related to data types on ESP32|S2|S3
Fix format specifier macros after compiler type changes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Filipe Cavalcanti
0715c584b7 arch/xtensa: use compiler's definition of uint32 and int32
Modify types.h and inttypes.h to use the correct _int32_t and _uint32_t types.
Type is now defined according to recent compiler versions.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Tiago Medicci Serrano
ca664fd431 Documentation: Update openocd-esp32 command for all Espressif Socs
This updated the command used for running the openocd-esp32 for
all the supported Espressif's SoCs. It enables using SW-defined
breakpoints.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
956915ff97 risc-v/esp32h2: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
cb25b45d92 risc-v/esp32c6: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
c566cf51a2 risc-v/esp32c3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
2bbafcacc1 xtensa/esp32s3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
31b6cdac6d xtensa/esp32s2: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
7a3e67d59a xtensa/esp32: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Jukka Laitinen
edaa074e51 include/nuttx/atomic.h: For each ATOMIC func, cast the parameters to (FAR intXX_t *) of correct size
This fixes useless -Wpointer-sign errors with clang when doing atomic operations on unsigned datatypes.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-17 20:14:15 +08:00
Jukka Laitinen
1658ee4abf wireless/ieee802154: Replace direct access to semaphore value with nxsem_get_value
Use the defined interface to fetch the semaphore count in DEBUGASSERT

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-17 20:13:40 +08:00
YAMAMOTO Takashi
de12b6ae82 esp32-devkitc/wamr_wasi_debug: bump wamr version
to contain this change:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/4189

for:
https://github.com/apache/nuttx/pull/16022

note: this is the only config with CONFIG_INTERPRETERS_WAMR_DEBUG_INTERP
enabled in the tree.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-17 15:37:00 +08:00
Filipe Cavalcanti
2ff8199d90 documentation: update docs on ADC support for Espressif devices
Add documentation for ADC on RISC-V and Xtensa Espressif devices.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Filipe Cavalcanti
238a5250f6 boards/risc-v: ADC support on Espressif devices
Adds adc defconfig and board support for: esp32c3-generic, esp32c6-devkitc and esp32h2-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Filipe Cavalcanti
643b3586c3 boards/xtensa: ADC support on Espressif devices
Adds adc defconfig and board support for: esp32-devkitc, esp32s2-saola-1 and esp32s3-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Filipe Cavalcanti
55fbf93c9c arch/risc-v: ADC support for ESP32-C3|C6|H2
Add common source for ADC that supports ESP32-C3|C6|H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Filipe Cavalcanti
99099a1a9d arch/xtensa: ADC support on ESP32|S2|S3
Add common ADC source for ESP32|S2|S3.
Remove legacy ADC from ESP32S3.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-17 13:56:40 +08:00
Tiago Medicci Serrano
a0cc89349f boards/xtensa/esp32: Fix the SPI Flash MTD block device number
This commit fixes the SPI flash MTD block device number if OTA's
partitions are present. In this case, the OTA partitions are
registered first and the corresponding MTD block device drivers
are assigned with the numbers corresponding to those partitions.
Then, the additional SPI flash partition should consider that when
registering its own corresponding MTD block device driver.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-17 13:48:46 +08:00
Carlos Sanchez
d976c66edf net: use bps units for bitrate in SocketCAN interfaces.
This makes units compatible with what Linux uses for SocketCAN bitrate
and allows representing usual Single Wire Can (SAE J2411) usual bitrates
of 33333 and 83333 bps.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-16 11:07:27 -03:00
simbit18
7af6b8c63d arch/arm/src/armv6-m/CMakeLists.txt: fix undefined reference to `up_show_cpuinfo'
Aligned Cmakefile with Make.defs PR #10132

fix

FAILED: nuttx
C:\WINDOWS\system32\cmd.exe /C "cd . && D:\nx20250410\tools\gcc-arm-none-eabi\bin\arm-none-eabi-gcc.exe  --specs=nosys.specs   -Wl,--print-memory-usage -Wl,--entry=__start -nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map @CMakeFiles\nuttx.rsp -o nuttx && cd ."
D:/nx20250410/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: fs/libfs.a(fs_procfscpuinfo.c.obj): in function `cpuinfo_read':
D:/rp2040/nuttx/fs/procfs/fs_procfscpuinfo.c:160:(.text.cpuinfo_read+0xa): undefined reference to `up_show_cpuinfo'

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-04-16 21:25:55 +08:00
Tiago Medicci Serrano
0cec2bd662 arch/risc-v/espressif: Bump common source version
This commit bumps common source version for RISC-V-based Espressif
SoCs on NuttX. Specifically, this solves an issue regarding SPI
flash frequency selection on ESP32-C6.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-16 21:25:38 +08:00
Tyler Bennett
1f53575192 arch/arm/stm32h5: GPDMA Hardware files
Add the hardware register definition file for the GPDMA peripheral.
This is necessary to support implementing dma driver in the future.

Also adds skeleton arch dma header that includes the hardware file.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-16 21:16:24 +08:00
Carlos Sanchez
8f1d670a83 arch/arm/src/stm32h7: unassigned ret variable in SIOCSCANBITRATE.
This problem was introduced in https://github.com/apache/nuttx/pull/16199

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-16 18:11:33 +08:00
Jukka Laitinen
b5144afd03 drivers/video/vnc: Replace direct semcount access with nxsem_get_value
Use the dedicated nuttx internal interface for debugging semaphore value,
instead of accessing it directly.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-16 18:11:01 +08:00
Tiago Medicci Serrano
40c6af6dec Revert "libs/libc/semaphore: Fix DEBUGASSERTS"
This reverts commit 300992203a to
fix a problem with `esp32-devkitc:blewifi`, which fails to boot up
if `CONFIG_DEBUG_ASSERTIONS=y`.

Introduced by https://github.com/apache/nuttx/pull/16176 with the
following description:

> The DEBUGASSERTS in nxsem_wait and nxsem_trywait are
non-functional, they don't check anything. These were broken in
previous commits.

The above statements are not valid. Originally, there was no
problem calling `nxsem_trywait` from the interrupt and the
`DEBUGASSERT` simply checked a corner case: if ran from the
interrupt context, the current (interrupted) task may be the idle
task. This case is allowed only if called from an interrupt and
that's what the original commit checks with:

```
  DEBUGASSERT(!OSINIT_IDLELOOP() || !sched_idletask() ||
              up_interrupt_context());
```
2025-04-16 10:10:56 +08:00
Tyler Bennett
1b08c1d522 arch/arm/stm32h5: organize peripheral Kconfig selection
Added menus for usart, I2C, and SPI selection to make the peripheral selection submenu easier to navigate.

Added DMA1 and DMA2 selection options.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-16 10:08:45 +08:00
anjiahao
28ad852a6c arch/xtensa:add crt0 to initialize environment
we use crt0 inside of start hook in pr https://github.com/apache/nuttx/pull/16154, so xtensa also need add it.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-16 01:24:57 +08:00
Mathieu David
7281d91fbc Support ethernet without MDIO & MDC lines 2025-04-16 01:22:24 +08:00
Serg Podtynnyi
8ac09bcf3d arch/arm/rp23xx: Fix IRQ prioritize
Fixes the reg addresses that were copied from armv6 rp2040 to the actual
armv8 spec

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-16 01:19:43 +08:00
Serg Podtynnyi
5ddc67b129 arch/arm/rp23xx: Fix PWM registers access
Fix offset alignment and correct the PWM enable register name

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-15 17:02:37 +08:00
Julian Oes
96fef53ee9 stm32h7: enable Ethernet for STM32H7X7XX 2025-04-15 15:14:09 +08:00
Joshua Lange
9643ee78aa arch/arm/stm32h5: Fix i2c compiler warnings.
Add missing break statements to i2c driver to avoid complaints from compiler.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:56:23 +08:00
Joshua Lange
1c4ac3dfe7 arch/arm/stm32h5: copy bss and initialized data before configuring any hardware
Some hardware configurations require bss and data initialization before being called.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>

Fix nxstyle errors
2025-04-15 10:56:01 +08:00
Joshua Lange
3d848810b7 arch/arm/stm32h5: Add USART6 serial driver config.
Adds Kconfig options to select UART6 for the STM32H5, and updates the architecture files accordingly.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:55:30 +08:00