Commit Graph

766 Commits

Author SHA1 Message Date
Marco Casaroli 22800d6ea2 fix(esp32-devkit): rename defconfig to use _ 2024-10-13 11:19:51 +08:00
Marco Casaroli 027e5ab763 fix(esp32-qemu): enable legacy esp-idf build
The current simple boot method is not working with qemu.

We enable this option for now until we can make the simple-boot
image boot with QEMU.
2024-10-13 11:19:51 +08:00
Marco Casaroli 4741f6f561 feat(esp32s3-devkit): add qemu defconfig 2024-10-13 11:19:51 +08:00
Marco Casaroli d2d653aebf feat(esp32s3-devkit): initialize opencores eth mac 2024-10-13 11:19:51 +08:00
Marco Casaroli 890bdcd3d3 feat(esp32s3-devkit): add qemu image option 2024-10-13 11:19:51 +08:00
Marco Casaroli d5b32f0335 feat(esp32_openeth): move to common/espressif
Since this will be used for esp32s3 also, we can have this in
common/espressif.
2024-10-13 11:19:51 +08:00
Eren Terzioglu 4060f6ba80 esp32[s2|s3]: Add UORB support for internal temperature sensor 2024-10-10 18:45:01 +08:00
anjiahao 9ed93c6b1e unify MODULE & ELF flag to Toolchain.defs
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-08 19:56:33 +08:00
nuttxs c0403ed768 1.xtensa/esp32s3: configure the number of universal management
(IEEE) MAC addresses when there are multipleinterfaces.
2.Optimize Lan9250 to adapt to ESP32S3 universalMAC address.
2024-09-28 11:47:24 +08:00
Tiago Medicci Serrano cdeb720bf8 xtensa/esp32[|s2|s3]: Fix task backtrace dump
- Fix `MAKE_PC_FROM_RA` macro to consider the instruction region
base address;
- Add sanity check for calculated PC and SP registers;
- Check if the stack pointer is within the interrupt stack to
enable backtrace dump if an exception occurs during the ISR;
2024-09-23 20:40:58 +08:00
Tiago Medicci Serrano 72acec7275 esp32s3: Fix faulty `esp32s3-devkit:stack` example
This defconfig is an example of the recorded stack and it became
faulty recently after the implementation of the `up_current_regs`
functions. The `noinstrument_function` directive must be used for
preventing it from being looped when instrumentation is enabled.
Also, this commit places `sched/instrument/stack_record.c` in IRAM.
2024-09-21 10:42:06 +08:00
wangjianyu3 1fabad67ec lilygo_tbeam_lora_gps/gps: Enable GNSSUTILS_MINMEA_LIB for EXAMPLES_GPS
Log:
  ./gps_main.c:33:10: fatal error: minmea/minmea.h: No such file or directory
     33 | #include <minmea/minmea.h>
        |          ^~~~~~~~~~~~~~~~~
  compilation terminated.
  ERROR: xtensa-esp32-elf-gcc failed: 1
         command: xtensa-esp32-elf-gcc -MT ./gps_main.c.github.workspace.sources.apps.examples.gps.o  -M '-fno-common' '-Wall' '-Wstrict-prototypes' '-Wshadow' '-Wundef' '-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-Os' '-fno-strict-aliasing' '-fomit-frame-pointer' '-ffunction-sections' '-fdata-sections' '-mlongcalls' '-isystem' '/github/workspace/sources/nuttx/include' '-D__NuttX__' '-DNDEBUG' '-D__KERNEL__' '-Wno-cpp' '-Werror' '-I' '/github/workspace/sources/apps/include' ./gps_main.c
  gps_main.c:33:10: fatal error: minmea/minmea.h: No such file or directory
     33 | #include <minmea/minmea.h>
        |          ^~~~~~~~~~~~~~~~~
  compilation terminated.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 22:13:42 +08:00
Jorge Guzman e3dabcd999 boards/esp32s3: add support to esp32s3-lhcbit board
The esp32s3-lhcbit is a board with lora, sdcard, display TFT, etc.

