Commit graph

859 commits

Author SHA1 Message Date
Filipe Cavalcanti
8c932b50fb boards/risc-v: fixes SPI Flash for MCUBoot usage
Adds partitions required for MCUBoot usage and a sample defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-22 10:55:08 -03:00
jingfei
db54331479 drivers/fs:Always use register_mtddriver() to register the MTD device (patch2)
This is a supplement to the patch:1936126210a56b6d1b033d6d940669413dd6e1b0

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code.

So we have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize()  with register_mtddriver().
2025-07-21 15:15:30 -03:00
Filipe Cavalcanti
bd18bda0d7 boards/risc-v: add SDMMC defconfigs for ESP32C3|C6|H2
Adds defconfig to support SDMMC over SPI for esp32c3-generic, esp32c6-devkitc,
esp32c6-devkitm and esp32h2-devkit.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
Filipe Cavalcanti
6f19c59d26 boards/risc-v: add support for SD Card over SPI on ESP32-C3|C6|H2
Add board support for SD Card over SPI for ESP32C3, ESP32C6 and ESP32H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 10:24:21 -03:00
jingfei
d12cf1cb75 drivers/fs:Always use register_mtddriver() to register the MTD device.
We have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize() and bchdev_register() with
register_mtddriver().

When registering MTD devices via register_mtddriver(),
FTL and BCH wrappers will be added during the open() process:

1. Character Device Mode:
   When accessing the MTD device node via the open() interface,
   the device will be automatically converted to a character
   device. Both FTL and BCH wrappers will be implicitly added,
   provided that BCH support is enabled in the configuration.

