Skip to content

Commit a134fd2

Browse files
Don't build breakout on MacOS
1 parent 1bf1dd6 commit a134fd2

2 files changed

Lines changed: 8 additions & 25 deletions

File tree

c_mpos/breakout/build.sh

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
#!/bin/bash
22

3-
sudo find / -iname "activate"
4-
5-
echo which pip
6-
which pip
7-
echo which python3
8-
which python3
9-
echo PATH:
10-
echo $PATH
11-
12-
ls -al ~/.espressif/python_env/idf5.4_py3.11_env/bin/
13-
ls -al ~/.espressif/python_env/idf5.4_py3.11_env/
14-
ls -al ~/.espressif/python_env/
15-
ls -al ~/.espressif/
16-
ls -al ~
17-
3+
# NOTE: ~/.espressif doesn't exist on MacOS
4+
export PATH=~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin:$PATH
185
. ~/.espressif/python_env/idf5.4_py3.11_env/bin/activate
196

7+
# Even though MacOS installs pyelftools, it still complains about No module named 'elftools'
208
pip install pyelftools ar
219

2210
mydir=$(readlink -f "$0")
@@ -27,12 +15,6 @@ cd "$mydir"
2715
rm -rf build
2816
rm *.mpy
2917

30-
ls -al ~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin
31-
ls -al ~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf
32-
ls -al ~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119
33-
ls -al ~/.espressif/tools/xtensa-esp-elf
34-
ls -al ~/.espressif/tools
35-
ls -al ~/.espressif
36-
PATH=~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin:$PATH make </dev/null
18+
make </dev/null
3719

3820
mv "$mydir"/breakout*.mpy "$mydir"/../../internal_filesystem/apps/com.micropythonos.breakout/assets/

scripts/build_mpos.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ else
178178
echo "invalid target $target"
179179
fi
180180

181-
# do this after the main build, which should have installed ~/.espressif/
182-
echo "Building breakout app..."
183-
"$codebasedir"/c_mpos/breakout/build.sh
181+
if uname | grep -q Linux; then # only compile it on Linux because MacOS complains about No module named 'elftools', even thought it gets pip installed...
182+
echo "Building breakout app..."
183+
"$codebasedir"/c_mpos/breakout/build.sh
184+
fi
184185

0 commit comments

Comments
 (0)