Signed-off-by: Jorge Guzman jorge.gzm@gmail.com
2024-09-17 01:30:44 +08:00
YAMAMOTO Takashi 0078896456 esp32: fix a way to test a config
found by GCC -Wundef
2024-09-09 10:48:09 +02:00
yinshengkai cec3b5c0fb boards: Add TLS_NELEM dependency to libcxxabi
Refresh all defconfig

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
Filipe Cavalcanti 2af7037fa1 xtensa/esp32s2: add WiFi support on ESP32S2 2024-09-06 09:46:59 +08:00
fangxinyong 7b05a550dc sched: replace up_cpu_index with this_cpu
Make this_cpu is arch independent and up_cpu_index do that.
In AMP mode, up_cpu_index() may return the index of the physical core.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-09-05 12:09:24 +08:00
Filipe Cavalcanti 29ae9d1110 esp32s2: fix SPI flash and file system mounting
Copied spi flash files from risc-v
Removed old spiflash from make.defs
KConfig modifications for common spiflash
Added new spiflash entry to make.defs
S2 Board config update
Modifications working on S2. Need fix on ROM function
Board fixes
Deleted old spiflash files
Fixes for smartfs operation
Set new HAL version
Fixed wrong change on S3
2024-09-03 19:13:46 -03:00
YAMAMOTO Takashi 53795fd497 esp32: enable smp for esp32-devkitc:psram_usrheap config 2024-09-02 10:24:26 -03:00
YAMAMOTO Takashi 96f19aa719 esp32: enable smp for esp32-devkitc:psram config 2024-09-02 10:24:26 -03:00
guoshichao 4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +08:00
Tiago Medicci Serrano a916de0e14 espressif: Update HAL library reference to include debug assert
During the board bringup, the new HAL reference includes an assert
to check if the critical section flags is being stored as expected.
2024-08-30 21:41:47 +08:00
Tiago Medicci Serrano a763ed1e07 espressif: Fix build with RTC
This commit ensures that RTC data is properly allocated in the RTC
segment in the linker. This fixes the reported problem about using
the legacy bootloader and RTC.
2024-08-29 09:05:17 +08:00
Felipe Moura 37e1f5db47 Add spi slave dev to esp32 xtensa 2024-08-29 01:01:04 +08:00
Petro Karashchenko d499ac9d58 nuttx: fix multiple 'FAR', 'CODE' and style issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko d252b6229f nuttx: use sizeof instead of define or number in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
nuttxs fbb2e5f781 boards/esp32s3_lan9250: deinitialize the ethernet device lan9250 for esp32s3. 2024-08-24 11:19:00 +08:00
Windrow14 b27bf82b6e Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit|esp32s3-korvo-2: document update for sdmmc support
boards/xtensa/esp32s3/esp32s3-devkit|esp32s3-korvo-2/configs/sdmmc/defconfig: defconfig for sdmmc support

Add description for sdmmc support on esp32s3 in the board specific documentation.
Add defconfig for esp32s3-devkit with external adapter and emmc module.
Add defconfig for esp32s3-korvo-2 with SD slot enabled.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-23 20:21:49 +08:00
Tiago Medicci Serrano 5680e9d5a4 espressif: Update internal libraries reference
Update internal reference to get the most updated Espressif's
libraries. Those libraries are based on branch `release/v5.1` of
the ESP-IDF and include `v5.1.4` version of it.
2024-08-21 23:28:45 +08:00
Windrow14 190c8787ff arch/xtensa/src/esp32s3/Kconfig|Make.defs|esp32s3_sdmmc.c,
arch/xtensa/src/esp32s3/hardware/esp32s3_sdmmc.h|esp32s3_soc.h,
boards/xtensa/esp32s3/common/include/esp32s3_board_sdmmc.h,
boards/xtensa/esp32s3/common/src/Make.defs|esp32s3_board_sdmmc.c,
boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_bringup.c: add SD/mmc driver

Support 1-bit bus width and 4-bit bus width. Support eMMC high speed SDR mode.
Support transfer data with DMA. Support SD clock frequency up to 40MHZ.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
YAMAMOTO Takashi d9c90eef13 esp32s3-devkit/toywasm: enable ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK 2024-08-07 15:59:41 +08:00
Tiago Medicci 93322a50fe boards/esp32s3: Add initial support to the ESP32-S3-Korvo-2 board
The ESP32-S3-Korvo-2 is a multimedia development board based on the
ESP32-S3 chip. It is equipped with a two-microphone array which is
suitable for voice recognition and near/far-field voice wake-up
applications. The board integrates multiple peripherals such as
LCD, camera, and microSD card. It also supports JPEG video stream
processing. With all of its outstanding features, the board is an
ideal choice for the development of low-cost and low-power
network-connected audio and video products.
2024-08-01 16:04:53 +08:00
Tiago Medicci Serrano 016bc47a63 esp32s3/elf: Enable ELF loader for ESP32-S3
Provide `up_copy_section` function that enables copying data using
the data bus. If the memory destination address is accessible
through the instruction bus, the data is copied using the
correspondent address accessible through the data bus.
2024-07-31 02:33:12 +08:00
Tiago Medicci Serrano c91599d34c esp32s3/i2s: Fix faulty initialization when SMP is enabled
The buffer initialization function (`i2s_buf_initialize`) calls
`i2s_buf_free`, which performs buffer initialization within a
critical section (`spin_lock_irqsave`). If this function is called
under the same critical section (same spinlock), initialization
will hang.
2024-07-30 01:44:57 +08:00
Eren Terzioglu 98f5d6adc5 esp32[s2|s3]: Add temperature sensor support 2024-07-27 14:12:44 -03:00
Filipe Cavalcanti 91dfd20eaf arch/xtensa: add support for brushed DC motor control
arch/xtensa: add support for capture driver on ESP32 and ESP32|S3|

Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed

Basic bring up ready. New Kconfig options for motor.

Good motor registration

Working on enabling pwm generators

Working on enabling pwm generators

Added fops functions

Success on PWM 50%

stable pwm operation for bdc

Added loopback option for testing

Improved rules on fsm

