Skip to content

Commit b0e120f

Browse files
authored
Arduino core 3.1.2
1 parent 6a5e1fc commit b0e120f

File tree

16 files changed

+559
-47
lines changed

16 files changed

+559
-47
lines changed

.github/workflows/examples.yml

+7-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Examples
1+
name: CI Examples
22

33
on:
44
workflow_dispatch: # Manually start a workflow
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-22.04, windows-2022, macos-14]
15+
os: [ubuntu-24.04, windows-2022, macos-15]
1616
example:
1717
- "examples/arduino-blink"
1818
- "examples/arduino-rmt-blink"
@@ -23,6 +23,7 @@ jobs:
2323
- "examples/tasmota"
2424
- "examples/espidf-arduino-h2zero-BLE_scan"
2525
#- "examples/espidf-arduino-matter-light"
26+
- "examples/arduino-matter-light"
2627
- "examples/espidf-arduino-blink"
2728
- "examples/espidf-arduino-littlefs"
2829
- "examples/espidf-blink"
@@ -44,37 +45,16 @@ jobs:
4445
- name: Set up Python
4546
uses: actions/setup-python@v5
4647
with:
47-
python-version: "3.11"
48-
- name: Install Windows dependencies
48+
python-version: "3.13"
49+
- name: Install dependencies
4950
run: |
5051
python -m pip install --upgrade pip
5152
pip install wheel
52-
pip install -U https://github.com/platformio/platformio/archive/develop.zip
53+
pip install -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.17b2.zip
5354
pio pkg install --global --platform file://.
54-
if: "matrix.os == 'windows-2022'"
55-
env:
56-
PLATFORMIO_CORE_DIR: C:\plat
57-
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
58-
PLATFORMIO_PLATFORMS_DIR: C:\plat\plat
59-
- name: Build Windows examples
60-
run: pio run -d ${{ matrix.example }}
61-
if: "matrix.example != 'examples/tasmota' && matrix.os == 'windows-2022'"
62-
env:
63-
PLATFORMIO_CORE_DIR: C:\plat
64-
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
65-
PLATFORMIO_PLATFORMS_DIR: C:\plat\plat
66-
- name: Install Ubuntu Mac dependencies
67-
run: |
68-
python -m pip install --upgrade pip
69-
pip install wheel
70-
pip install -U https://github.com/platformio/platformio/archive/develop.zip
71-
pio pkg install --global --platform file://.
72-
if: "matrix.os != 'windows-2022'"
7355
- name: git clone Tasmota and add to examples
7456
run: |
7557
git clone -b development --depth 1 https://github.com/arendst/Tasmota.git examples/tasmota
7658
cp examples/tasmota_platformio_override.ini examples/tasmota/platformio_override.ini
77-
if: "matrix.example == 'examples/tasmota' && matrix.os != 'windows-2022'"
78-
- name: Build Ubuntu Mac examples
59+
- name: Build examples
7960
run: pio run -d ${{ matrix.example }}
80-
if: "matrix.os != 'windows-2022'"

README.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
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.
88

9-
* Issues with boards (wrong / missing). All issues caused from boards will **not** be fixed from the maintainer(s). A PR needs to be provided against branch `develop` to solve.
9+
* Issues with boards (wrong / missing). All issues caused from boards will not be fixed from the maintainer(s). A PR needs to be provided against branch `develop` to solve.
1010

1111
## IDE Preparation
1212

@@ -19,8 +19,8 @@ ESP32 is a series of low-cost, low-power system on a chip microcontrollers with
1919
1. Setup new VSCode pioarduino project.
2020
1. Configure a platform option in platformio.ini file:
2121

22-
### Stable version
23-
currently espressif Arduino 3.1.1 and IDF 5.3.2.241224
22+
### Stable Arduino
23+
currently espressif Arduino 3.1.2 and IDF 5.3.2.250210
2424

2525
```ini
2626
[env:stable]
@@ -29,7 +29,7 @@ board = ...
2929
...
3030
```
3131

32-
### Development version
32+
### Development Arduino
3333
espressif Arduino repo branch master and latest compiled Arduino libs
3434

3535
```ini
@@ -39,4 +39,21 @@ board = ...
3939
...
4040
```
4141

42+
### ESP32-solo1 and ESP32-C2 Arduino support (with pioarduino only feature: *Hybrid compile*)
43+
Example configuration:
44+
45+
```ini
46+
[env:esp32solo1]
47+
platform = https://github.com/pioarduino/platform-espressif32.git#develop
48+
framework = arduino
49+
board = esp32-solo1
50+
monitor_speed = 115200
51+
52+
[env:esp32-c2-devkitm-1]
53+
platform = https://github.com/pioarduino/platform-espressif32.git#develop
54+
framework = arduino
55+
board = esp32-c2-devkitm-1
56+
monitor_speed = 115200
57+
```
58+
4259
Looking for sponsor button? There is none. If you want to donate, please spend a litte to a charity organization.

