Skip to content

Commit 02bc31b

Browse files
authored
Merge pull request mocleiri#124 from vikramdattu/bugfix/esp_ci_build
CI: Fixed build issues for Espressif Chipsets
2 parents 1a29c1a + fbb92a9 commit 02bc31b

File tree

5 files changed

+48
-38
lines changed

5 files changed

+48
-38
lines changed

.github/workflows/build_esp32.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
cd ../../..
3030
cd tflm_esp_kernels
3131
git submodule update --init components/esp32-camera
32+
git submodule update --init components/esp-nn
3233
- name: Get Cache Keys
3334
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
3435
# this commit is hard-coded in micropython/tools/ci.sh
@@ -132,7 +133,7 @@ jobs:
132133
echo "Building MICROLITE_SPIRAM"
133134
rm -rf build
134135
idf.py clean build
135-
136+
136137
../../../micropython-modules/microlite/assemble-unified-image-esp.sh \
137138
../../../micropython/ports/esp32
138139
@@ -145,12 +146,12 @@ jobs:
145146
146147
- name: Build MICROLITE_SPIRAM_CAM
147148
run: |
148-
149+
149150
source ./esp-idf/export.sh
150-
151+
151152
echo "cd ./boards/esp32/MICROLITE_SPIRAM_CAM"
152153
cd ./boards/esp32/MICROLITE_SPIRAM_CAM
153-
154+
154155
echo "Building MICROLITE_SPIRAM_CAM"
155156
rm -rf builds
156157
idf.py clean build
@@ -163,4 +164,4 @@ jobs:
163164
with:
164165
name: microlite-spiram-cam-esp32-firmware
165166
path: |
166-
boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin
167+
boards/esp32/MICROLITE_SPIRAM_CAM/build/firmware.bin

.github/workflows/build_esp32c3.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
cd ../../..
3030
cd tflm_esp_kernels
3131
git submodule update --init components/esp32-camera
32+
git submodule update --init components/esp-nn
3233
- name: Get Cache Keys
3334
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
3435
# this commit is hard-coded in micropython/tools/ci.sh
@@ -82,12 +83,12 @@ jobs:
8283
8384
- name: Build ESP32-MICROLITE_C3
8485
run: |
85-
86+
8687
source ./esp-idf/export.sh
87-
88+
8889
echo "cd ./boards/esp32/MICROLITE_C3"
8990
cd ./boards/esp32/MICROLITE_C3
90-
91+
9192
echo "Building ESP32-MICROLITE_C3"
9293
rm -rf builds
9394
idf.py clean build
@@ -100,16 +101,16 @@ jobs:
100101
with:
101102
name: microlite-esp32c3-firmware
102103
path: |
103-
boards/esp32/MICROLITE_C3/build/firmware.bin
104+
boards/esp32/MICROLITE_C3/build/firmware.bin
104105
105106
- name: Build ESP32-MICROLITE_C3_USB
106107
run: |
107-
108+
108109
source ./esp-idf/export.sh
109-
110+
110111
echo "cd ./boards/esp32/MICROLITE_C3_USB"
111112
cd ./boards/esp32/MICROLITE_C3_USB
112-
113+
113114
echo "Building ESP32 MICROLITE_C3_USB"
114115
rm -rf builds
115116
idf.py clean build
@@ -122,4 +123,4 @@ jobs:
122123
with:
123124
name: microlite-esp32c3-usb-firmware
124125
path: |
125-
boards/esp32/MICROLITE_C3_USB/build/firmware.bin
126+
boards/esp32/MICROLITE_C3_USB/build/firmware.bin

.github/workflows/build_esp32s2.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
cd ports/esp32
2929
make BOARD= submodules
3030
cd ../../..
31+
cd tflm_esp_kernels
32+
git submodule update --init components/esp32-camera
33+
git submodule update --init components/esp-nn
3134
- name: Get Cache Keys
3235
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
3336
# this commit is hard-coded in micropython/tools/ci.sh
@@ -71,7 +74,7 @@ jobs:
7174
cd ./tensorflow
7275
7376
../micropython-modules/microlite/prepare-tflm-esp.sh
74-
77+
7578
- name: Build micropython cross compiler
7679
run: |
7780
source ./esp-idf/export.sh
@@ -81,12 +84,12 @@ jobs:
8184
8285
- name: Build ESP32 S2 with SPIRAM
8386
run: |
84-
87+
8588
source ./esp-idf/export.sh
86-
89+
8790
echo "cd ./boards/esp32/MICROLITE_S2_SPIRAM"
8891
cd ./boards/esp32/MICROLITE_S2_SPIRAM
89-
92+
9093
echo "Building ESP32 MICROLITE_S2_SPIRAM"
9194
rm -rf builds
9295
idf.py clean build
@@ -99,6 +102,5 @@ jobs:
99102
with:
100103
name: microlite-esp32s2-spiram-firmware
101104
path: |
102-
boards/esp32/MICROLITE_S2_SPIRAM/build/firmware.bin
103-
104-
105+
boards/esp32/MICROLITE_S2_SPIRAM/build/firmware.bin
106+

