Commit graph

882 commits

Author SHA1 Message Date
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
d471609267 boards/xtensa: Add dedicated GPIO board level support for esp32[-s2|-s3]
Add board level dedicated GPIO support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
4b36d69630 boards/xtensa: Add SDM peripheral board layer support for esp[-|-s2|-s3]
Add SDM perpiheral board layer support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-09 19:20:47 +08:00
Filipe Cavalcanti
28abfb5fd1 boards/esp32s3: fix rtc segment on linker script
Modify rtc_data_seg to rtc_slow_seg to fix RTC problems.
The proper location for those is in RTC slow memory.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-05-05 23:50:52 +08:00
Filipe Cavalcanti
e837b26518 boards/esp32s2: add -fno-omit-frame-pointer to saola board
This change affects esp32s2-saola-1 board when optimizations are enabled.
Fixes issue on timer defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-30 13:41:06 +08:00
Tiago Medicci Serrano
4a8af202c6 boards/xtensa/esp32[|s2|s3]: Fix unknown disassembling instructions
This commit adds sections used by the debugger and disassembler to
get more information about raw data present in the code.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-24 10:05:37 -03: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
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
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
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
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
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
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
Rodrigo Sim
d240577543 boards/xtensa/esp32s3 Add initial support to Seeed Studio XIAO ESP32S3
This commit introduces initial support for the Seeed Studio XIAO ESP32S3
board. Two  configurations are available: 'usbnsh' provides basic NuttShell
(NSH) access over USB, while 'combo' adds support for GPIOs and onboard
LED in addition to NSH.
2025-04-10 10:52:05 +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
Eren Terzioglu
dd7ac7e57d boards/xtensa: Remove legacy I2S implementation for esp32[-|-s2|s3]
Remove legacy I2S implementation without breaking defconfigs for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
Eren Terzioglu
22601e2074 boards/esp32[s2|s3]: Add common I2S board layer support
Add common I2S board layer support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-04-08 22:53:58 +08:00
Tiago Medicci Serrano
9967593009 boards/esp32s3-devkit: Update ESP32-S3's WROOM-2-N32R8V defconfigs
The defconfigs that select the ESP32-S3's WROOM-2-N32R8V module
contains an octal SPI flash chip and a octal SPIRAM module.
This commit updates the defconfig to avoid errors while booting the
device.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-08 14:44:38 +08:00
Tiago Medicci Serrano
622355b5c3 arch/xtensa/esp32s3: Fix bug regarding SPI flash operation mode
SPI flash operation modes - Dual Output (dout), Dual I/O (dio),
Quad Output (qout), Quad I/O (qio) and Octal (opi) were not being
properly selected. This commit fixes this behavior and the device
is now able to boot and initialize the proper SPI flash mode.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-08 14:44:38 +08:00
wangjianyu3
0a74293f11 boards/szpi-esp32s3: Remove FAR qualifier
Remove FAR qualifier for szpi-esp32s3.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-07 16:26:16 +08:00
wangjianyu3
25443a37ee boards/szpi-esp32s3: Set default backlight for LCD
Set default brightness of LCD backlight to about 10%.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-07 16:26:16 +08:00
Tiago Medicci Serrano
1e8250d918 boards/xtensa/esp32s3: Move some .bss sections to the external RAM
This commit moves some internal libraries' .bss sections to the
external PSRAM chip, freeing internal memory for other usages. Note
that it is necessary to update `esp32s3-devkit:python` defconfig
otherwise it would fail to build.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-05 11:24:58 +08:00
wangjianyu3
586d216a40 boards/szpi-esp32s3: Add support for FT5X06
Add support for FT5X06 touchscreen driver.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-04 09:50:19 -03:00
Laczen JMS
dfc0053c2d boards/xtensa/esp32/esp32-devkitc: update espnow
Update the esp32-devkitc board for espnow changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-04 06:49:50 +08:00
Tiago Medicci Serrano
e499efd119 boards/xtensa/esp32: 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
09bcec95a8 boards/xtensa/esp32s2: 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
440d4a688a boards/xtensa/esp32s3: 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
wangjianyu3
bbcb40c979 boards/szpi-esp32s3: Init configuration for LVGL
And PSRAM enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
wangjianyu3
bd87bec6fb boards/szpi-esp32s3: Register LCD device
Register LCD device "/dev/lcd0" for graphics.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
Laczen JMS
fb24cae852 boards/extensa/esp32: use wlan config to start wlan
Use wlan configuration option to enable wlan support for:
- esp32-2432S028
- esp32-audio-kit
- esp32-devkitc
- esp32-ethernet-kit
- esp32-lyrat
- esp32-pico-kit
- esp32-sparrow-kit
- esp32-wrover-kit
- lilygo_tbeam_lora_gps
- ttgo_eink5_v2
- ttgo_lora_esp32
- ttgo_t_display_esp32
- esp32s2-saola-1
- esp32s3-box
- esp32s3-devkit
- esp32s3-eye
- esp32s3-korvo-2
- esp32s3-lcd-ev
- lckfb-szpi-esp32s3

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-31 11:35:39 -03:00
wangjianyu3
31da7737b9 boards/szpi-esp32s3: Init configuration for LCD
Init configuration for ST7789 LCD.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
8af44d0385 boards/szpi-esp32s3: Add support for ST7789 LCD
Expanded IO0 for SPI C/S, GPIO39 for SPI D/C.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
8156211355 boards/szpi-esp32s3: Init GPIO for LCD SPI D/C
And add configuration for GPIO.

