Skip to content

Commit 9f33068

Browse files
authored
Platformio Arduino espressif32 v3.0.2 based on IDF 5.1.4 (#3)
1 parent 68ad40f commit 9f33068

File tree

139 files changed

+1549
-3074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1549
-3074
lines changed

.github/stale.yml

-21
This file was deleted.

.github/workflows/examples.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
name: Examples
22

3-
on: [push, pull_request]
3+
on:
4+
workflow_dispatch: # Manually start a workflow
5+
push:
6+
paths-ignore:
7+
- '.github/**' # Ignore changes towards the .github directory
8+
- '**.md' # Do no build if *.md files changes
49

510
jobs:
611
build:
712
strategy:
813
fail-fast: false
914
matrix:
10-
os: [ubuntu-latest, windows-latest, macos-latest]
15+
os: [ubuntu-22.04, windows-2022, macos-14]
1116
example:
12-
- "examples/arduino-ble5-advertising"
1317
- "examples/arduino-blink"
18+
- "examples/arduino-rmt-blink"
1419
- "examples/arduino-usb-keyboard"
1520
- "examples/arduino-wifiscan"
1621
- "examples/espidf-arduino-blink"
17-
- "examples/espidf-arduino-wifiscan"
18-
- "examples/espidf-ble-eddystone"
22+
- "examples/espidf-arduino-littlefs"
23+
- "examples/espidf-blink"
1924
- "examples/espidf-coap-server"
2025
- "examples/espidf-exceptions"
2126
- "examples/espidf-hello-world"
2227
- "examples/espidf-http-request"
2328
- "examples/espidf-peripherals-uart"
2429
- "examples/espidf-peripherals-usb"
2530
- "examples/espidf-storage-sdcard"
26-
- "examples/espidf-storage-spiffs"
27-
- "examples/espidf-ulp-adc"
28-
- "examples/espidf-ulp-pulse"
31+
- "examples/espidf-ulp"
32+
- "examples/espidf-ulp-riscv"
2933
runs-on: ${{ matrix.os }}
3034
steps:
31-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3236
with:
3337
submodules: "recursive"
3438
- name: Set up Python
35-
uses: actions/setup-python@v3
39+
uses: actions/setup-python@v5
3640
with:
37-
python-version: "3.9"
41+
python-version: "3.11"
3842
- name: Install dependencies
3943
run: |
44+
python -m pip install --upgrade pip
45+
pip install wheel
4046
pip install -U https://github.com/platformio/platformio/archive/develop.zip
4147
pio pkg install --global --platform symlink://.
4248
- name: Build examples

.github/workflows/tests.yml

-30
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.pyc
2+
.DS_Store

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Espressif 32: development platform for [PlatformIO](https://platformio.org)
1+
# Fork of Platformio Espressif 32: development platform for [PlatformIO](https://platformio.org)
22

3-
[![Build Status](https://github.com/platformio/platform-espressif32/workflows/Examples/badge.svg)](https://github.com/platformio/platform-espressif32/actions)
3+
[![Build Status](https://github.com/pioarduino/platform-espressif32/workflows/Examples/badge.svg)](https://github.com/pioarduino/platform-espressif32/actions)
44

55
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.
66

@@ -13,14 +13,13 @@ ESP32 is a series of low-cost, low-power system on a chip microcontrollers with
1313
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:
1414

1515
## Stable version
16+
espressif Arduino 3.0.2 and IDF 5.1.4
1617

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

1920
```ini
2021
[env:stable]
21-
; recommended to pin to a version, see https://github.com/platformio/platform-espressif32/releases
22-
; platform = espressif32 @ ^6.0.1
23-
platform = espressif32
22+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/2024.07.00/platform-espressif32.zip
2423
board = ...
2524
...
2625
```
@@ -29,11 +28,11 @@ board = ...
2928

3029
```ini
3130
[env:development]
32-
platform = https://github.com/platformio/platform-espressif32.git
31+
platform = https://github.com/pioarduino/platform-espressif32.git#Arduino/IDF51
3332
board = ...
3433
...
3534
```
3635

3736
# Configuration
3837

39-
Please navigate to [documentation](https://docs.platformio.org/page/platforms/espressif32.html).
38+
Please navigate to [documentation](https://docs.platformio.org/page/platforms/espressif32.html).

boards/4d_systems_esp32s3_gen4_r8n16.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"build": {
33
"arduino": {
4-
"ldscript": "esp32s3_out.ld",
54
"memory_type": "qio_opi",
6-
"partitions": "default_16MB.csv"
5+
"partitions": "esp_sr_16.csv"
76
},
87
"core": "esp32",
98
"extra_flags": [

boards/esp32-c2-devkitm-1.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"f_cpu": "120000000L",
5+
"f_flash": "60000000L",
6+
"flash_mode": "qio",
7+
"mcu": "esp32c2",
8+
"variant": "esp32c2"
9+
},
10+
"connectivity": [
11+
"wifi"
12+
],
13+
"debug": {
14+
"openocd_target": "esp32c2.cfg"
15+
},
16+
"frameworks": [
17+
"arduino",
18+
"espidf"
19+
],
20+
"name": "Espressif ESP32-C2-DevKitM-1",
21+
"upload": {
22+
"flash_size": "4MB",
23+
"maximum_ram_size": 278528,
24+
"maximum_size": 4194304,
25+
"require_upload_port": true,
26+
"speed": 460800
27+
},
28+
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp8684/esp8684-devkitm-1/user_guide.html",
29+
"vendor": "Espressif"
30+
}

boards/esp32-c6-devkitc-1.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
"f_cpu": "160000000L",
55
"f_flash": "80000000L",
66
"flash_mode": "qio",
7-
"mcu": "esp32c6"
7+
"mcu": "esp32c6",
8+
"variant": "esp32c6"
89
},
910
"connectivity": [
1011
"wifi"
1112
],
13+
"debug": {
14+
"openocd_target": "esp32c6.cfg"
15+
},
1216
"frameworks": [
17+
"arduino",
1318
"espidf"
1419
],
1520
"name": "Espressif ESP32-C6-DevKitC-1",

boards/esp32-c6-devkitm-1.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"openocd_target": "esp32c6.cfg"
1515
},
1616
"frameworks": [
17+
"arduino",
1718
"espidf"
1819
],
1920
"name": "Espressif ESP32-C6-DevKitM-1",

boards/esp32-h2-devkitm-1.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"f_cpu": "96000000L",
5+
"f_flash": "64000000L",
6+
"f_image": "48000000L",
7+
"flash_mode": "qio",
8+
"mcu": "esp32h2",
9+
"variant": "esp32h2",
10+
"hwids": [
11+
[
12+
"0x303A",
13+
"0x1001"
14+
]
15+
]
16+
},
17+
"connectivity": [
18+
"bluetooth",
19+
"zigbee"
20+
],
21+
"debug": {
22+
"openocd_target": "esp32h2.cfg"
23+
},
24+
"frameworks": [
25+
"arduino",
26+
"espidf"
27+
],
28+
"name": "Espressif ESP32-H2-DevKit",
29+
"upload": {
30+
"flash_size": "4MB",
31+
"maximum_ram_size": 327680,
32+
"maximum_size": 4194304,
33+
"require_upload_port": true,
34+
"speed": 460800
35+
},
36+
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32h2/esp32-h2-devkitm-1/index.html",
37+
"vendor": "Espressif"
38+
}

boards/esp32-solo1.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "esp32_out.ld"
5+
},
6+
"core": "esp32",
7+
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DCORE32SOLO1",
8+
"f_cpu": "80000000L",
9+
"f_flash": "40000000L",
10+
"flash_mode": "dio",
11+
"mcu": "esp32",
12+
"variant": "esp32"
13+
},
14+
"connectivity": [
15+
"wifi",
16+
"bluetooth",
17+
"ethernet",
18+
"can"
19+
],
20+
"debug": {
21+
"openocd_target": "esp32-solo-1.cfg"
22+
},
23+
"frameworks": [
24+
"arduino",
25+
"espidf"
26+
],
27+
"name": "Espressif Generic ESP32-solo1 4M Flash",
28+
"upload": {
29+
"flash_size": "4MB",
30+
"maximum_ram_size": 327680,
31+
"maximum_size": 4194304,
32+
"require_upload_port": true,
33+
"speed": 460800
34+
},
35+
"url": "https://en.wikipedia.org/wiki/ESP32",
36+
"vendor": "Espressif"
37+
}

builder/frameworks/_embed_files.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ def transform_to_asm(target, source, env):
110110
" ".join(
111111
[
112112
"riscv32-esp-elf-objcopy"
113-
if mcu in ("esp32c3", "esp32c6")
113+
if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2")
114114
else "xtensa-%s-elf-objcopy" % mcu,
115115
"--input-target",
116116
"binary",
117117
"--output-target",
118-
"elf32-littleriscv" if mcu in ("esp32c3","esp32c6") else "elf32-xtensa-le",
118+
"elf32-littleriscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2") else "elf32-xtensa-le",
119119
"--binary-architecture",
120-
"riscv" if mcu in ("esp32c3","esp32c6") else "xtensa",
120+
"riscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2") else "xtensa",
121121
"--rename-section",
122122
".data=.rodata.embedded",
123123
"$SOURCE",

builder/frameworks/arduino.py

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@
3636
SConscript(
3737
join(DefaultEnvironment().PioPlatform().get_package_dir(
3838
"framework-arduinoespressif32"), "tools", "platformio-build.py"))
39-
env["INTEGRATION_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})

builder/frameworks/espidf.py

+7-14
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,7 @@
6767
IDF_ENV_VERSION = "1.0.0"
6868
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
6969
TOOLCHAIN_DIR = platform.get_package_dir(
70-
"toolchain-riscv32-esp"
71-
if mcu in ("esp32c3", "esp32c6")
72-
else (
73-
(
74-
"toolchain-xtensa-esp-elf"
75-
if "arduino" not in env.subst("$PIOFRAMEWORK")
76-
else "toolchain-xtensa-%s" % mcu
77-
)
78-
)
70+
"toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2") else ("xtensa-%s" % mcu))
7971
)
8072