.github/workflows/build_esp32s3.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
cd ports/esp32
2929
make BOARD= submodules
3030
cd ../../..
31+
cd tflm_esp_kernels
32+
git submodule update --init components/esp32-camera
33+
git submodule update --init components/esp-nn
3134
- name: Get Cache Keys
3235
# later get this like this: git ls-remote --heads https://github.com/espressif/esp-idf
3336
# this commit is hard-coded in micropython/tools/ci.sh
@@ -71,7 +74,7 @@ jobs:
7174
cd ./tensorflow
7275
7376
../micropython-modules/microlite/prepare-tflm-esp.sh
74-
77+
7578
- name: Build micropython cross compiler
7679
run: |
7780
source ./esp-idf/export.sh
@@ -81,12 +84,12 @@ jobs:
8184
8285
- name: Build standard non-ps ram ESP32 S3 8MB FLASH
8386
run: |
84-
87+
8588
source ./esp-idf/export.sh
86-
89+
8790
echo "cd ./boards/esp32/MICROLITE_S3"
8891
cd ./boards/esp32/MICROLITE_S3
89-
92+
9093
echo "Building ESP32-MICROLITE_S3"
9194
rm -rf builds
9295
idf.py clean build
@@ -99,16 +102,16 @@ jobs:
99102
with:
100103
name: microlite-esp32s3-firmware
101104
path: |
102-
boards/esp32/MICROLITE_S3/build/firmware.bin
105+
boards/esp32/MICROLITE_S3/build/firmware.bin
103106
104107
- name: Build ESP32 S3 psram support and 8MB Flash firmware
105108
run: |
106-
109+
107110
source ./esp-idf/export.sh
108-
111+
109112
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM"
110113
cd ./boards/esp32/MICROLITE_S3_SPIRAM
111-
114+
112115
echo "Building ESP32-MICROLITE_S3_SPIRAM"
113116
rm -rf builds
114117
idf.py clean build
@@ -121,16 +124,16 @@ jobs:
121124
with:
122125
name: microlite-esp32s3-spiram-firmware
123126
path: |
124-
boards/esp32/MICROLITE_S3_SPIRAM/build/firmware.bin
127+
boards/esp32/MICROLITE_S3_SPIRAM/build/firmware.bin
125128
126129
- name: Build ESP32 S3 psram support and 8MB Flash firmware - spiram cs gpio 20
127130
run: |
128-
131+
129132
source ./esp-idf/export.sh
130-
133+
131134
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20"
132135
cd ./boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20
133-
136+
134137
echo "Building ESP32-MICROLITE_S3_SPIRAM_CS_GPIO_20"
135138
rm -rf builds
136139
idf.py clean build
@@ -143,16 +146,16 @@ jobs:
143146
with:
144147
name: microlite-esp32-s3-spiram-cs-gpio-20-firmware
145148
path: |
146-
boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20/build/firmware.bin
149+
boards/esp32/MICROLITE_S3_SPIRAM_CS_GPIO_20/build/firmware.bin
147150
148151
- name: Build ESP32 S3 psram support and 8MB Flash firmware - OCTAL SPIRAM
149152
run: |
150-
153+
151154
source ./esp-idf/export.sh
152-
155+
153156
echo "cd ./boards/esp32/MICROLITE_S3_SPIRAM_OCTAL"
154157
cd ./boards/esp32/MICROLITE_S3_SPIRAM_OCTAL
155-
158+
156159
echo "Building ESP32-MICROLITE_S3_SPIRAM_OCTAL"
157160
rm -rf builds
158161
idf.py clean build
@@ -165,4 +168,4 @@ jobs:
165168
with:
166169
name: microlite-esp32-s3-spiram-octal-firmware
167170
path: |
168-
boards/esp32/MICROLITE_S3_SPIRAM_OCTAL/build/firmware.bin
171+
boards/esp32/MICROLITE_S3_SPIRAM_OCTAL/build/firmware.bin

micropython-modules/microlite/micropython.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ target_compile_options(microlite INTERFACE
398398
-Wno-error=maybe-uninitialized
399399
)
400400

401-
else()
401+
else() # not "RP2"
402402
if (CONFIG_IDF_TARGET)
403403
target_include_directories(microlite INTERFACE
404404
${TF_ESP_DIR}
@@ -452,6 +452,9 @@ target_compile_options(microlite INTERFACE
452452
-Wno-error=maybe-uninitialized
453453
)
454454

455+
if (CONFIG_IDF_TARGET_ESP32S3) # Extra compile options needed to build esp-nn ASM for ESP32-S3
456+
target_compile_options(microlite INTERFACE -mlongcalls -fno-unroll-loops -Wno-unused-function)
457+
endif()
455458
endif()
456459

457460
target_link_libraries(usermod INTERFACE microlite)

0 commit comments

Comments
 (0)