992 Commits

Author SHA1 Message Date
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
Build Documentation / build-html (push) Waiting to run
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
Filipe Cavalcanti e0e562360e boards/xtensa/esp32s3: modify ARCH_CHIP for psram_usrheap
Change the ESP32S3-WROOM-2-N16R8V to ESP32S3-WROOM-1-N8R2.
Reason: not testing on 16MB but successfully tested smaller flash and PSRAM.
Also updated documentation on this defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-19 15:23:04 +01:00
Laczen JMS 24221b611f arch/xtensa/esp32:espnow pktradio simplify addressing
Modify addressing to allow only 2 byte node address.
Allow modifying the node address by modifying the ipv6 address
(the ipv6 address has a direct relation with the node address)
Introduce the option to add a 4 byte random number to the mac header
as a preparation for ciphered data exchange.
Introduce a FCB (frame control byte) as a replacement for the INFO
field in the mac header.
Update esp32-devkitc:espnow config to reflect address size change.
Update the documentation to reflect address size changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-17 09:15:09 +01: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
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
wangjianyu3 4df67da95d esp32s3-devkit/fastboot: Enable fastboot oem shell
Selftest

    # Host side

    $ ./tools/configure.sh -l esp32s3-devkit:fastboot
    $ make flash -j ESPTOOL_PORT=/dev/ttyACMx

    $ fastboot devices
    1234    fastboot
    $ fastboot -s 1234 oem shell ps
      PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
        0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003056 Idle_Task
        1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0001976 hpwork 0x3fc8bd50 0x3fc8bd80
        2     2 100 RR       Task      - Waiting  Semaphore 0000000000000000 0004048 nsh_main
        3     3 100 RR       Task      - Ready              0000000000000000 0001992 fastbootd
        4     4 100 RR       Task      - Running            0000000000000000 0001992 popen -c ps
    OKAY [  0.010s]
    Finished. Total time: 0.010s

More details

    https://github.com/apache/nuttx-apps/pull/3003

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-04 12:28:12 +08:00
Eren Terzioglu 06ef4a8084 boards/xtensa/esp32[s2|s3]: Add I2C slave support
Add I2C slave board support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Marco Casaroli 16e2e77bdf esp32: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.
2025-02-25 13:13:40 -03:00
Marco Casaroli b4c827cee3 esp32s3: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.

The build was failing with the legacy app format because
_ext_ram_bss_end and _ext_ram_bss_start are not defined in the
legacy linker file.
2025-02-25 13:13:40 -03:00
Filipe Cavalcanti b89ad74660 xtensa/esp32: use common Espressif wireless source
Update the wireless symbols from ESP32_* to ESPRESSIF_* for using common layer.
Remove ESP32 specific WiFi files and edit build system to use common layer.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-02-25 12:35:46 +01:00
Eren Terzioglu 5865d2a8ff esp32[s2|s3]: Enhance SPIRAM/PSRAM support
Add esp_spiram_writeback_range function to flush some areas of spiram cache

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-24 10:35:11 -03:00
Tiago Medicci Serrano 97aa90570c xtensa/esp32s3: allow moving .bss data to the external PSRAM
This commit allows placing .bss data into the external PSRAM.
Previously, the PSRAM was fully allocated to the heap memory only
and now part of it can be used to allocate .bss data freeing the
internal memory.
2025-02-19 11:44:18 -03:00
wangjianyu3 321b25f486 esp32s3-devkit: Add fastboot starting command to initialization script
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-19 14:25:28 +08:00
wangjianyu3 746db1968d esp32s3-devkit/fastboot: Initializing configuration for Fastboot
Based on configuration of usb_device.

Quick start:

    ./tools/configure.sh -l esp32s3-devkit:fastboot
    make flash -j ESPTOOL_PORT=/dev/ttyACMx

(Optional) You can get full defconfig by executing following commands after SAVING your stages if necessary:

    ./tools/configure.sh -l esp32s3-devkit:fastboot
    make savedefconfig
    cat defconfig

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-19 14:25:28 +08:00
Filipe Cavalcanti 954081cdd8 xtensa/esp32s3: use common Espressif wireless source
Update the wireless symbols from ESP32S3_* to ESPRESSIF_* for using common layer.
Remove ESP32S3 specific WiFi files and edit build system to use common layer.
2025-02-17 12:03:57 +01:00
Laczen JMS 6b5fccb32c esp32: add espnow documentation and defconfig.
Added documentation for espnow and a default defconfig to illustrate
the use of espnow for udp communication.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-02-10 16:15:25 -03:00
Laczen JMS eba0362bde esp32: Add support for espnow based pktradio
Espnow is a connectionless WiFi communication protocol that can be used
to exchange information between esp nodes.

A espnow pktradio driver is proposed that allows building a 6lowpan
network of nodes.

The driver has been evaluated using udpclient & server running on
different devices.