8173

@@ -91,7 +83,7 @@
9183
):
9284
print("Warning! Debugging an IDF project requires PlatformIO Core >= 6.1.11!")
9385

94-
# Arduino framework as a component is not compatible with ESP-IDF >=4.1
86+
# Arduino framework as a component is not compatible with ESP-IDF >5.2
9587
if "arduino" in env.subst("$PIOFRAMEWORK"):
9688
ARDUINO_FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
9789
# Possible package names in 'package@version' format is not compatible with CMake
@@ -256,7 +248,7 @@ def populate_idf_env_vars(idf_env):
256248
os.path.dirname(get_python_exe()),
257249
]
258250

259-
if mcu not in ("esp32c3", "esp32c6"):
251+
if mcu not in ("esp32c2", "esp32c3", "esp32c6","esp32h2"):
260252
additional_packages.append(
261253
os.path.join(platform.get_package_dir("toolchain-esp32ulp"), "bin"),
262254
)
@@ -511,7 +503,7 @@ def extract_linker_script_fragments_backup(framework_components_dir, sdk_config)
511503
sys.stderr.write("Error: Failed to extract paths to linker script fragments\n")
512504
env.Exit(1)
513505

514-
if mcu in ("esp32c3", "esp32c6"):
506+
if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2"):
515507
result.append(os.path.join(framework_components_dir, "riscv", "linker.lf"))
516508