boards/lolin_s3_mini.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"build": {
33
"arduino": {
4-
"ldscript": "esp32s3_out.ld",
54
"memory_type": "qio_qspi"
65
},
76
"core": "esp32",
87
"extra_flags": [
98
"-DBOARD_HAS_PSRAM",
109
"-DARDUINO_LOLIN_S3_MINI",
11-
"-DARDUINO_USB_MODE=1"
10+
"-DARDUINO_USB_CDC_ON_BOOT=1"
1211
],
1312
"f_cpu": "240000000L",
1413
"f_flash": "80000000L",
1514
"flash_mode": "qio",
15+
"psram_type" : "qio",
1616
"hwids": [
1717
[
1818
"0x303A",

boards/lolin_s3_mini_pro.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"memory_type": "qio_qspi"
5+
},
6+
"core": "esp32",
7+
"extra_flags": [
8+
"-DBOARD_HAS_PSRAM",
9+
"-DARDUINO_LOLIN_S3_MINI_PRO",
10+
"-DARDUINO_USB_CDC_ON_BOOT=1"
11+
],
12+
"f_cpu": "240000000L",
13+
"f_flash": "80000000L",
14+
"flash_mode": "qio",
15+
"psram_type" : "qio",
16+
"hwids": [
17+
[
18+
"0x303A",
19+
"0x8167"
20+
]
21+
],
22+
"mcu": "esp32s3",
23+
"variant": "lolin_s3_mini_pro"
24+
},
25+
"connectivity": [
26+
"bluetooth",
27+
"wifi"
28+
],
29+
"debug": {
30+
"openocd_target": "esp32s3.cfg"
31+
},
32+
"frameworks": [
33+
"arduino",
34+
"espidf"
35+
],
36+
"name": "WEMOS LOLIN S3 Mini Pro",
37+
"upload": {
38+
"flash_size": "4MB",
39+
"maximum_ram_size": 327680,
40+
"maximum_size": 4194304,
41+
"require_upload_port": true,
42+
"speed": 460800
43+
},
44+
"url": "https://www.wemos.cc/en/latest/s3/index.html",
45+
"vendor": "WEMOS"
46+
}
47+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"memory_type": "qio_qspi",
5+
"partitions": "default.csv"
6+
},
7+
"core": "esp32",
8+
"extra_flags": [
9+
"-DARDUINO_WAVESHARE_ESP32S3_TOUCH_LCD_128",
10+
"-DARDUINO_USB_MODE=1",
11+
"-DARDUINO_RUNNING_CORE=1",
12+
"-DARDUINO_EVENT_RUNNING_CORE=1",
13+
"-DBOARD_HAS_PSRAM"
14+
],
15+
"f_cpu": "240000000L",
16+
"f_flash": "80000000L",
17+
"flash_mode": "qio",
18+
"hwids": [
19+
[
20+
"0x1a86",
21+
"0x55d3"
22+
]
23+
],
24+
"mcu": "esp32s3",
25+
"variant": "waveshare_esp32s3_touch_lcd_128"
26+
},
27+
"connectivity": [
28+
"bluetooth",
29+
"wifi"
30+
],
31+
"debug": {
32+
"default_tool": "esp-builtin",
33+
"onboard_tools": [
34+
"esp-builtin"
35+
],
36+
"openocd_target": "esp32s3.cfg"
37+
},
38+
"frameworks": [
39+
"arduino",
40+
"espidf"
41+
],
42+
"name": "Waveshare ESP32-S3-Touch-LCD-1.28 (16 MB QD, 2MB PSRAM)",
43+
"upload": {
44+
"flash_size": "16MB",
45+
"maximum_ram_size": 327680,
46+
"maximum_size": 16777216,
47+
"require_upload_port": true,
48+
"speed": 921600
49+
},
50+
"url": "https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28",
51+
"vendor": "Waveshare"
52+
}

builder/frameworks/arduino.py

+63-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
import json
2727
import semantic_version
2828
import os
29+
import sys
2930
import shutil
3031
from os.path import join
3132

