Commit Graph

198 Commits

Author SHA1 Message Date
Xiang Xiao c5381c3eb2 Replace __attribute__((packed)) with [begin|end]_packed_struct
since the different compiler express the packed structure in the different way
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 10:20:38 +08:00
Eren Terzioglu 3796f56748 esp32[s2|s3]: Add I2C bitbang support 2024-11-01 11:41:46 -03:00
Tiago Medicci Serrano a63c807353 esp32s3: Increase the init task stask size when using NSH
After recent changes on nuttx-apps (not limited to, but related
to nuttx-apps#2738, for instance), the stack usage for the NSH
task increased, causing stack overflows under specific situations
(when running `ps` command, for instance). This commit increases
the init task stack size to avoid it. Please note that, even before
these changes, the stack usage of the NSH task was around 90% and,
then, increasing the stack size of it was recommended.
2024-10-25 00:53:21 +08:00
cuiziwei 7bf6325de6 Fix xtensa build error with choice LIBSUPCXX by default.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-24 21:33:20 +08:00
Tiago Medicci Serrano d1fd1ed8f6 boards/esp32s3: Merge MCUboot and "simple-boot" linker scripts
To make it easier to keep the linker scripts updated for both
MCUboot and "simple-boot", this commit merges them into a single
linker script with macros to enable/disable specific sections.
2024-10-23 22:26:39 +08:00
jihandong 444ba4caa4 libcxx: optional localization.
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 14:34:38 +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
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 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
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
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
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
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 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
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 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
Tiago Medicci Serrano 0ed714bba4 esp32s3/adc: Update the bootloader configuration for ESP32-S3
Avoid using the legacy bootloader in case it isn't required. Use
the simple boot instead.
2024-05-10 01:44:02 +08:00
YAMAMOTO Takashi 1b5b9845f4 esp32s3-devkit/toywasm: use ARCH_CHIP_ESP32S3WROOM2_32M
As documented in [1], this config is for a board with 32MB flash.

[1] Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
2024-05-10 01:44:02 +08:00
Tiago Medicci Serrano 8dca62f8f9 esp32s3: Limit MTD partition size according to the flash size
Whenever a MTD partition is set, this change limits its size
according to the flash size, avoiding the MTD partition to be
greater than the actual flash size.
2024-05-10 01:44:02 +08:00
nuttxs 8d3d93e001 Add ESP32-S3 ADC driver 2024-05-07 01:12:05 +08:00
Xu Xingliang 0db7417dc0 esp32/lvgl: fix lvgl v9 configuration error
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-30 01:45:03 +08:00
Xu Xingliang 62c2b3e1ec lvgl: update existing config to use lvgl v9
These configs are changed based on below rules.
1. always enable +CONFIG_LV_USE_NUTTX=y
2. If touchpad is used, enable +CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y
3. enable log by +CONFIG_LV_USE_LOG=y
4. If -CONFIG_LV_MEM_CUSTOM=y previously defined, replace it with +CONFIG_LV_USE_CLIB_MALLOC=y +CONFIG_LV_USE_CLIB_SPRINTF=y +CONFIG_LV_USE_CLIB_STRING=y
5. If -CONFIG_LV_PORT_USE_FBDEV=y, default config is for fbdev. If -CONFIG_LV_PORT_USE_LCDDEV=y, +CONFIG_LV_USE_NUTTX_LCD=y
6. Remove all -CONFIG_LV_TICK_CUSTOM=y -CONFIG_LV_TICK_CUSTOM_INCLUDE="port/lv_port_tick.h"
7. If -CONFIG_LV_PORT_LCDDEV_DOUBLE_BUFFER=y, replace it with CONFIG_LV_NUTTX_LCD_DOUBLE_BUFFER=y. For fbdev, double buffer is automatically detected.
8. If -CONFIG_LV_COLOR_16_SWAP=y, need to upgrade the LCD driver to support hardware byte order swap.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-29 10:06:43 +08:00
chenwen@espressif.com ea5583b112 xtensa/esp32s3: Support ESP32-S3 PM standby and sleep.
1. pm configuration demonstrates the use of power management present on the ESP32-S3.
   2. You can use the pmconfig command to test the power management, for details look at
      ``Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst``

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-04-25 13:43:15 +08:00
Almir Okato a5de4dbd22 xtensa/esp32s3: Add missing entries to iram.text from legacy_sections.ld
Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-24 09:46:04 +08:00
Almir Okato d098c1dc87 esp32s3: 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 esp32s3 targets and removes the need
for running 'make bootloader' command for it.

Other related fix, but not directly to Simple Boot:
- Instrumentation is required to run from IRAM to support it during
initialization. `is_eco0` function also needs to run from IRAM.
- `rtc.data` section placement was fixed.
- Provide arch-defined interfaces for efuses, in order to decouple
board config level from arch-defined values.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 19:43:05 +08:00