517509
# Add extra linker fragments
@@ -1201,6 +1193,7 @@ def _get_installed_pip_packages(python_exe_path):
12011193
return
12021194

12031195
deps = {
1196+
"wheel": ">=0.35.1",
12041197
# https://github.com/platformio/platformio-core/issues/4614
12051198
"urllib3": "<2",
12061199
# https://github.com/platformio/platform-espressif32/issues/635
@@ -1606,7 +1599,7 @@ def _skip_prj_source_files(node):
16061599
(
16071600
board.get(
16081601
"upload.bootloader_offset",
1609-
"0x0" if mcu in ("esp32c3", "esp32c6", "esp32s3") else "0x1000",
1602+
"0x0" if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32s3", "esp32h2") else "0x1000",
16101603
),
16111604
os.path.join("$BUILD_DIR", "bootloader.bin"),
16121605
),
@@ -1717,7 +1710,7 @@ def _skip_prj_source_files(node):
17171710
#
17181711

17191712
ulp_dir = os.path.join(PROJECT_DIR, "ulp")
1720-
if os.path.isdir(ulp_dir) and os.listdir(ulp_dir) and mcu not in ("esp32c3", "esp32c6"):
1713+
if os.path.isdir(ulp_dir) and os.listdir(ulp_dir) and mcu not in ("esp32c2", "esp32c3", "esp32c6", "esp32h2"):
17211714
env.SConscript("ulp.py", exports="env sdk_config project_config idf_variant")
17221715

17231716
#

0 commit comments

Comments
 (0)