Skip to content

Arduino 3.1.x based on IDF 5.3.x #74

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 89 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
2c2c11f
IDF 5.3 support
Jason2866 Jul 30, 2024
050e817
IDF 5.3
Jason2866 Jul 30, 2024
273fa12
IDF 5.3 toolchains
Jason2866 Jul 30, 2024
720dd9e
Fix owner of
Jason2866 Jul 30, 2024
cb93c63
ULP compability for IDF 5.3
Jason2866 Jul 30, 2024
bbefb1c
remove debug print
Jason2866 Jul 30, 2024
f7a586c
Fix bootloader offset code retrieve
Jason2866 Aug 7, 2024
2625ee4
Update esp32-c6-devkitc-1.json
Jason2866 Aug 17, 2024
d0ef23c
use espressif Arduino branch `release/v3.1.x`
Jason2866 Aug 19, 2024
abf68b3
Update README.md
Jason2866 Aug 20, 2024
5106663
Update README.md
Jason2866 Aug 21, 2024
13f0846
Fix compile issue with managed components
Jason2866 Aug 21, 2024
017ffd0
use latest Arduino 3.1.0 libs
Jason2866 Aug 21, 2024
ecbd68f
fetch Arduino libs dl URL from manifest json
Jason2866 Aug 21, 2024
3c69c8a
fetch Arduino libs dl URL from manifest json
Jason2866 Aug 21, 2024
51ecab1
Update README.md
Jason2866 Aug 29, 2024
29ac567
Fix IDF 5.3 ULP compile
Jason2866 Aug 29, 2024
b25578d
Use espressif Arduino branch release/v3.1.x
Jason2866 Aug 29, 2024
e3955e2
Update platform.py
Jason2866 Sep 4, 2024
b2eac3c
better handling of complex Macros from cmake model
Jason2866 Sep 6, 2024
2642ed8
IDF 5.3.1 release
Jason2866 Sep 6, 2024
52fc975
fix handling of cc fragments
Jason2866 Sep 9, 2024
a72dfbf
unchanged IDF 5.3.1
Jason2866 Sep 12, 2024
69442f2
ULP has now a cmake build script
Jason2866 Sep 12, 2024
5b1960f
add arduino/idf examples
Jason2866 Sep 13, 2024
8c21dfa
fix used platform
Jason2866 Sep 13, 2024
04b83e3
prepare LP ULP support
Jason2866 Sep 14, 2024
e8fef0a
enable bootloader components build
Jason2866 Sep 16, 2024
02b4fe9
ULP LP support
Jason2866 Sep 16, 2024
b1bc128
add missing P4
Jason2866 Sep 17, 2024
29b02a9
add P4
Jason2866 Sep 17, 2024
00f9977
change some if checks
Jason2866 Sep 17, 2024
d00384e
Update README.md
Jason2866 Sep 17, 2024
b68c01d
remove wrong left over code
Jason2866 Sep 17, 2024
f380fbc
add ULP LP example / update Matter example
Jason2866 Sep 17, 2024
e5a15af
fix path
Jason2866 Sep 17, 2024
f1be773
add zigbee examples
Jason2866 Sep 17, 2024
2008d85
disable zigbee examples
Jason2866 Sep 17, 2024
c528ba0
esptool.py v4.8.0
Jason2866 Sep 19, 2024
dc8b7fa
add cmake_utilities for C2
Jason2866 Sep 20, 2024
b5d2c18
add auto select "espidf" when pio var "custom_sdkconfig" is set
Jason2866 Sep 23, 2024
723f620
IDF v5.3.1.240924
Jason2866 Sep 25, 2024
f8088ef
Update main.py
Jason2866 Oct 12, 2024
91db0be
matter example currently broken
Jason2866 Oct 12, 2024
99a2f83
Update platformio.ini
Jason2866 Oct 12, 2024
9467fb4
Update platformio.ini
Jason2866 Oct 12, 2024
6ac746f
Update platformio.ini
Jason2866 Oct 12, 2024
fe906d0
Update platformio.ini
Jason2866 Oct 12, 2024
570baf3
Update examples.yml
Jason2866 Oct 13, 2024
c2b9a6f
IDF v5.3.1.241016
Jason2866 Oct 19, 2024
2875e0e
Update Zigbee_On_Off_Light.ino
Jason2866 Oct 19, 2024
4e2a1e8
Update Zigbee_On_Off_Switch.ino
Jason2866 Oct 19, 2024
5e86bd8
Update examples.yml
Jason2866 Oct 19, 2024
1cb8797
Update platformio.ini
Jason2866 Oct 19, 2024
62a6fec
Update platformio.ini
Jason2866 Oct 19, 2024
e6d9813
Update examples.yml
Jason2866 Oct 19, 2024
25b262e
esptool.py v4.8.1.1
Jason2866 Oct 22, 2024
bc938bb
Update platform.py
Jason2866 Oct 25, 2024
1f7857f
Update gdb 14.2.0+20240403
Jason2866 Oct 25, 2024
4dd0007
fix owner for gdb
Jason2866 Oct 25, 2024
80b42f4
Update IDF v5.3.1.241024
Jason2866 Oct 25, 2024
74bcd2a
Update adafruit_matrixportal_esp32s3.json
Jason2866 Nov 3, 2024
418b826
Use compatible h2zero NimBLE git commit
Jason2866 Nov 6, 2024
f249952
Update Zigbee_On_Off_Light.ino
Jason2866 Nov 13, 2024
e690936
Update Zigbee_On_Off_Switch.ino
Jason2866 Nov 13, 2024
071d5bd
fix custom partiton table offset calculation
Jason2866 Nov 15, 2024
9618b04
Update README.md
Jason2866 Nov 20, 2024
c99f00e
Create esp32-p4.json
Jason2866 Nov 28, 2024
7d09160
add P4 to blink example
Jason2866 Nov 28, 2024
c980602
Update Zigbee_On_Off_Switch.ino
Jason2866 Nov 28, 2024
10c6155
Update Zigbee_On_Off_Light.ino
Jason2866 Nov 28, 2024
e48457b
Update sdkconfig.defaults
Jason2866 Nov 28, 2024
417c3b6
add P4 to LP example
Jason2866 Nov 28, 2024
807b409
Create esp32-p4-evboard.json
Jason2866 Dec 1, 2024
ba9e297
IDF 5.3.2 release
Jason2866 Dec 6, 2024
c66fe81
prep for "pioarduino-build.py" script
Jason2866 Dec 10, 2024
dc971cc
add missing import os
Jason2866 Dec 10, 2024
a718463
fix not defined var
Jason2866 Dec 10, 2024
5c57372
Update Zigbee_On_Off_Switch.ino
Jason2866 Dec 10, 2024
893f57f
esptool.py v4.8.5
Jason2866 Dec 13, 2024
5621a0e
Update Zigbee_On_Off_Light.ino
Jason2866 Dec 13, 2024
894cacc
add Hybrid Compile (#73)
Jason2866 Dec 14, 2024
13763ae
Update README.md
Jason2866 Dec 14, 2024
54f1ace
set Arduino compile option `UPDATE_NOCRYPT` in example Tasmota
Jason2866 Dec 14, 2024
738e12f
Update C2 Hybrid compile skeleton
Jason2866 Dec 14, 2024
732cd1c
Update IDF v5.3.2.241210
Jason2866 Dec 15, 2024
b795930
Revert to IDF 5.3.2
Jason2866 Dec 15, 2024
f7d2fe0
Update pioarduino IDF 5.2
Jason2866 Dec 15, 2024
6e60f3a
Update release_zips.yml
Jason2866 Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
- "examples/arduino-rmt-blink"
- "examples/arduino-usb-keyboard"
- "examples/arduino-wifiscan"
- "examples/arduino-zigbee-light"
- "examples/arduino-zigbee-switch"
- "examples/tasmota"
- "examples/espidf-arduino-h2zero-BLE_scan"
- "examples/espidf-arduino-matter-light"
- "examples/espidf-arduino-blink"
- "examples/espidf-arduino-littlefs"
- "examples/espidf-blink"
Expand All @@ -30,6 +35,7 @@ jobs:
- "examples/espidf-storage-sdcard"
- "examples/espidf-ulp"
- "examples/espidf-ulp-riscv"
- "examples/espidf-ulp-lp"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -39,12 +45,36 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
- name: Install Windows dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -U https://github.com/platformio/platformio/archive/develop.zip
pio pkg install --global --platform symlink://.
- name: Build examples
pio pkg install --global --platform file://.
if: "matrix.os == 'windows-2022'"
env:
PLATFORMIO_CORE_DIR: C:\plat
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
PLATFORMIO_PLATFORMS_DIR: C:\plat\plat
- name: Build Windows examples
run: pio run -d ${{ matrix.example }}
if: "matrix.example != 'examples/tasmota' && matrix.os == 'windows-2022'"
env:
PLATFORMIO_CORE_DIR: C:\plat
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
PLATFORMIO_PLATFORMS_DIR: C:\plat\plat
- name: Install Ubuntu Mac dependencies
run: |
pio run -d ${{ matrix.example }}
python -m pip install --upgrade pip
pip install wheel
pip install -U https://github.com/platformio/platformio/archive/develop.zip
pio pkg install --global --platform file://.
if: "matrix.os != 'windows-2022'"
- name: git clone Tasmota and add to examples
run: |
git clone -b development --depth 1 https://github.com/arendst/Tasmota.git examples/tasmota
cp examples/tasmota_platformio_override.ini examples/tasmota/platformio_override.ini
if: "matrix.example == 'examples/tasmota' && matrix.os != 'windows-2022'"
- name: Build Ubuntu Mac examples
run: pio run -d ${{ matrix.example }}
if: "matrix.os != 'windows-2022'"
2 changes: 1 addition & 1 deletion .github/workflows/release_zips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create zip file with recursive source clone for release
on:
push:
tags:
- 51*
- 53*

jobs:
release_zips:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and Bluetooth. ESP32 integrates an antenna switch, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules.

* [Documentation](https://docs.platformio.org/page/platforms/espressif32.html) (advanced usage, packages, boards, frameworks, etc.)
* Issues with boards (wrong / missing). All issues caused from boards will not be fixed from the maintainer(s). A PR needs to be provided to solve.

## IDE Preparation

Expand All @@ -34,23 +35,22 @@ ESP32 is a series of low-cost, low-power system on a chip microcontrollers with
1. Configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:

### Stable version
espressif Arduino 3.0.3 and IDF 5.1.4

See `platform` [documentation](https://docs.platformio.org/en/latest/projectconf/sections/env/options/platform/platform.html#projectconf-env-platform) for details.

```ini
[env:stable]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
board = ...
...
```

### Development version
espressif Arduino repo branch master and latest compiled Arduino libs
based on devel branch Arduino 3.1.0 and IDF 5.3.2

```ini
[env:development]
platform = https://github.com/pioarduino/platform-espressif32.git#develop
platform = https://github.com/pioarduino/platform-espressif32.git#Arduino/IDF53
board = ...
...
```
Expand Down
4 changes: 2 additions & 2 deletions boards/adafruit_matrixportal_esp32s3.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"build": {
"arduino":{
"ldscript": "esp32s3_out.ld",
"partitions": "partitions-8MB-tinyuf2.csv"
"partitions": "tinyuf2-partitions-8MB.csv",
"memory_type": "qio_qspi"
},
"core": "esp32",
"extra_flags": [
Expand Down
1 change: 1 addition & 0 deletions boards/esp32-c6-devkitc-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"variant": "esp32c6"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
Expand Down
37 changes: 37 additions & 0 deletions boards/esp32-p4-evboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"build": {
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM"
],
"f_cpu": "360000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"mcu": "esp32p4",
"variant": "esp32p4"
},
"arduino": {
"partitions": "default_16MB.csv"
},
"connectivity": [
"bluetooth",
"openthread"
],
"debug": {
"openocd_target": "esp32p4.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "Espressif ESP32-P4 Function EV Board",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 512000,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 1500000
},
"url": "https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html",
"vendor": "Espressif"
}
34 changes: 34 additions & 0 deletions boards/esp32-p4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"build": {
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM"
],
"f_cpu": "360000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"mcu": "esp32p4",
"variant": "esp32p4"
},
"connectivity": [
"bluetooth",
"openthread"
],
"debug": {
"openocd_target": "esp32p4.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "Espressif ESP32-P4 generic",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://docs.espressif.com",
"vendor": "Espressif"
}
10 changes: 6 additions & 4 deletions boards/esp32-solo1.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DCORE32SOLO1",
"f_cpu": "80000000L",
"f_cpu": "160000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
Expand All @@ -32,6 +29,11 @@
"require_upload_port": true,
"speed": 460800
},
"espidf": {
"custom_sdkconfig": [
"CONFIG_FREERTOS_UNICORE=y"
]
},
"url": "https://en.wikipedia.org/wiki/ESP32",
"vendor": "Espressif"
}
50 changes: 50 additions & 0 deletions boards/esp32s3_120_16_8-qio_opi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"memory_type": "qio_opi",
"partitions": "default_16MB.csv"
},
"core": "esp32",
"f_cpu": "240000000L",
"f_flash": "80000000L",
"f_boot": "120000000L",
"boot": "qio",
"flash_mode": "qio",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "esp32s3"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "ESP32-S3 16MB QIO, 8MB OPI PSRAM",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 460800
},
"url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",
"vendor": "espressif"
}
1 change: 1 addition & 0 deletions builder/build_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
idf_component_register(SRCS "sketch.cpp" "arduino-lib-builder-gcc.c" "arduino-lib-builder-cpp.cpp" "arduino-lib-builder-as.S" INCLUDE_DIRS ".")
Empty file.
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions builder/build_lib/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
# Required IDF version
idf: ">=5.1"
espressif/cmake_utilities:
version: "0.*"
espressif/fb_gfx:
version: "master"
path: components/fb_gfx
git: https://github.com/espressif/esp32-arduino-lib-builder.git
require: public
rules:
- if: "target in [esp32, esp32s2, esp32s3, esp32p4]"
10 changes: 10 additions & 0 deletions builder/build_lib/sketch.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "Arduino.h"

void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println("Hello World!");
delay(1000);
}
6 changes: 3 additions & 3 deletions builder/frameworks/_embed_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ def transform_to_asm(target, source, env):
" ".join(
[
"riscv32-esp-elf-objcopy"
if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2")
if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4")
else "xtensa-%s-elf-objcopy" % mcu,
"--input-target",
"binary",
"--output-target",
"elf32-littleriscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2") else "elf32-xtensa-le",
"elf32-littleriscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4") else "elf32-xtensa-le",
"--binary-architecture",
"riscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2") else "xtensa",
"riscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4") else "xtensa",
"--rename-section",
".data=.rodata.embedded",
"$SOURCE",
Expand Down
Loading