| Num  | Type      | Func / Location |
|------|-----------|-----------------|
| IO39 | Output    | LCD SPI D/C     |
| IO10 | Input     | GP1.25-5P expansion interface 1 (left side, near the speaker) |
| IO11 | Interrupt | GP1.25-5P expansion interface 1 (left side, near the speaker) |

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
847133c1ad boards/szpi-esp32s3: Init configuration for PSRAM
Enable 8MB PSRAM.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 11:26:30 +08:00
Filipe Cavalcanti
2cee5c0945 boards/esp32: add heap test to psram defconfig
Add the heap test to psram and psram_usrheap defconfig of esp32-devkitc.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-29 10:29:12 +08:00
wangjianyu3
6165fcc6c8 boards/szpi-esp32s3: Init config for LEDC(PWM)
Enable LEDC driver for IO 42 of LCKFB SZPI-ESP32S3 as backlight of LCD.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-28 08:50:08 +08:00
wangjianyu3
ad622c018c boards/szpi-esp32s3: Add PWM setup
Add PWM setup for LCKFB SZPI-ESP32S3.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-28 08:50:08 +08:00
wangjianyu3
7d288a9894 boards/esp32s3: Move PWM setup to common
Move PWM setup from esp32s3-devkit/src/esp32s3_ledc.c to common/src/esp32s3_board_ledc.c.
Fix esp32s3_pwm_setup() undefined error for esp32s3-korvo-2.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-28 08:50:08 +08:00
wangjianyu3
dd1e31b22c boards/szpi-esp32s3: Init config for PCA9557
Build & Burn

  ./tools/configure.sh -l lckfb-szpi-esp32s3:pca9557
  make flash -j$(nproc) ESPTOOL_PORT=/dev/ttyUSB0

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-25 15:46:09 -03:00
wangjianyu3
ce6d6b4602 boards/szpi-esp32s3: Add support for PCA9557
https://wiki.lckfb.com/zh-hans/szpi-esp32s3/open-source-hardware/

| PCA9557 | ESP32S3 |
|---------|---------|
| SCL     | IO2     |
| SDA     | IO1     |
| A0      | 3V3     |
| A1      | GND     |
| A2      | GND     |

| PCA9557 | Peripherals |
|---------|-------------|
| IO0     | LCD_CS      |
| IO1     | PA_EN       |
| IO2     | DVP_PWDW    |

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-25 15:46:09 -03:00
wangjianyu3
5c2cfe8bac boards/esp32s3: Fix esp32s3_gpio_init undefined
When enable both `DEV_GPIO` and `GPIO_LOWER_HALF` for a GPIO pin device for an I/O expander pin.
See esp32s3_gpio.c for more details.

Log

  xtensa-esp32s3-elf-ld: /workspace/nuttx/staging/libboard.a(esp32s3_bringup.o):(.literal.esp32s3_bringup+0x14): undefined reference to `esp32s3_gpio_init'
  xtensa-esp32s3-elf-ld: /workspace/nuttx/staging/libboard.a(esp32s3_bringup.o): in function `esp32s3_bringup':
  /workspace/nuttx/boards/xtensa/esp32s3/common/board/esp32s3_bringup.c:409: undefined reference to `esp32s3_gpio_init'

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-25 15:46:09 -03:00
Eren Terzioglu
0bbdeb4b22 boards/esp32s3/esp32s3-box: Normalize esp32s3-box defconfigs
Normalize esp32s3-box defconfigs to fix CI issues

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-24 21:28:04 +08:00
Eren Terzioglu
fdfa589ce1 boards/xtensa/esp32s3: Add version support for esp32s3-lcd-ev boards
Add version support for esp32s3-lcd-ev boards to prevent pin changes

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-03-24 21:28:04 +08:00
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
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
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