3233
from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment, SConscript
34+
from platformio import fs
3335
from platformio.package.version import pepver_to_semver
3436
from platformio.project.config import ProjectConfig
3537
from platformio.package.manager.tool import ToolPackageManager
@@ -43,6 +45,7 @@
4345
board_sdkconfig = board.get("espidf.custom_sdkconfig", "")
4446
entry_custom_sdkconfig = "\n"
4547
flag_custom_sdkconfig = False
48+
IS_WINDOWS = sys.platform.startswith("win")
4649

4750
if config.has_option("env:"+env["PIOENV"], "custom_sdkconfig"):
4851
entry_custom_sdkconfig = env.GetProjectOption("custom_sdkconfig")
@@ -55,6 +58,8 @@
5558
framework_reinstall = False
5659
flag_any_custom_sdkconfig = False
5760

61+
FRAMEWORK_LIB_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")
62+
5863
SConscript("_embed_files.py", exports="env")
5964

6065
flag_any_custom_sdkconfig = os.path.exists(join(platform.get_package_dir("framework-arduinoespressif32-libs"),"sdkconfig"))
@@ -171,11 +176,65 @@ def check_reinstall_frwrk():
171176
framework_reinstall = True
172177
return framework_reinstall
173178

179+
180+
FRAMEWORK_SDK_DIR = fs.to_unix_path(
181+
os.path.join(
182+
FRAMEWORK_LIB_DIR,
183+
mcu,
184+
"include",
185+
)
186+
)
187+
188+
IS_INTEGRATION_DUMP = env.IsIntegrationDump()
189+
190+
191+
def is_framework_subfolder(potential_subfolder):
192+
if not os.path.isabs(potential_subfolder):
193+
return False
194+
if (
195+
os.path.splitdrive(FRAMEWORK_SDK_DIR)[0]
196+
!= os.path.splitdrive(potential_subfolder)[0]
197+
):
198+
return False
199+
return os.path.commonpath([FRAMEWORK_SDK_DIR]) == os.path.commonpath(
200+
[FRAMEWORK_SDK_DIR, potential_subfolder]
201+
)
202+
203+
204+
def shorthen_includes(env, node):
205+
if IS_INTEGRATION_DUMP:
206+
# Don't shorten include paths for IDE integrations
207+
return node
208+
209+
includes = [fs.to_unix_path(inc) for inc in env.get("CPPPATH", [])]
210+
shortened_includes = []
211+
generic_includes = []
212+
for inc in includes:
213+
if is_framework_subfolder(inc):
214+
shortened_includes.append(
215+
"-iwithprefix/"
216+
+ fs.to_unix_path(os.path.relpath(inc, FRAMEWORK_SDK_DIR))
217+
)
218+
else:
219+
generic_includes.append(inc)
220+
221+
return env.Object(
222+
node,
223+
CPPPATH=generic_includes,
224+
CCFLAGS=env["CCFLAGS"]
225+
+ ["-iprefix", FRAMEWORK_SDK_DIR]
226+
+ shortened_includes,
227+
ASFLAGS=env["ASFLAGS"]
228+
+ ["-iprefix", FRAMEWORK_SDK_DIR]
229+
+ shortened_includes,
230+
)
231+
174232
def call_compile_libs():
175233
if mcu == "esp32c2":
176234
ARDUINO_FRMWRK_C2_LIB_DIR = join(platform.get_package_dir("framework-arduinoespressif32-libs"),mcu)
177-
ARDUINO_C2_DIR = join(platform.get_package_dir("framework-arduino-c2-skeleton-lib"),mcu)
178-
shutil.copytree(ARDUINO_C2_DIR, ARDUINO_FRMWRK_C2_LIB_DIR, dirs_exist_ok=True)
235+
if not os.path.exists(ARDUINO_FRMWRK_C2_LIB_DIR):
236+
ARDUINO_C2_DIR = join(platform.get_package_dir("framework-arduino-c2-skeleton-lib"),mcu)
237+
shutil.copytree(ARDUINO_C2_DIR, ARDUINO_FRMWRK_C2_LIB_DIR, dirs_exist_ok=True)
179238
print("*** Compile Arduino IDF libs for %s ***" % env["PIOENV"])
180239
SConscript("espidf.py")
181240

@@ -192,6 +251,8 @@ def call_compile_libs():
192251
call_compile_libs()
193252

194253
if "arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK") and env.subst("$ARDUINO_LIB_COMPILE_FLAG") in ("Inactive", "True"):
254+
if IS_WINDOWS:
255+
env.AddBuildMiddleware(shorthen_includes)
195256
if os.path.exists(join(platform.get_package_dir(
196257
"framework-arduinoespressif32"), "tools", "platformio-build.py")):
197258
PIO_BUILD = "platformio-build.py"

0 commit comments

Comments
 (0)