Skip to content

Commit 894cacc

Browse files
authored
add Hybrid Compile (#73)
1 parent 5621a0e commit 894cacc

18 files changed

+791
-41
lines changed

.github/workflows/examples.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- "examples/arduino-wifiscan"
2121
- "examples/arduino-zigbee-light"
2222
- "examples/arduino-zigbee-switch"
23+
- "examples/tasmota"
2324
- "examples/espidf-arduino-h2zero-BLE_scan"
2425
- "examples/espidf-arduino-matter-light"
2526
- "examples/espidf-arduino-blink"
@@ -49,15 +50,15 @@ jobs:
4950
python -m pip install --upgrade pip
5051
pip install wheel
5152
pip install -U https://github.com/platformio/platformio/archive/develop.zip
52-
pio pkg install --global --platform symlink://.
53+
pio pkg install --global --platform file://.
5354
if: "matrix.os == 'windows-2022'"
5455
env:
5556
PLATFORMIO_CORE_DIR: C:\plat
5657
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
5758
PLATFORMIO_PLATFORMS_DIR: C:\plat\plat
5859
- name: Build Windows examples
5960
run: pio run -d ${{ matrix.example }}
60-
if: "matrix.os == 'windows-2022'"
61+
if: "matrix.example != 'examples/tasmota' && matrix.os == 'windows-2022'"
6162
env:
6263
PLATFORMIO_CORE_DIR: C:\plat
6364
PLATFORMIO_PACKAGES_DIR: C:\plat\pack
@@ -67,8 +68,13 @@ jobs:
6768
python -m pip install --upgrade pip
6869
pip install wheel
6970
pip install -U https://github.com/platformio/platformio/archive/develop.zip
70-
pio pkg install --global --platform symlink://.
71+
pio pkg install --global --platform file://.
7172
if: "matrix.os != 'windows-2022'"
73+
- name: git clone Tasmota and add to examples
74+
run: |
75+
git clone -b development --depth 1 https://github.com/arendst/Tasmota.git examples/tasmota
76+
cp examples/tasmota_platformio_override.ini examples/tasmota/platformio_override.ini
77+
if: "matrix.example == 'examples/tasmota' && matrix.os != 'windows-2022'"
7278
- name: Build Ubuntu Mac examples
7379
run: pio run -d ${{ matrix.example }}
7480
if: "matrix.os != 'windows-2022'"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ based on devel branch Arduino 3.1.0 and IDF 5.3.1+
5050

5151
```ini
5252
[env:development]
53-
platform = https://github.com/pioarduino/platform-espressif32.git#Arduino/IDF53
53+
platform = https://github.com/pioarduino/platform-espressif32.git#Arduino/IDF53_work_hybrid
5454
board = ...
5555
...
5656
```

boards/esp32-solo1.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"build": {
3-
"arduino":{
4-
"ldscript": "esp32_out.ld"
5-
},
63
"core": "esp32",
74
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DCORE32SOLO1",
8-
"f_cpu": "80000000L",
5+
"f_cpu": "160000000L",
96
"f_flash": "40000000L",
107
"flash_mode": "dio",
118
"mcu": "esp32",
@@ -32,6 +29,11 @@
3229
"require_upload_port": true,
3330
"speed": 460800
3431
},
32+
"espidf": {
33+
"custom_sdkconfig": [
34+
"CONFIG_FREERTOS_UNICORE=y"
35+
]
36+
},
3537
"url": "https://en.wikipedia.org/wiki/ESP32",
3638
"vendor": "Espressif"
3739
}

boards/esp32s3_120_16_8-qio_opi.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"memory_type": "qio_opi",
5+
"partitions": "default_16MB.csv"
6+
},
7+
"core": "esp32",
8+
"f_cpu": "240000000L",
9+
"f_flash": "80000000L",
10+
"f_boot": "120000000L",
11+
"boot": "qio",
12+
"flash_mode": "qio",
13+
"extra_flags": [
14+
"-DBOARD_HAS_PSRAM",
15+
"-DARDUINO_USB_MODE=1",
16+
"-DARDUINO_USB_CDC_ON_BOOT=1",
17+
"-DARDUINO_RUNNING_CORE=1",
18+
"-DARDUINO_EVENT_RUNNING_CORE=1"
19+
],
20+
"hwids": [
21+
[
22+
"0x303A",
23+
"0x1001"
24+
]
25+
],
26+
"mcu": "esp32s3",
27+
"variant": "esp32s3"
28+
},
29+
"connectivity": [
30+
"bluetooth",
31+
"wifi"
32+
],
33+
"debug": {
34+
"openocd_target": "esp32s3.cfg"
35+
},
36+
"frameworks": [
37+
"arduino",
38+
"espidf"
39+
],
40+
"name": "ESP32-S3 16MB QIO, 8MB OPI PSRAM",
41+
"upload": {
42+
"flash_size": "16MB",
43+
"maximum_ram_size": 327680,
44+
"maximum_size": 16777216,
45+
"require_upload_port": true,
46+
"speed": 460800
47+
},
48+
"url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",
49+
"vendor": "espressif"
50+
}

builder/build_lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
idf_component_register(SRCS "sketch.cpp" "arduino-lib-builder-gcc.c" "arduino-lib-builder-cpp.cpp" "arduino-lib-builder-as.S" INCLUDE_DIRS ".")

builder/build_lib/arduino-lib-builder-as.S

Whitespace-only changes.

builder/build_lib/arduino-lib-builder-cpp.cpp

Whitespace-only changes.

builder/build_lib/arduino-lib-builder-gcc.c

Whitespace-only changes.

builder/build_lib/idf_component.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
dependencies:
2+
# Required IDF version
3+
idf: ">=5.1"
4+
espressif/cmake_utilities:
5+
version: "0.*"
6+
espressif/fb_gfx:
7+
version: "master"
8+
path: components/fb_gfx
9+
git: https://github.com/espressif/esp32-arduino-lib-builder.git
10+
require: public
11+
rules:
12+
- if: "target in [esp32, esp32s2, esp32s3, esp32p4]"

builder/build_lib/sketch.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "Arduino.h"
2+
3+
void setup() {
4+
Serial.begin(115200);
5+
}
6+
7+
void loop() {
8+
Serial.println("Hello World!");
9+
delay(1000);
10+
}

0 commit comments

Comments
 (0)