Solves #15347

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-02-10 16:15:25 -03:00
Eren Terzioglu b25c4ec963 esp32[s3]: Add ES8311 support for esp32s3-lcd-ev board 2025-02-08 10:41:03 -03: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
hujun5 8f9c1cbe73 xtensa/esp32s3: Fix esp32s3 sched_lock crash
move the code to iram0 since sched_lock/sched_unlock
is called in the early boot phase

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-31 23:19:59 +08: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 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
Filipe Cavalcanti 027a57071a boards/xtensa: disable DEV_CONSOLE on usbnsh defconfig 2025-01-15 23:33:10 +08:00
wangjianyu3 f3b31ef1df boards: Replace CONFIG_NSH_LINELEN with CONFIG_LINE_MAX
Details: https://github.com/apache/nuttx-apps/pull/2943

1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g'
2. ./tools/refresh.sh --silent --defaults all

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:07:58 +08:00
wangjianyu3 71fe717459 esp32s3-devkit/adb: Enable used size of heap and stack for command ps
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-14 14:52:18 +08:00
Huang Qi cfd0cc0d1a Remove duplicate includes across multiple files
This commit cleans up redundant header file includes throughout the codebase.
 The changes include:

 - Removing duplicate #include directives that were present in the same file
 - Consolidating includes that were split across multiple lines unnecessarily
 - Removing unused includes that were no longer needed
 - Fixing some formatting issues with includes

 The changes improve code organization and maintainability by:
 - Reducing unnecessary dependencies
 - Making include dependencies more explicit
 - Following consistent include patterns
 - Removing dead code

 No functional changes are made - this is purely a code cleanup commit.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-09 23:30:23 +08:00
Filipe Cavalcanti 407a62a33a boards/xtensa: update Make.defs for linker scripts on ESP32|S2 2025-01-07 21:58:09 +08:00
Filipe Cavalcanti 91511ae280 boards/xtensa: merge MCUBoot and Simple Boot linker scripts on ESP32|S2 2025-01-07 21:58:09 +08:00
wangjianyu3 6020cdb816 esp32s3-devkit/adb: ADB shell service depends on SCHED_CHILD_STATUS
Log

  $ adb -s 1234 shell
  error: closed

  # BULK out
  0000   4f 50 45 4e cb 71 06 00 00 00 00 00 07 00 00 00   OPEN.q..........
  0010   52 02 00 00 b0 af ba b1                           R.......

  # BULK out
  0000   73 68 65 6c 6c 3a 00                              shell:.

  # BULK in
  0000   43 4c 53 45 00 00 00 00 cb 71 06 00 00 00 00 00   CLSE.....q......
  0010   00 00 00 00 bc b3 ac ba                           ........

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-03 21:12:20 +08:00
Lup Yuen Lee cd92e2d6e7 boards/risc-v, xtensa: Remove CONFIG_DEV_ZERO
CONFIG_DEV_ZERO is no longer needed in some defconfig files due to
- https://github.com/apache/nuttx/pull/15223

This PR removes CONFIG_DEV_ZERO from the affected defconfig files:
```bash
make distclean ; tools/refresh.sh --silent canmv230:knsh
make distclean ; tools/refresh.sh --silent canmv230:master
make distclean ; tools/refresh.sh --silent canmv230:nsbi
...
```

The failed builds above were extracted from [nuttx-prometheus-to-mastodon.json](https://lupyuen.org/articles/mastodon.html#appendix-post-nuttx-builds-to-mastodon)
2024-12-31 04:01:32 -03:00
mazhuang 60683d7495 nuttx/boards/XXX/defconfig:DEV_ZERO is not set
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2024-12-30 22:22:29 +08:00
YAMAMOTO Takashi c0c04cf6ba bump littlefs to 2.10.1 where 2.10.0 was used
2.10.1 contains a fix for a long-standing wrong-data issue.
https://github.com/littlefs-project/littlefs/pull/1058
2024-12-25 03:40:43 -03:00
Filipe Cavalcanti 293a87a5e1 boards/xtensa/esp32s3: increase stack size of buttons defconfig 2024-12-24 10:49:39 +08:00
Filipe Cavalcanti acd0031362 boards/xtensa/esp32s3: set 16MB flash on qemu_debug defconfig 2024-12-24 10:49:39 +08:00
Tiago Medicci Serrano 7548db1980 arch/xtensa: Support __thread and thread_local keywords
Enable architecture-specific support for those keywords. This is a
"gcc-based" thread local storage implementation.
2024-12-21 20:49:07 +08:00
wangjianyu3 c19e8c7861 esp32s3-devkit/adb: Enable file service
Test

  $ adb -s 1234 pull /etc/init.d/rcS
  /etc/init.d/rcS: 1 file pulled. 0.0 MB/s (7 bytes in 0.042s)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-18 20:13:41 +08:00
Eren Terzioglu 8256864bfe esp32[s2|s3]: Add qencoder defconfig 2024-12-17 13:35:42 -03:00
Eren Terzioglu 767c5f16f0 esp32[s2|s3]: Add pulse counter support 2024-12-17 13:35:42 -03:00
YAMAMOTO Takashi 760b557f3f esp32s3-devkit/toywasm: bump littlefs version to 2.10.0 2024-12-13 18:22:30 +08:00
simbit18 88239153b8 [sensors]: Removed the unnecessary inclusion of spi header files
- ina219
- apds9960
- veml6070

these sensors use i2c serial communication protocol
2024-12-10 21:59:31 +08:00
simbit18 11f412b7af fix nxstyle
Removed extra spaces from .h and .c files
2024-12-10 01:29:00 +08:00