2. Block Device Mode:
   When accessing the MTD device node via open_blockdriver(),
   the device will be treated as a block device, with only
   the FTL wrapper automatically applied.

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code and should
be used only internally within fs and driver code.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
Eren Terzioglu
8995226e0a arch/risc-v: Add LP I2C for esp32[-c6]
Add LP I2C peripheral support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
b7f98a939e boards/risc-v: Add board layer SHA accelerator support for esp32[-c3|-c6|-h2]
Add board layer SHA accelerator support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Filipe Cavalcanti
26eb2833cc boards/risc-v: fix config for SPI and I2C drivers
Replaces CONFIG_I2C_DRIVER with CONFIG_I2C for proper build requirements.
Same for SPI. Also changes some logging to syslog.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-08 11:04:05 +08:00
Filipe Cavalcanti
e57d2a5247 arch/risc-v: update lower-half drivers for ESP32-C3|C6|H2 2025-06-30 22:40:26 +08:00
michal matias
e0ba2efdca boards/risc-v/esp32c6: Add the NCV7410 10BASE-T1S MAC-PHY support for the ESP32-C6 boards
This commit adds NCV7410 10BASE-T1S SPI MAC-PHY support for
* esp32c6-devkitc
* esp32c6-devkitm

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-06-29 09:11:46 -03:00
wangjianyu3
5079105e17 boards: net tcp backlog is enabled by default
The configuration NET_TCPBACKLOG is enabled by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-26 09:32:54 -03:00
Tiago Medicci Serrano
14af1c6ef7 boards/risc-v/qemu-rv: Add missing section on ld-nuttsbi.script
Fix an issue regarding the `rv-virt:nsbi` defconfig, which wasn't
booting properly because `sbi_set_mtimecmp` failed to get the
mtimecmp's register address when evaluating `g_mtimecmp`. This
variable, which should be located at the `.noinit` section, wasn't
being set accordingly by the linker script, ending up on `bss
section which is zero-initialized, overwriting its value previously
set by `sbi_init_mtimer`.
2025-06-22 14:57:11 +08:00
Anthony Tran
e82d69533c riscv qemu-rv: fix kernel mapping by enabling CONFIG_MM_KMAP in knsh defconfig 2025-06-12 10:11:57 -03:00
Lars Kruse
3ce85ca54e style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
Martin Vajnar
68b22fee3c Update defconfigs
Remove SENSORS and SENSORS_QENCODER as it is selected by ESP_PCNT_AS_QE.
2025-05-16 11:10:29 -03:00
Martin Vajnar
3e100e3c86 esp32[c6|h2|s2|s3]: Assign Edge/Level GPIO pin numbers when in Quadrature Encoder mode
Only 2 pins are needed in this mode for both channels. The wiring
is such that Edge and Level pins are cross-connected for both
channels.
2025-05-16 11:10:29 -03:00
Martin Vajnar
51a75e622f esp32[c6|h2|s3|s2]: Fix assignment of Edge/Level GPIO pins in PCNT 2025-05-16 11:10:29 -03:00
Eren Terzioglu
21e580b9c4 boards/risc-v: Add dedicated GPIO board level support for esp32[-c3|-c6|-h2]
Add board level dedicated GPIO support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
521e1b15b6 boards/risc-v: Add board layer support of SDM for esp32[-c3|-c6|-h2]
Add SDM board layer support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-09 19:20:47 +08:00
Rodrigo Sim
7a64c86c1b boards/risc-v/esp32c6 Add initial support to Seeed Studio XIAO ESP32c6
This commit introduces initial support for the Seeed Studio XIAO ESP32C6
board. Five configurations are available:
- nsh: Basic NuttShell support over UART0
- usbnsh: Basic NuttShell support over USB
- gpio: NuttShell over USB + GPIO
- wifi: NuttShell over USB + Wifi support

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-05-09 12:54:50 +08:00
Filipe Cavalcanti
9e8197ad49 boards/risc-v: add MPU60x0 bringup support to ESP32C6
Adds a defconfig for using MPU60x0 and implement the bringup sequence for the I2C IMU.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-05-02 09:31:52 -03:00
Leo Chung
61f205f1d4 risc-v/esp32h2:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
2269fcaaf9 risc-v/esp32c6:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
80c0854d7e risc-v/esp32c3:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Filipe Cavalcanti
4c48708fbc boards/esp32c3: modify nimble defconfig to use UART0 as serial console
Nimble defconfig had USB Serial as default console. This changes makes it compatible
to ESP32C3-Devkit and makes it similar to other defconfigs.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-28 22:16:44 +08:00
Rodrigo Sim
bab3d8892b boards/risc-v/esp32c3 Add initial support to Seeed Studio XIAO ESP32C3
This commit introduces initial support for the Seeed Studio XIAO ESP32C3
board. Five configurations are available:
- nsh: Basic NuttShell support over UART0
- usbnsh: Basic NuttShell support over USB
- gpio: NuttShell over USB + GPIO
- wifi: NuttShell over USB + Wifi support
- ble: NuttShell over SUB + Bluetooth support

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-28 08:46:10 +02:00
Tiago Medicci Serrano
216c4b00e2 boards/[risc-v|xtensa]/esp32[|c3|c6|h2|s3]: set coexiram sections
This commit sets the coexiram (from libcoexist.a) sections on IRAM.

Before this commit, no other rules matched such sections and the
sections could be placed outside markers that denote the end of the
text sections, causing unexpected errors.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-23 16:17:17 +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
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
chao an
52482219c8 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:22 +08:00
anjiahao
422c43949a binfmt:use crt0 inside of starthook
test:
1.use mps3-an547 build helloxx as module and run it
2.use qemu-armv7a:knsh test kernel build helloxx and run it

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
Tiago Medicci Serrano
7482170f3f boards/risc-v/esp32c6: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
c616d2563e boards/risc-v/esp32h2: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
6e57b93821 boards/risc-v/esp32c3: Enable SPI Flash's MTD block driver
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
yangsong8
c4001b2433 Revert "boards/defconfig: remove fixed CDCACM BUFFER SIZE"
Use configuration CDCACM_DISABLE_TXBUF or CDCACM_DISABLE_RXBUF to choose
whether to use usb req buffer as the serial buffer. Since the default
value is n (not using req buf), the original configuration of buf is valid.

This reverts commit 21c8ed80bd.
2025-03-28 08:52:42 +08: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
Eren Terzioglu
939b31b97e boards/risc-v/esp32[c3|c6|h2]: Add I2C slave support
Add I2C slave support into board layer for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
3661cdeed9 esp32[c3|c6|h2]: Add I2S support
Add I2S support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-21 20:48:15 +08:00
Jukka Laitinen
e23f2edc63 boards/risc-v/mpfs/icicle/configs/nsh/defconfig: Increase stack sizes
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-02-08 19:30:29 +08:00
Jukka Laitinen
88f12ee001 boards/risc-v/mpfs/icicle: Combine "network" and "usb" targets to "hwtest"
Reduce the amount of configurations for CI.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-02-08 19:30:29 +08:00
Tiago Medicci Serrano
08fe636001 xtensa/esp32[s2|c3|c6|h2]: fix sched_[lock|unlock] boot crash
Move the code to iram0 since sched_lock/sched_unlock is called in
the early boot phase.
2025-02-02 00:51:42 +08:00
Yanfeng Liu
48b93b8dc8 boards/rv-virt: use modlib gnu-elf.ld
This drops the board specific gnu-elf.ld for KERNEL apps as the
preprocessed modlib/gnu-elf.ld suffices. Checked w/ rv-virt:knsh
and rv-virt:knsh64

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-30 13:55:57 +08:00
Jukka Laitinen
f53afd174e arch/risc-v/src/mpfs/mpfs_cache.c: Move l2zerodevice to use cache ways starting from 0
If scratchpad is being used, the cache way 0, which is automatically
enabled at boot, needs to be re-configured as part of scratchpad memory
Otherwise there is a possibility of random memory corruption in the
scratchpad
area due to cache eviction from way 0.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2025-01-30 13:48:15 +08:00
chao an
196ce5918c riscv/esp32: refresh defconfig to avoid ci fail
Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-27 11:11:54 -03:00
Xiang Xiao
4ef36cff80 boards: Renanme CONFIG_TESTING_SENSORTEST to CONFIG_SYSTEM_SENSORTEST
follow the change from: https://github.com/apache/nuttx-apps/pull/2976

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 02:24:38 +01:00
tengshuangshuang
1655537810 nuttx:fix tools-mm to heap
config-testing-heap is changed to conofig-testing-heap, so the citest tools need to change.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-24 14:16:47 +08:00
tengshuangshuang
c6858061ed nuttx/boards:fix kconfig under apps/testing folder that change config-testing-mm to config-testing-heap
Under apps/testing folder, the macro of CONFIG_TESTING_MM is changed to CONFIG_TESTING_HEAP.
So we need to update the defconfig containing CONFIG_TESTING_HEAP in the nuttx/boards folder.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-23 18:19:02 +08:00