Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further esp32 development simplifies usage #4

Merged
merged 1 commit into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions sming-on-esp32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ RUN apt-get update && \
WORKDIR /opt
RUN git clone https://github.com/SmingHub/Sming.git
ENV SMING_HOME=/opt/Sming/Sming
RUN git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git
RUN cd esp-idf && ./install.sh && export IDF_PATH=$(pwd) && . ./export.sh && echo $IDF_PATH
RUN git clone -b release/v4.1 --recursive https://github.com/espressif/esp-idf.git
RUN cd esp-idf && ./install.sh && export IDF_PATH=$(pwd) && echo $IDF_PATH
ENV IDF_PATH=/opt/esp-idf
RUN echo ". $IDF_PATH/export.sh" > ~/.bashrc
RUN . $IDF_PATH/export.sh && cd $SMING_HOME/../samples/Basic_Blink/ && make SMING_ARCH=Esp32


RUN cd $SMING_HOME/../samples/Basic_Blink/ && make -j5 python-requirements all SMING_ARCH=Esp32
22 changes: 12 additions & 10 deletions sming-on-esp32/step1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We must set `SMING_HOME` to the location of the Sming Framework source code we'v

# ESP-IDF installation

ESP-IDF is a collection of software libraries for ESP32 and scripts to install and manage the needed toolchain. As of this writing Sming is compatible with ESP-IDF v4.0.x.
ESP-IDF is a collection of software libraries for ESP32 and scripts to install and manage the needed toolchain. As of this writing Sming is compatible with ESP-IDF v4.1.x.

Before we start with the ESP-IDF installation we will have to install the required operating system packages. This can be done with the command below:

Expand All @@ -15,23 +15,25 @@ apt-get update && \
apt-get upgrade -y && \
apt-get install -y git wget flex bison gperf cmake ninja-build ccache libffi-dev libssl-dev dfu-util python3 python3-pip python3-setuptools && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && \
python -m pip install --upgrade virtualenv==16.7.9
python -m pip install pyserial --upgrade virtualenv==16.7.9
```{{execute}}
Now let's download and install latest ESP-IDF version 4.0.x. This can be done using the following command `git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git`{{execute}}
Now let's download the ESP-IDF SDK:
Once the download finishes we have to install the proper toolchain. The installation can be done using the following commands:
```
git clone -b release/v4.1 https://github.com/espressif/esp-idf.git
```{{execute}}
We must set the location of the SDK for Sming to find:
```
cd esp-idf # Enter the directory with the latest ESP-IDF source code
./install.sh # And run the installation script
```{{execute}}
export IDF_PATH=$(pwd)/esp-idf
```{{execute}}
Finally, install the proper toolchain:
Once the commands above finish we have to do export the needed ESP-IDF environmental variables.
```
. ./export.sh
echo "ESP-IDF is installed at $IDF_PATH."
$IDF_PATH/install.sh
```{{execute}}
With that we are ready with the initial setup. Time to go to the next step.