Skip to content

ESP-IDF v5.1 #7733

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 179 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
c6feed9
Initial changes to compile under ESP-IDF v5.1
me-no-dev Jan 19, 2023
43845da
Initial import for ESP-IDF v5.1 libs
me-no-dev Jan 19, 2023
8ea62bb
Update toolchain
me-no-dev Jan 19, 2023
9802cf9
Update esp32-hal-psram.c
me-no-dev Jan 19, 2023
d006d83
Add missing LDs
me-no-dev Jan 19, 2023
b9c6eff
Update platform.txt
me-no-dev Jan 19, 2023
486840f
Stop some CI jobs, because they will always fail
me-no-dev Jan 19, 2023
04a7a18
Fix examples
me-no-dev Jan 19, 2023
eab71b9
Update app_httpd.cpp
me-no-dev Jan 19, 2023
bb20ee9
Update ResetReason.ino
me-no-dev Jan 20, 2023
a9df6ba
Warnings fixes
me-no-dev Jan 20, 2023
32807bb
Added the example guideline and template (#7665)
pedrominatel Jan 17, 2023
ea75f3e
Added ESP32-S3 link to the datasheet (#7738)
pedrominatel Jan 20, 2023
dca2c03
Update HiFreq_ADC.ino
me-no-dev Jan 20, 2023
fd3c28d
Replace periph_ctrl.h use because of deprecation
me-no-dev Jan 20, 2023
c0c4db6
Replace esp_spi_flash.h use because of deprecation
me-no-dev Jan 20, 2023
67e71bb
Add includes to male mDNS::enableWorkstation compile
me-no-dev Jan 20, 2023
bce5d87
Fix ssl_client mbedtls_pk_parse_key callback
me-no-dev Jan 20, 2023
449171c
Update temperature sensor driver
me-no-dev Jan 20, 2023
84008e3
Allow sketch_utils to compile with arduino-cli
me-no-dev Jan 21, 2023
e2c8042
Run CI with arduino-cli
me-no-dev Jan 23, 2023
5358014
Fix arduino-cli CI build on Windows
me-no-dev Jan 23, 2023
18604f7
Refactor platform.txt to not use components installed through the boa…
me-no-dev Jan 27, 2023
ef7c0e8
Initial Peripheral Manager Implementation
me-no-dev Jan 30, 2023
af9d6d2
Update SigmaDelta driver to use the new ESP-IDF driver API
me-no-dev Jan 30, 2023
c09a895
Small improvements to peripheral manager and SigmaDelta
me-no-dev Jan 30, 2023
5b43dee
Remove deleted function from SigmaDelta header
me-no-dev Jan 30, 2023
f9cddfd
Update DAC driver to use the new ESP-IDF driver API
me-no-dev Jan 31, 2023
0a566a5
Adds softAp(String) to make it compatible with ESP8266 (#7801)
SuGlider Feb 6, 2023
6a5ec97
Fix commentary (#7800)
SuGlider Feb 6, 2023
8fe7645
add adafruit new board feather esp32s2 reserve tft (#7794)
hathach Feb 6, 2023
0efccbf
bugfix: add <stdint.h> for uint8_t to avoid compilation failure (GCC …
quiret Feb 6, 2023
d87084b
Adding 3rd party boards for VALTRACK-V4-VTS-ESP32-C3 & VALTRACK-V4-MF…
raviypujar Feb 6, 2023
b46de8b
Update Platformio CI (#7725)
Jason2866 Feb 6, 2023
0ee2add
WiFiClient example fix (#7711)
PilnyTomas Feb 6, 2023
279d719
Mirror update from Heltec repository (#7709)
dberlin Feb 6, 2023
b965a8a
Fixes BLE data printing (#7699)
SuGlider Feb 6, 2023
3b4c893
split menu options + lora_32_V3 fix (#7697)
P-R-O-C-H-Y Feb 6, 2023
0aaa92a
Change header gaurd name (#7696)
nimaltd Feb 6, 2023
52a4462
Fix Name (#7691)
nimaltd Feb 6, 2023
bf73a74
Fix error in WiFiClient.cpp where the connect function fails for time…
rtpmsys Feb 6, 2023
2f164c7
fixed the function header (#7674)
bytiful Feb 6, 2023
c6b70aa
Ticker fix solving #6155 (#7664)
PilnyTomas Feb 6, 2023
a0da3c1
setPins fix ESP32 "specified pins are not supported by this chip." (#…
tmfarrington Feb 6, 2023
a3a1e7e
Allow passing IP as connect method parameter in WiFiClientSecure and …
cziter15 Feb 6, 2023
5ad55c5
Add LED_BUILTIN* definitions and initialization for LEDs to stop them…
not-surt Feb 6, 2023
416f4cf
Expand path to tinuf2 image when checking existence in platformio-bui…
scheffield Feb 6, 2023
904e797
Remove (useless) trailing semicolon from Print.cpp (#7622)
everslick Feb 6, 2023
d6e8f4b
ADD: New variant Edgebox-ESP-100 (#7771)
peterpanstechland Feb 7, 2023
82011d8
Add Crabik Slot ESP32-S3 board (#7790)
kekcheburec Feb 7, 2023
4633d73
new variant LilyGO T-Display-S3 (#7763)
Eistee82 Feb 7, 2023
91b04c2
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Feb 7, 2023
86c5568
Update get.py to support Apple ARM64
me-no-dev Feb 8, 2023
9969d57
Update package_esp32_index.template.json
me-no-dev Feb 8, 2023
679deef
WString Return bool (#7774)
mrengineer7777 Feb 8, 2023
7d1c4d1
Add Roboheart Hercules development board to the esp32-core (#7672)
Gaya3N25 Feb 8, 2023
b19eca8
Reword "ESP-IDF as Component" (#7812)
remenyo Feb 8, 2023
bcbf73b
add new board Adafruit Feather ESP32-S3 Reverse TFT (#7811)
hathach Feb 8, 2023
1bcf8ae
Multi threading examples (tasks, queues, semaphores, mutexes) (#7660)
PilnyTomas Feb 8, 2023
ef03058
Update ESP-IDF libs
me-no-dev Feb 9, 2023
099c751
Update CMakeLists.txt
me-no-dev Feb 9, 2023
1ee578e
Update esptool to v4.4
me-no-dev Feb 9, 2023
011d185
Add function timerAttachInterruptFlag (#7809)
davidk88 Feb 9, 2023
0bb20e1
Update esptool to v4.5
me-no-dev Feb 13, 2023
2ee222a
ADC refactoring (#7827)
P-R-O-C-H-Y Feb 14, 2023
0220417
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Feb 15, 2023
144f116
Update ETH.cpp
me-no-dev Feb 15, 2023
45a3bd2
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Feb 20, 2023
cabb7b7
Update FunctionalInterruptStruct.ino
me-no-dev Feb 20, 2023
bb1ad19
Update package_esp32_index.template.json
me-no-dev Feb 20, 2023
999f82d
Update package_esp32_index.template.json
me-no-dev Mar 1, 2023
84315c6
Fixes for the latest IDF v5.1
me-no-dev Mar 10, 2023
34ba0b5
update esp-idf libs and toolchain
me-no-dev Mar 10, 2023
5748479
Turn OFF auto crystal frequency for ESP32 (needed by TWAI)
me-no-dev Mar 11, 2023
5a75d76
Update examples
me-no-dev Mar 11, 2023
f88d630
Switch build to mostly use flags from files
me-no-dev Mar 12, 2023
44753a9
Reorganize flag files
me-no-dev Mar 12, 2023
c0c6db4
Optimize chip build flags further
me-no-dev Mar 13, 2023
10e77e8
Revert defines from file. MBEDTLS_CONFIG_FILE does not properly expand
me-no-dev Mar 13, 2023
ce45ed6
Add support for includes and defines from file
me-no-dev Mar 13, 2023
6465aea
Replace old sdk path references in platform.txt
me-no-dev Mar 13, 2023
ccedb0b
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Mar 14, 2023
d10ed8e
use gcc-ar (#8013)
Jason2866 Mar 31, 2023
f48cb4b
Makes F_CPU generic for all SoC (#8007)
SuGlider Mar 31, 2023
73d2862
TIMER refactoring (#7904)
P-R-O-C-H-Y Mar 31, 2023
5128825
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Mar 31, 2023
ced66da
[Docs] ADC and Timer API Update (+some docs fixes) (#7906)
P-R-O-C-H-Y Apr 4, 2023
52c20a6
Fixes APLL/PLL with RTC Frequency (#8025)
SuGlider Apr 4, 2023
ffc3d80
Update IDF libs and fix OPI PSRAM on S3
me-no-dev Apr 7, 2023
5367814
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Apr 7, 2023
7d26bf8
Add setMode function HardwareSerial.c to set the esp32 uart mode for …
jamesarm97 Mar 31, 2023
3a1bd3d
Add support for esp-elf-gdb
me-no-dev Apr 7, 2023
1f0343d
WFG Crashfix (#8044)
mrengineer7777 Apr 10, 2023
c5028e3
Update component libs
me-no-dev Apr 10, 2023
20b2715
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Apr 10, 2023
b4f6db6
IDF release/v5.1 (#8061)
me-no-dev Apr 11, 2023
7bc80a4
Switch SDK to be an external package
me-no-dev Apr 13, 2023
6dbdd00
fix path (#8096)
Jason2866 Apr 18, 2023
b66aa19
Makes UART work at any APB Frequency (#8097)
SuGlider Apr 18, 2023
198173c
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Apr 18, 2023
158f1b4
Add required callbacks for TinyUSB DFU
me-no-dev Apr 19, 2023
8fbac33
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Apr 20, 2023
d059d43
Update version to 3.0.0
me-no-dev Apr 20, 2023
cf75047
Add ESP.getCoreVersion() and update ESP.getChipModel()
me-no-dev Apr 25, 2023
184d5fa
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev May 3, 2023
4eb52c9
Update timer hal for the latest 5.1
me-no-dev May 5, 2023
0618b74
Use separate RX and TX buffer sizes in HTTP client
me-no-dev May 5, 2023
a6bd6ba
Rename clock tree enum name in latest 5.1
me-no-dev May 6, 2023
e220751
ESP32-H4 support was removed in ESP-IDF v5.1
me-no-dev May 6, 2023
7f1466b
IDF release/v5.1 2004bf4e11 (#8165)
me-no-dev May 6, 2023
06a52fd
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev May 6, 2023
10ab130
Deinit previous bus first (#8180)
P-R-O-C-H-Y May 11, 2023
3a282f6
TIMER - add timer_started flag, fix timerEnd() + timer HW test (#8135)
P-R-O-C-H-Y May 11, 2023
59f7975
TOUCH - Peripheral manager implementation (#8129)
P-R-O-C-H-Y May 11, 2023
63bc30c
LEDC Refactoring - Peripheral manager implemented (#8126)
P-R-O-C-H-Y May 11, 2023
68c678e
GPIO - Peripheral manager implementation (#8179)
P-R-O-C-H-Y May 11, 2023
8a179e6
Enforces more consistency into Peripheral Manager (#8188)
SuGlider May 11, 2023
1e4d5bf
[Arduino Core 3.0.0] RMT IDF5.1 Refactoring (#7994)
SuGlider May 11, 2023
2e4a1b9
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev May 11, 2023
ca7bcc0
Update PlatformIO scripts for the upcoming 3.0 core (#8183)
valeros May 16, 2023
0829e07
free memory on detach (#8264)
P-R-O-C-H-Y May 31, 2023
0320f4d
SPI - Peripheral manager implementation (#8255)
P-R-O-C-H-Y May 31, 2023
66c88fa
Update esp32-hal-rmt.c (#8216)
SuGlider May 31, 2023
3d5b570
I2C - Peripheral manager implementation (#8220)
P-R-O-C-H-Y May 31, 2023
2d2ddb5
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev May 31, 2023
b1379db
Fix warnings in hal-spi caused by pariman transition
me-no-dev Jun 1, 2023
37b2e4a
Update esptool.py to version 4.6
me-no-dev Jun 1, 2023
cbe9eaf
Add platform support for ESP_SR
me-no-dev Jun 1, 2023
b69f375
Add USB Type and valid pin check to periman
me-no-dev Jun 1, 2023
d2993fd
replace bus with spi->num+1 (#8279)
P-R-O-C-H-Y Jun 1, 2023
b97dab4
Remove default pins from SPI HAL
me-no-dev Jun 1, 2023
28f2855
Add commented out handlers for esptool.js in TinyUSB CDC
me-no-dev Jun 1, 2023
d42f94a
Add build defines for host os and fqbn (for debug purposes)
me-no-dev Jun 1, 2023
49fbff4
Provide proper memory caps total size
me-no-dev Jun 5, 2023
92cf003
Update Esp.cpp
me-no-dev Jun 5, 2023
f798eb3
SDMMC - Peripheral manager implementation (#8289)
P-R-O-C-H-Y Jun 5, 2023
c34f850
IDF release/v5.1 4bc762621d (#8292)
me-no-dev Jun 6, 2023
4f94154
Adds missing pinMode (#8312)
SuGlider Jun 13, 2023
31b07e0
LEDC Fade implementation (#8338)
P-R-O-C-H-Y Jun 29, 2023
9507124
Adds USB to Peripheral Manager - Arduino Core 3.0.0 (#8335)
SuGlider Jun 29, 2023
07bf7be
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Jun 29, 2023
aca449f
ETHERNET - Peripheral manager implementation (#8297)
P-R-O-C-H-Y Jun 29, 2023
c5a355e
Adds HardwareSerial to Peripheral Manager Arduino 3.0.0 (#8328)
SuGlider Jun 29, 2023
4817553
Do not limit ETHERNET in periman to only ESP32. SPI is also an option
me-no-dev Jun 30, 2023
42f216f
Initial support for ESP32-C6 (#8337)
me-no-dev Jun 30, 2023
5364216
Add checks for SOC defines (#8351)
P-R-O-C-H-Y Jun 30, 2023
558ea7e
Feature/esp32h2 support (#8373)
me-no-dev Jul 1, 2023
685b9b8
Fix flashing on ESP32-H2
me-no-dev Jul 3, 2023
fe27a1f
Fix GPIO Configs for ESP32-C6 and ESP32-H2
me-no-dev Jul 3, 2023
a25e4d5
Update Timer test sketch
P-R-O-C-H-Y Jul 3, 2023
645d5ce
Fix upload flash parameters
me-no-dev Jul 3, 2023
e08a83a
Use ets_write_char_uart instead of ets_printf in log_printfv
me-no-dev Jul 4, 2023
3833fa2
Print full chip report when log level is sufficient (#8282)
me-no-dev Jul 4, 2023
f8c5b98
ESP32-C3 does not have ets_write_char_uart
me-no-dev Jul 4, 2023
3246baa
Fix BLE gap event name
P-R-O-C-H-Y Jul 7, 2023
431bf8b
HW Testing - Pytest update (#8389)
P-R-O-C-H-Y Jul 11, 2023
4a12dba
Updated FreeRTOS names (#8418)
PilnyTomas Jul 18, 2023
c088bcf
HW Testing - ESP32-C6 + ESP32-H2 fixes (#8404)
P-R-O-C-H-Y Jul 18, 2023
9aeed61
Removed duplicate TX1 define for H2 (#8402)
PilnyTomas Jul 18, 2023
f4cfacd
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Jul 18, 2023
065ced1
Fix broken examples
me-no-dev Jul 18, 2023
3162e94
Fixes RMT filter & idle timing and setup (#8359)
SuGlider Jul 20, 2023
8cf6294
IDF release/v5.1 a7b62bbcaf (#8438)
me-no-dev Jul 20, 2023
e343918
Add workflow to build executables from python scripts (#8290)
me-no-dev Jul 22, 2023
5a6507e
App rollback should be after PSRAM is initialized
me-no-dev Jul 27, 2023
bfab4fe
Correcting RX1 to GPIO4 and TX1 to GPIO5 to be consistent with docume…
petergjoel Aug 1, 2023
17e1ad5
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Aug 4, 2023
e9f4572
Fixes Memory Leak (#8486)
SuGlider Aug 4, 2023
9d3fa6b
fixes preprocessor test (#8485)
SuGlider Aug 4, 2023
d663575
fix flash mode read out for C6
Jason2866 Aug 12, 2023
90978c8
Merge pull request #8517 from Jason2866/esp-idf-v5.1-libs-1
me-no-dev Aug 12, 2023
b4f5e65
Merge pull request #8477 from Proofzy/esp-idf-v5.1-libs-uart1-pins
me-no-dev Aug 12, 2023
712bca1
Add option for custom partitions without restrictions
me-no-dev Aug 28, 2023
ee9a71d
SD_MMC update (#8298)
PilnyTomas Aug 29, 2023
4fb5a2c
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Sep 4, 2023
caddefc
IDF release/v5.1 f0437b945f (#8599)
me-no-dev Sep 5, 2023
388106f
Update package_esp32_index.template.json
me-no-dev Sep 5, 2023
7beab8e
Merge branch 'master' into esp-idf-v5.1-libs
me-no-dev Oct 5, 2023
21b6456
Fix printf format build error in BTAdvertisedDeviceSet.cpp
me-no-dev Oct 5, 2023
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.
78 changes: 78 additions & 0 deletions .github/pytools/Sign-File.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[CmdletBinding()]
param (
[Parameter()]
[String]
$Path
)


function FindSignTool {
$SignTool = "signtool.exe"
if (Get-Command $SignTool -ErrorAction SilentlyContinue) {
return $SignTool
}
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x64\signtool.exe"
if (Test-Path -Path $SignTool -PathType Leaf) {
return $SignTool
}
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x86\signtool.exe"
if (Test-Path -Path $SignTool -PathType Leaf) {
return $SignTool
}
$sdkVers = "10.0.22000.0", "10.0.20348.0", "10.0.19041.0", "10.0.17763.0"
Foreach ($ver in $sdkVers)
{
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\${ver}\x64\signtool.exe"
if (Test-Path -Path $SignTool -PathType Leaf) {
return $SignTool
}
}
"signtool.exe not found"
Exit 1
}

function SignEsptool {
param(
[Parameter()]
[String]
$Path
)

$SignTool = FindSignTool
"Using: $SignTool"
$CertificateFile = [system.io.path]::GetTempPath() + "certificate.pfx"

if ($null -eq $env:CERTIFICATE) {
"CERTIFICATE variable not set, unable to sign the file"
Exit 1
}

if ("" -eq $env:CERTIFICATE) {
"CERTIFICATE variable is empty, unable to sign the file"
Exit 1
}

$SignParameters = @("sign", "/tr", 'http://timestamp.digicert.com', "/td", "SHA256", "/f", $CertificateFile, "/fd", "SHA256")
if ($env:CERTIFICATE_PASSWORD) {
"CERTIFICATE_PASSWORD detected, using the password"
$SignParameters += "/p"
$SignParameters += $env:CERTIFICATE_PASSWORD
}
$SignParameters += $Path

[byte[]]$CertificateBytes = [convert]::FromBase64String($env:CERTIFICATE)
[IO.File]::WriteAllBytes($CertificateFile, $CertificateBytes)

&$SignTool $SignParameters

if (0 -eq $LASTEXITCODE) {
Remove-Item $CertificateFile
} else {
Remove-Item $CertificateFile
"Signing failed"
Exit 1
}

}

SignEsptool ${Path}
Binary file added .github/pytools/espressif.ico
Binary file not shown.
14 changes: 10 additions & 4 deletions .github/scripts/install-platformio-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git"

TOOLCHAIN_VERSION="8.4.0+2021r2-patch5"
ESPTOOLPY_VERSION="~1.40400.0"
TOOLCHAIN_VERSION="12.2.0+20230208"
ESPTOOLPY_VERSION="~1.40501.0"
ESPRESSIF_ORGANIZATION_NAME="espressif"

echo "Installing Python Wheel ..."
Expand All @@ -30,9 +30,15 @@ replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_
# Update versions to use the upstream
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-xtensa-esp32s3']['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'}});"
# Add new "framework-arduinoespressif32-libs" package
# Read "package_esp32_index.template.json" to extract a url to a zip package for "esp32-arduino-libs"
replace_script+="fpackage=open(os.path.join('package', 'package_esp32_index.template.json'), 'r+');"
replace_script+="package_data=json.load(fpackage);"
replace_script+="fpackage.close();"
replace_script+="libs_package_archive_url=next(next(system['url'] for system in tool['systems'] if system['host'] == 'x86_64-pc-linux-gnu') for tool in package_data['packages'][0]['tools'] if tool['name'] == 'esp32-arduino-libs');"
replace_script+="data['packages'].update({'framework-arduinoespressif32-libs':{'type':'framework','optional':False,'version':libs_package_archive_url}});"
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';"
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ if [ "$BUILD_PIO" -eq 0 ]; then
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"
FQBN_ESP32C6="espressif:esp32:esp32c6:PartitionScheme=huge_app"
FQBN_ESP32H2="espressif:esp32:esp32h2:PartitionScheme=huge_app"

SKETCHES_ESP32="\
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
Expand All @@ -85,6 +87,8 @@ if [ "$BUILD_PIO" -eq 0 ]; then
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 "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
else
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
Expand Down
4 changes: 3 additions & 1 deletion .github/scripts/on-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.py" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.exe" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/ide-debug" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"

# Remove unnecessary files in the package folder
Expand All @@ -197,10 +196,13 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
echo "Generating platform.txt..."
cat "$GITHUB_WORKSPACE/platform.txt" | \
sed "s/version=.*/version=$ver$extent/g" | \
sed 's/tools.esp32-arduino-libs.path={runtime.platform.path}\/tools\/esp32-arduino-libs/tools.esp32-arduino-libs.path=\{runtime.tools.esp32-arduino-libs.path\}/g' | \
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
sed 's/tools.xtensa-esp-elf-gdb.path={runtime.platform.path}\/tools\/xtensa-esp-elf-gdb/tools.xtensa-esp-elf-gdb.path=\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
sed 's/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}/g' | \
sed 's/tools.riscv32-esp-elf-gdb.path={runtime.platform.path}\/tools\/riscv32-esp-elf-gdb/tools.riscv32-esp-elf-gdb.path=\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
Expand Down
8 changes: 8 additions & 0 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
esp32s2_opts="PSRAM=enabled,PartitionScheme=huge_app"
esp32s3_opts="PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
esp32c3_opts="PartitionScheme=huge_app"
esp32c6_opts="PartitionScheme=huge_app"
esp32h2_opts="PartitionScheme=huge_app"

# Select the common part of the FQBN based on the target. The rest will be
# appended depending on the passed options.
Expand All @@ -91,6 +93,12 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
"esp32s3")
fqbn="espressif:esp32:esp32s3:${options:-$esp32s3_opts}"
;;
"esp32c6")
fqbn="espressif:esp32:esp32c6:${options:-$esp32c6_opts}"
;;
"esp32h2")
fqbn="espressif:esp32:esp32h2:${options:-$esp32h2_opts}"
;;
esac

# Make it look like a JSON array.
Expand Down
11 changes: 11 additions & 0 deletions .github/scripts/upload_py_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
CHANGED_FILES=$1
echo "Pushing '$CHANGED_FILES' as $GITHUB_ACTOR"
git config --global github.user "$GITHUB_ACTOR"
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
for tool in $CHANGED_FILES; do
git add tools/$tool.exe
done
git commit -m "Push binary to tools"
git push
141 changes: 141 additions & 0 deletions .github/workflows/build_py_tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build Python Tools

on:
pull_request:
paths:
- 'tools/get.py'
- 'tools/espota.py'
- 'tools/gen_esp32part.py'
- 'tools/gen_insights_package.py'

jobs:
find-changed-tools:
name: Check if tools have been changed
runs-on: ubuntu-20.04
outputs:
any_changed: ${{ steps.verify-changed-files.outputs.any_changed }}
all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.ref }}
- name: Verify Python Tools Changed
uses: tj-actions/changed-files@v36
id: verify-changed-files
with:
fetch_depth: '2'
since_last_remote_commit: 'true'
files: |
tools/get.py
tools/espota.py
tools/gen_esp32part.py
tools/gen_insights_package.py
- name: List all changed files
shell: bash
run: |
for file in ${{ steps.verify-changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done

build-pytools-binaries:
name: Build python tools binaries for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: find-changed-tools
if: needs.find-changed-tools.outputs.any_changed == 'true'
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04, ARM, ARM64]
include:
- os: windows-latest
TARGET: win64
EXTEN: .exe
SEPARATOR: ';'
- os: macos-latest
TARGET: macos
SEPARATOR: ':'
- os: ubuntu-20.04
TARGET: linux-amd64
SEPARATOR: ':'
- os: ARM
CONTAINER: python:3.8-bullseye
TARGET: arm
SEPARATOR: ':'
- os: ARM64
CONTAINER: python:3.8-bullseye
TARGET: arm64
SEPARATOR: ':'
container: ${{ matrix.CONTAINER }} # use python container on ARM
env:
DISTPATH: pytools-${{ matrix.TARGET }}
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi"
steps:
- name: List changed tools
shell: bash
run: |
CHANGED_FILES=()
for file in ${{ needs.find-changed-tools.outputs.all_changed_files }}; do
file="${file#*\/}"
file="${file%\.*}"
CHANGED_FILES+=("$file")
done
CHANGED_FILES="${CHANGED_FILES[@]}"
echo "CHANGED_TOOLS=$CHANGED_FILES" >> "$GITHUB_ENV"
for tool in ${{ env.CHANGED_TOOLS }}; do
echo "tool $tool was changed"
done
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3.8
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
if: matrix.os != 'ARM' && matrix.os != 'ARM64'
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller requests
- name: Build with PyInstaller
shell: bash
run: |
for tool in ${{ env.CHANGED_TOOLS }}; do
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py
done
- name: Sign binaries
if: matrix.os == 'windows-latest'
env:
CERTIFICATE: ${{ secrets.CERTIFICATE }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
shell: pwsh
run: |
$data = Write-Output ${{ env.CHANGED_TOOLS }}
foreach ( $node in $data )
{
./.github/pytools/Sign-File.ps1 -Path ./${{ env.DISTPATH }}/$node.exe
}
- name: Test binaries
shell: bash
run: |
for tool in ${{ env.CHANGED_TOOLS }}; do
./${{ env.DISTPATH }}/$tool${{ matrix.EXTEN }} -h
done
- name: Push binary to tools
if: matrix.os == 'windows-latest'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
shell: bash
run: |
for tool in ${{ env.CHANGED_TOOLS }}; do
cp -f ./${{ env.DISTPATH }}/$tool.exe tools/$tool.exe
done
bash .github/scripts/upload_py_tools.sh "${{ env.CHANGED_TOOLS }}"
- name: Archive artifact
uses: actions/upload-artifact@master
with:
name: ${{ env.DISTPATH }}
path: ${{ env.DISTPATH }}
13 changes: 4 additions & 9 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', 'esp32s3', 'esp32c3']
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
steps:
- name: Checkout Repository
Expand All @@ -66,17 +66,12 @@ jobs:
Test:
needs: [gen_chunks, Build]
name: ${{matrix.chip}}-Test#${{matrix.chunks}}
runs-on:
- ESP32
- ESP32-S2
- ESP32-S3
- ESP32-C3

strategy:
fail-fast: false
matrix:
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2']
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
runs-on: [arduino, "${{matrix.chip}}"]
container:
image: python:3.10.1-bullseye
options: --privileged
Expand All @@ -94,7 +89,7 @@ jobs:
- name: Install dependencies
run: |
pip install -U pip
pip install -r tests/requirements.txt
pip install -r tests/requirements.txt --extra-index-url https://dl.espressif.com/pypi
apt update && apt install -y -qq jq

- name: Run Tests
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
- esp32s2
- esp32c3
- esp32s3
- esp32c6
- esp32h2

include:
- target: esp32
Expand All @@ -46,6 +48,10 @@ jobs:
fqbn: espressif:esp32:esp32c3
- target: esp32s3
fqbn: espressif:esp32:esp32s3
- target: esp32c6
fqbn: espressif:esp32:esp32c6
- target: esp32h2
fqbn: espressif:esp32:esp32h2


steps:
Expand Down
Loading