Skip to content

Commit a6cbfa8

Browse files
committed
initial not working slave firmware build
1 parent 3cba39d commit a6cbfa8

File tree

3 files changed

+96
-2
lines changed

3 files changed

+96
-2
lines changed

.github/workflows/push.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,53 @@ jobs:
2222
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
2323
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
2424
run: bash ./build.sh
25+
- name: Upload artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: framework
29+
30+
build-slave_firmware:
31+
name: Build Slave Firmware
32+
runs-on: macos-14
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.11'
39+
- name: Install dependencies
40+
run: bash ./tools/prepare-ci.sh
41+
- name: Get current branch
42+
run: |
43+
echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
44+
- name: Build slave firmware
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
47+
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
48+
run: |
49+
cd tools
50+
bash ./compile_slave.sh
51+
cd ..
52+
- name: Upload artifacts
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: framework
56+
57+
release_framework:
58+
name: Release Framework
59+
needs: [build-libs, build-slave_firmware]
60+
runs-on: macos-14
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Set up Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.11'
67+
- name: Download artifacts
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: framework
71+
2572
- name: Release
2673
uses: jason2866/action-gh-release@v1.3
2774
with:

tools/compile_slave.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
# This script is used to build the slave image for wifi_hosted
4+
5+
export IDF_CCACHE_ENABLE=$CCACHE_ENABLE
6+
7+
mkdir -p dist
8+
rm -rf dependencies.lock
9+
10+
echo "* Installing/Updating ESP-IDF and all components..."
11+
# update components from git
12+
./tools/update-components.sh
13+
if [ $? -ne 0 ]; then exit 1; fi
14+
15+
# install arduino component
16+
./tools/install-arduino.sh
17+
if [ $? -ne 0 ]; then exit 1; fi
18+
19+
# install esp-idf
20+
source ./tools/install-esp-idf.sh
21+
if [ $? -ne 0 ]; then exit 1; fi
22+
23+
24+
slave_targets=(
25+
"esp32"
26+
"esp32s3"
27+
"esp32c2"
28+
"esp32c3"
29+
# "esp32c5"
30+
"esp32c6"
31+
)
32+
33+
idf.py create-project-from-example "espressif/esp_hosted:slave"
34+
mkdir wifi_copro_fw
35+
cd ./slave
36+
echo "Found firmware version: $(<./main/coprocessor_fw_version.txt)"
37+
38+
for target in "${slave_targets[@]}"; do
39+
echo "Building for target: $target"
40+
idf.py set-target "$target"
41+
idf.py clean
42+
idf.py build
43+
cp ./build/network_adapter.bin ../wifi_copro_fw/network_adapter_"$target".bin
44+
echo "Build completed for target: $target"
45+
done
46+
47+
cp ./main/coprocessor_fw_version.txt ../wifi_copro_fw/coprocessor_fw_version.txt

tools/prepare-ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ brew install gawk
1212
brew install gperf
1313
#brew install ninja
1414
brew install ccache
15-
python -m pip install --upgrade pip
16-
pip install wheel future pyelftools
15+
python -m pip install uv
16+
uv pip install future pyelftools

0 commit comments

Comments
 (0)