Skip to content

Esp32 s3 support #6341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 67 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6326608
Initial S3 Support
me-no-dev Jan 20, 2022
607d024
Merge branch 'master' into esp32-s3-support
me-no-dev Jan 20, 2022
47c8af8
Add S3 Toolchain
me-no-dev Jan 20, 2022
9556169
Update Esptool and add some missing adjustments
me-no-dev Jan 21, 2022
9346d97
Add Dual-Core Support
me-no-dev Jan 21, 2022
c700845
Fix bootloop issue and enable DSP optimization
me-no-dev Jan 21, 2022
333d0d4
Run Arduino on Core1
me-no-dev Jan 21, 2022
e73d35f
Rework USB selection
me-no-dev Jan 21, 2022
9c3f5aa
Update HWCDC.cpp
me-no-dev Jan 22, 2022
17be328
Update USB.cpp
me-no-dev Jan 22, 2022
2d51d0e
Update esp32-hal-tinyusb.c
me-no-dev Jan 22, 2022
1d44d5f
fix S3 flash image base (#6208)
Jason2866 Jan 31, 2022
fd78585
Added my new Unexpected Maker ESP32-S3 boards (#6211)
UnexpectedMaker Jan 31, 2022
1116f2d
Merge branch 'master' into esp32-s3-support
me-no-dev Jan 31, 2022
b75a08c
Fixes UART_1 TX Pin setup
SuGlider Jan 31, 2022
2299de5
Initial SPI support and S3-Box variant
me-no-dev Feb 1, 2022
e3eabf5
Bootloader is at 0x0000 for S3 (#6215)
Jason2866 Feb 1, 2022
46f283a
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 1, 2022
c210d24
small adjustments for NVS and PSRAM init
me-no-dev Feb 1, 2022
82e41de
WIP: Initial support for PSRAM (QSPI and OPI)
me-no-dev Feb 2, 2022
b70fedc
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 3, 2022
747b6d0
[FEATURE] Basic implementation of Arduino's I2S library (#5304)
PilnyTomas Feb 4, 2022
9b76da7
[I2S] Fix lib-builder error
me-no-dev Feb 4, 2022
54abe9c
Update idf_component.yml (#6232)
Jason2866 Feb 4, 2022
c0ed66e
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 5, 2022
6a97f1e
Fixes RMT examples and adds ESP32-S3 config (#6235)
SuGlider Feb 5, 2022
399b5e6
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 7, 2022
fa086ff
WIP: Initial OPI support
me-no-dev Feb 11, 2022
990cd4b
Update Libs with the new lib-builder scripts
me-no-dev Feb 11, 2022
f262907
Update board menu for ESP32-S3
me-no-dev Feb 14, 2022
1c57cf0
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 23, 2022
066886e
fix ethernet clock runtime setting (#6340)
Jason2866 Feb 23, 2022
50c6500
Update IDF libs and fix missing BLE 4.2 features
me-no-dev Feb 23, 2022
4d1c417
Update CI scripts
me-no-dev Feb 23, 2022
521b2bd
script fixes
me-no-dev Feb 23, 2022
fef7fb3
Add guard to USB examples
me-no-dev Feb 23, 2022
3a9e981
Disable some examples for ESP32-S3
me-no-dev Feb 23, 2022
962c30c
skip one more sketch and try again PIO
me-no-dev Feb 23, 2022
04c2d8f
Fox SPI example and add proper esptool for PIO CI
me-no-dev Feb 23, 2022
4a4df51
Update ResetReason.ino
me-no-dev Feb 23, 2022
b4a0c48
Merge branch 'master' into esp32-s3-support
me-no-dev Feb 23, 2022
b7c018d
Merge branch 'master' into esp32-s3-support
me-no-dev Mar 2, 2022
3775b93
Update IDF, Add ESP-SR and RainMaker
me-no-dev Mar 10, 2022
c1a809e
Enable RainMaker on all chips
me-no-dev Mar 10, 2022
f61b0eb
Merge branch 'master' into esp32-s3-support
me-no-dev Mar 10, 2022
86eb776
Enable hardware test on ESP32-S3
me-no-dev Mar 10, 2022
e0aad0f
Adjust build dir for tests and sketches
me-no-dev Mar 10, 2022
bedaad4
Update tests_build.sh
me-no-dev Mar 10, 2022
6934595
Send event also if tests fail
me-no-dev Mar 10, 2022
12c6599
Merge branch 'master' into esp32-s3-support
me-no-dev Mar 10, 2022
f2d081f
Add helper script for updating the core version
me-no-dev Mar 10, 2022
701fcad
[Docs] Added/Updated Lib builder docs (#6401)
pedrominatel Mar 10, 2022
a457204
SD_MMC: add ESP32-S3 support
igrr Feb 11, 2022
75cac9c
Merge pull request #6323 from espressif/esp32-s3-support-sdmmc
me-no-dev Mar 15, 2022
76d50ec
CmakeList + Rainmaker src files edit
P-R-O-C-H-Y Mar 16, 2022
7846ab3
Merge branch 'esp32-s3-support' into rainmaker-fix
P-R-O-C-H-Y Mar 16, 2022
4866f93
Merge pull request #6437 from P-R-O-C-H-Y/rainmaker-fix
me-no-dev Mar 16, 2022
2330e99
Fix reboot into download from TinyUSB on ESP32-S3
me-no-dev Mar 17, 2022
e942ba1
hal/usb_serial_jtag_ll.h only C3, H2, S3
Jason2866 Mar 17, 2022
b19eba6
Merge pull request #6440 from Jason2866/patch-1
me-no-dev Mar 18, 2022
2e90c25
Fix component build errors
me-no-dev Mar 18, 2022
b348511
Update IDF libs and mbedtls options
me-no-dev Mar 18, 2022
c4f4166
Merge branch 'master' into esp32-s3-support
me-no-dev Mar 18, 2022
a207771
Require wpa_supplicant for component builds
me-no-dev Mar 22, 2022
0bbe7c0
Try python3 on linux and mac
me-no-dev Mar 23, 2022
6f3ffce
Add board definition for ESP32-S3-USB-OTG
me-no-dev Mar 25, 2022
6d62775
feather esp32-s3 hardware definition and bootloader (#6450)
ladyada Mar 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 7 additions & 6 deletions .github/scripts/install-platformio-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master"

XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
RISCV_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
ESPTOOLPY_VERSION="~1.30100.0"
ESPRESSIF_ORGANIZATION_NAME="espressif"

Expand All @@ -30,9 +28,12 @@ replace_script+="data['packages']['toolchain-xtensa-esp32']['owner']='$ESPRESSIF
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
# Update versions to use the upstream
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$XTENSA32_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$XTENSA32S2_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$RISCV_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$TOOLCHAIN_VERSION';"
# Add ESP32-S3 Toolchain
replace_script+="data['packages'].update({'toolchain-xtensa-esp32s3':{'type':'toolchain','optional':True,'owner':'$ESPRESSIF_ORGANIZATION_NAME','version':'$TOOLCHAIN_VERSION'}});"
replace_script+="data['packages']['toolchain-xtensa-esp32'].update({'optional':False});"
# esptool.py may require an upstream version (for now platformio is the owner)
replace_script+="data['packages']['tool-esptoolpy']['version']='$ESPTOOLPY_VERSION';"
# Save results
Expand Down
20 changes: 19 additions & 1 deletion .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

export ARDUINO_BUILD_DIR="$HOME/.arduino/build.tmp"

function build(){
local target=$1
local fqbn=$2
Expand Down Expand Up @@ -63,6 +65,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then

FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
FQBN_ESP32S2="espressif:esp32:esp32s2:PSRAM=enabled,PartitionScheme=huge_app"
FQBN_ESP32S3="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
FQBN_ESP32C3="espressif:esp32:esp32c3:PartitionScheme=huge_app"

SKETCHES_ESP32="\
Expand All @@ -76,9 +79,10 @@ if [ "$BUILD_PIO" -eq 0 ]; then
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
"

build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
else
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
# PlatformIO ESP32 Test
Expand All @@ -96,6 +100,20 @@ else
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino"

python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s2" --project-option="board_build.partitions = huge_app.csv"
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32c3" --project-option="board_build.partitions = huge_app.csv"

echo "Hacking in S3 support ..."
replace_script="import json; import os;"
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
replace_script+="data=json.load(fp);"
replace_script+="data['packages']['toolchain-xtensa-esp32']['optional']=True;"
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['optional']=False;"
replace_script+="data['packages']['tool-esptoolpy']['owner']='tasmota';"
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v3.2.1/esptool-3.2.1.zip';"
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
python -c "$replace_script"

python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s3" --project-option="board_build.partitions = huge_app.csv"

#build_pio_sketches "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries"
fi
7 changes: 6 additions & 1 deletion .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <fqbn> <path-to-i
fi

ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
if [ -z "$ARDUINO_BUILD_DIR" ]; then
build_dir="$(dirname $sketch)/build"
else
build_dir="$ARDUINO_BUILD_DIR"
fi
local ide_path=$1
local usr_path=$2
local fqbn=$3
local sketch=$4
local xtra_opts=$5
local win_opts=$6

build_dir="$(dirname $sketch)/build"
rm -rf "$build_dir"
mkdir -p "$build_dir"
mkdir -p "$ARDUINO_CACHE_DIR"
$ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/tests_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ case "$target" in
;;
"esp32c3") fqbn="espressif:esp32:esp32c3:PartitionScheme=huge_app"
;;
"esp32s3") fqbn="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
;;
esac

if [ -z $fqbn ]; then
Expand Down
35 changes: 35 additions & 0 deletions .github/scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

if [ ! $# -eq 3 ]; then
echo "Bad number of arguments: $#" >&2
echo "usage: $0 <major> <minor> <patch>" >&2
exit 1
fi

re='^[0-9]+$'
if [[ ! $1 =~ $re ]] || [[ ! $2 =~ $re ]] || [[ ! $3 =~ $re ]] ; then
echo "error: Not a valid version: $1.$2.$3" >&2
echo "usage: $0 <major> <minor> <patch>" >&2
exit 1
fi

ESP_ARDUINO_VERSION_MAJOR="$1"
ESP_ARDUINO_VERSION_MINOR="$2"
ESP_ARDUINO_VERSION_PATCH="$3"
ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH"

echo "New Arduino Version: $ESP_ARDUINO_VERSION"

echo "Updating platform.txt..."
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt

echo "Updating package.json..."
cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json

echo "Updating cores/esp32/esp_arduino_version.h..."
cat cores/esp32/esp_arduino_version.h | \
sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \
sed "s/#define ESP_ARDUINO_VERSION_MINOR.*/#define ESP_ARDUINO_VERSION_MINOR $ESP_ARDUINO_VERSION_MINOR/g" | \
sed "s/#define ESP_ARDUINO_VERSION_PATCH.*/#define ESP_ARDUINO_VERSION_PATCH $ESP_ARDUINO_VERSION_PATCH/g" > __esp_arduino_version.h && mv __esp_arduino_version.h cores/esp32/esp_arduino_version.h

exit 0
5 changes: 3 additions & 2 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
chip: ['esp32', 'esp32s2', 'esp32c3']
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}

steps:
Expand All @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
chip: ['esp32', 'esp32s2', 'esp32c3']
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
container:
image: python:3.10.1-bullseye
Expand Down Expand Up @@ -110,6 +110,7 @@ jobs:

event_file:
name: "Event File"
if: ${{ always() }}
needs: Test
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
tools/xtensa-esp32-elf
tools/xtensa-esp32s2-elf
tools/xtensa-esp32s3-elf
tools/riscv32-esp-elf
tools/dist
tools/esptool
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ set(LIBRARY_SRCS
libraries/HTTPClient/src/HTTPClient.cpp
libraries/HTTPUpdate/src/HTTPUpdate.cpp
libraries/LittleFS/src/LittleFS.cpp
libraries/I2S/src/I2S.cpp
libraries/NetBIOS/src/NetBIOS.cpp
libraries/Preferences/src/Preferences.cpp
libraries/RainMaker/src/RMaker.cpp
Expand Down Expand Up @@ -163,7 +164,6 @@ set(BLE_SRCS
libraries/BLE/src/GeneralUtils.cpp
)


set(includedirs
variants/${IDF_TARGET}/
cores/esp32/
Expand All @@ -181,6 +181,7 @@ set(includedirs
libraries/HTTPClient/src
libraries/HTTPUpdate/src
libraries/LittleFS/src
libraries/I2S/src
libraries/NetBIOS/src
libraries/Preferences/src
libraries/RainMaker/src
Expand All @@ -201,7 +202,7 @@ set(includedirs

set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS})
set(priv_includes cores/esp32/libb64)
set(requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp)
set(requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp wpa_supplicant)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc esp_hid)

idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
Expand Down Expand Up @@ -236,7 +237,9 @@ function(maybe_add_component component_name)
endif()
endfunction()

if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK)
maybe_add_component(esp-dsp)

if(CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK)
maybe_add_component(esp_rainmaker)
maybe_add_component(qrcode)
endif()
Expand Down
Loading