Working motor direction control

Testing new ISR for fault handling

Issues on fault ISR

Removed fault implementation (not working)

Added support for esp32s3

Documentation improvements

Added default motor spin direction

Added parameter change while running

Review fixes

arch/xtensa: add support for fault signal on motor control

Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed

Basic bring up ready. New Kconfig options for motor.

Good motor registration

Working on enabling pwm generators

Working on enabling pwm generators

Added fops functions

Success on PWM 50%

stable pwm operation for bdc

Added loopback option for testing

Improved rules on fsm

Working motor direction control

Testing new ISR for fault handling

Issues on fault ISR

Removed fault implementation (not working)

Added support for esp32s3

Documentation improvements

Added default motor spin direction

Added parameter change while running

Got responsive fault indicator

Working brakes - still need to work on starting isr

Fixed single-time ISR initializiation

Working soft brake on fault

Improved KConfig for BDC and BLDC

Kconfig fixed at board level
2024-07-27 12:08:51 +08:00
Huang Qi f555b3de91 boards/esp32s3: Increse the default stack size for usbnsh
Fix https://github.com/apache/nuttx/issues/12712

If run nsh over usb based serial port, the default stack size is too small,
for example simple `ps` command will use more than 2208 bytes stack.

Then the stack overflow will happen and the system will hang here.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-17 15:08:17 +08:00
Huang Qi d2347aea2f boards/esp32[c3|c6|h2|s2|s3]: Ignore etctmp in common board
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-12 01:01:15 +08:00
YAMAMOTO Takashi 881f749777 refresh esp32s3-devkit:qemu_debug
after https://github.com/apache/nuttx/pull/12639
2024-07-10 23:38:17 +08:00
YAMAMOTO Takashi e6f35007f0 esp32s3-devkit: add a config for qemu
based on esp32s3-devkit:toywasm, tailored for the espressif fork
of qemu. [1]

* disabled a few things for which emulation doesn't seem available:

  * wifi
  * spiram
  * ESP32S3_SYSTEM_BBPLL_RECALIB

* enabled DEBUG_SYMBOLS for my convenience (thus _debug suffix)

* enabled hostfs for my convenience

tested with:
qemu-xtensa-softmmu-esp_develop_9.0.0_20240606-x86_64-apple-darwin.tar.xz

[1] https://github.com/espressif/qemu
2024-07-10 00:06:18 +08:00
Alan Carvalho de Assis 82946d0d5f net: Enable ICMP by default if IPv4 is enabled
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-09 17:08:27 +08:00
Almir Okato 593dc946d1 esp32: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32 targets and removes the need
for running 'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-07-04 18:22:24 -03:00
Almir Okato 6ec690cbfc esp32[s2|s3]: move rom segments mapping to espressif common folder
Move and unify map_rom_segments function called when starting
Simple Boot and MCUboot compatible images.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-07-04 18:22:24 -03:00
Filipe Cavalcanti 365e9e967c arch/xtensa: add support for capture driver on ESP32 and ESP32|S3|
Squashed:
Initial settings for MCPWM Capture on board level
Created lower half files - compilation ok
Using capture debug features. Simple example on fops works
Successful duty and freq calculation
Documentation update
Fixed and added interupt capabilities for all 3 capture channels
Cleaned defconfig
Renamed macros, added S3 options and moved arch source to common dir
Added support for ESP32S3
Added capture example to defconfig and renamed
2024-06-27 18:14:59 +08:00
Tiago Medicci Serrano e913828955 espressif: Enable SMP (when applicable) and iPerf for sta_softap
- Enable SMP by default (when the device supports it);
- Increase IOB buffers;
- Enable iPerf;

These changes enable testing the device throughput easily.
2024-06-27 18:09:46 +08:00
Devansh Purohit 0ffbff84d1 Changed ESP32S3 Chip names based on their configuration and added ESP32S3_CUSTOM chip module
As suggested in PR:12530, changed the default names of ESP32S3WROOM chips to ESP32S3WROOM1N4,
ESP32S3WROOM2N16R8, ESP32S3WROOM2N32R8, ESP32S3MINI1N8.
Also regenerated all the defconfigs for board configurations.
Added a custom ESP32S3 module for custom flash configurations.
Declared ESP32S3_PSRAM_8M variable with prompt
2024-06-21 17:55:42 +08:00
Tiago Medicci Serrano 96f83bb03a net: Enable `CONFIG_NET_ARP_SEND` by default
Enable logic to send ARP requests if the target IP address mapping
does not appear in the ARP table.

Please check the comment in https://github.com/apache/nuttx/issues/12446#issuecomment-2145856778
2024-06-06 02:40:16 +08:00
Almir Okato 4178f3ede4 esp32s2: remove legacy bootloader support
Deprecate Legacy Boot for ESP32-S2.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
Almir Okato 16f8966fa9 esp32s2: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s2 targets and removes the need
for running 'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
simbit18 97836bf3ab board: esp32c3, esp32 and esp32s3 corrected PM block
removed depends on PM from if PM block
2024-05-27 23:24:31 +08:00