File tree Expand file tree Collapse file tree 3 files changed +29
-10
lines changed Expand file tree Collapse file tree 3 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 11FROM ubuntu:bionic
22
3- RUN apt-get update && apt-get -y install wget git build-essential python python-serial && \
3+ RUN apt-get update && apt-get -y install wget git build-essential python \
4+ python-serial libncurses5 libncurses5-dev flex bison gperf && \
45 mkdir /opt/frozen/ && cd /opt && \
56 wget -q https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz && \
67 tar -xzvf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz && \
78 git clone --recursive https://github.com/pycom/pycom-esp-idf.git && \
89 cd pycom-esp-idf && git submodule update --init && cd .. && \
9- git clone --recursive https://github.com/pycom/pycom-micropython-sigfox.git
10+ git clone --recursive https://github.com/pycom/pycom-micropython-sigfox.git
1011
1112ADD assets/build /usr/bin/build
Original file line number Diff line number Diff line change @@ -11,16 +11,20 @@ where board in `WIPY LOPY SIPY GPY FIPY LOPY4` and your-project-version-code is
1111
1212### example:
1313
14- If you have your MicroPython project in the current directory ` . ` just type:
15-
14+ For building against a specific revision (ex: v1 .20.0.rc7 idf_v3.1) you can use:
1615```
17- sudo docker run -v `pwd`:/opt/frozen -it goinvent/pycom-fw build LOPY4 myproject
16+ sudo docker run -v `pwd`:/opt/frozen -it goinvent/pycom-fw build FIPY myproject v1.20.0.rc7 idf_v3.1
1817```
19- For building against a specific revision (ex: v1 .20.0.rc0 idf_v3.1) you can use:
18+
19+ ### Altering Espressif IDF options:
20+
21+ Have a file ` sdkconfig.defaults ` similar to https://github.com/pycom/pycom-esp-idf/blob/master/examples/wifi/scan/sdkconfig in your local frozen directory (ex: .), then use the same command:
22+
2023```
21- sudo docker run -v `pwd`:/opt/frozen -it goinvent/pycom-fw build FIPY myproject v1.20.0.rc0 idf_v3.1
24+ sudo docker run -v `pwd`:/opt/frozen -it goinvent/pycom-fw build FIPY myproject v1.20.0.rc7 idf_v3.1
2225```
2326
27+ Beginning the build the ` sdkconfig.defaults ` overrides.
2428
2529### note:
2630
Original file line number Diff line number Diff line change @@ -51,25 +51,39 @@ function prepare_dev() {
5151 cd /opt/pycom-esp-idf
5252 git checkout $2
5353 git submodule update --init
54+
55+ if [ -f /opt/frozen/sdkconfig.defaults ]
56+ then
57+ cd examples/wifi/scan/
58+ cp /opt/frozen/sdkconfig.defaults sdkconfig.defaults
59+ make defconfig
60+ make bootloader
61+ make -j4 all
62+ echo " IDF build options:"
63+ cat sdkconfig
64+ fi
5465 fi
5566}
5667
5768function build() {
5869 BOARD=$1
5970 PROJECT=$2
60- export PATH=$PATH :/opt/xtensa-esp32-elf/bin/
61- export IDF_PATH=/opt/pycom-esp-idf
6271 board=` echo " $BOARD " | tr ' [:upper:]' ' [:lower:]' `
6372 cd /opt/pycom-micropython-sigfox/esp32/ &&
6473 make clean BOARD=$BOARD &&
6574 cd ../mpy-cross && make clean && make && cd ../esp32 &&
6675 cp /opt/frozen/* .py ./frozen/Base/ &&
6776 mv ./frozen/Base/main.py ./frozen/Base/_main.py
68- make release BOARD=$BOARD RELEASE_DIR=/tmp
77+ make TARGET=boot COPY_IDF_LIBS=1 BOARD=$BOARD RELEASE_DIR=/tmp
78+ cat /opt/pycom-esp-idf/examples/wifi/scan/sdkconfig.defaults
79+ make release COPY_IDF_LIBS=1 BOARD=$BOARD RELEASE_DIR=/tmp
6980 mv /tmp/* .tar.gz /opt/frozen/$board -firmware-$PROJECT .tar.gz
7081 echo " Firmware $board -firmware-$PROJECT .tar.gz ready !"
7182}
7283
84+ export PATH=$PATH :/opt/xtensa-esp32-elf/bin/
85+ export IDF_PATH=/opt/pycom-esp-idf
86+
7387[[ $boards =~ (^| [[:space:]])$1 ($| [[:space:]]) ]] &&
7488 echo " #goinvent " ||
7589 usage
You can’t perform that action at this time.
0 commit comments