Commit graph

58228 commits

Author SHA1 Message Date
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
Joshua Lange
78f35c836c arch/arm/stm32h5: Fix ADC internal channel configuration.
Properly configure internal channels on STM32H5 ADC when selected

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-04-15 10:54:33 +08:00
Carlos Sanchez
dd53c34722 net/netdev: Change SIOCSCANBITRATE to require interface down.
Previously, SIOCSCANBITRATE brought the iterface up to ensure changes
where immediately applied. This was confusing, see
https://lists.apache.org/thread/g8d0m6yp7noywhroby5br4hxt3r4og2c
Now SIOCSCANBITRATE fails is interface is up.
All existing SocketCAN drivers updated.

Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
2025-04-15 01:59:57 +08:00
Angelo Rison K
732d811ea9 added cmakelists to tm4c123g-launchpad 2025-04-15 01:59:35 +08:00
zhangshoukui
2a38ce37d7 boards/Kconfig: BOARDCTL_APP_SYMTAB Add depends on LIBC_EXECFUNCS
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-13 11:58:08 +08:00
zhangshoukui
927fe5bc2a drivers/serial/Kconfig: TTY_LAUNCH depends on SCHED_HPWORK
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-13 11:58:08 +08:00
Abhishek Choithani
7ff199331e Documentation: fix typo in comments 2025-04-11 22:31:30 +08:00
stbenn
3abdec8af1 arch/arm/stm32h5: implement flash driver for progmem
H5 implementation of functions defined in include/nuttx/progmem.h.
The driver supports a subset of the flash peripheral functions.
  - Assumes non-secure memory accesses. Does not check for memory protection mechanisms.

References implementation in arch/arm/src/stm32h7/stm32h743xx_flash.c
2025-04-11 11:20:19 -03:00
simbit18
97155ae09d [nxstyle] fix Relative files path
fix Relative file path does not match actual file.
2025-04-11 20:59:33 +08:00
Tiago Medicci Serrano
d7dabc90f6 arch/risc-v/espressif: Disable esptool's stubs for ESP32-C3
This commit disables the esptool's stubs when flashing ESP32-C3
(`CONFIG_ESPRESSIF_ESPTOOLPY_NO_STUB=y`) if the serial/JTAG console
is enabled (`CONFIG_ESPRESSIF_USBSERIAL=y`).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-11 16:20:13 +08:00
Tiago Medicci Serrano
d69f349787 arch/risc-v/espressif: Fix bug with usbconsole and DEBUG_FEATURES
This commit fixes a bug on the `usbconsole` defconfigs for
Espressif's RISC-V SoCs when the serial/JTAG is used and the
Kconfig macro `DEBUG_FEATURES` is enabled. This config enables the
`showprogress` macro during start-up. Previously, `riscv_lowputc`
function was used by this macro, but it is not suitable for the
serial/JTAG console. Instead, use the `esp_rom_printf` function
that is suitable for both serial/JTAG and UART consoles.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-11 16:20:13 +08:00
Jukka Laitinen
1645f4ac10 arch/mpfs/usb: Align usb_ctrlreq_s properly to 32-bit boundary
The alignment of the ctrlreq was correct by luck, and was broken
when the spinlock was added to the structure. In non-smp configurations
spinlock_t is currently 8-bits, causing wrong alignment of the
ctrlreq structure.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-11 16:19:37 +08:00