Skip to content

Commit

Permalink
Further esp32 development simplifies usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Nov 29, 2020
1 parent f2670a5 commit 4601d9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
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
9 changes: 4 additions & 5 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 @@ -18,7 +18,7 @@ apt-get update && \
python -m pip install --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 and install latest ESP-IDF version. This can be done using the following command `git clone -b release/v4.1 --recursive https://github.com/espressif/esp-idf.git`{{execute}}
Once the download finishes we have to install the proper toolchain. The installation can be done using the following commands:
Expand All @@ -27,11 +27,10 @@ cd esp-idf # Enter the directory with the latest ESP-IDF source code
./install.sh # And run the installation script
```{{execute}}
Once installed, we need to set the location of the SDK for Sming to find:
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."
export IDF_PATH=$(pwd)
```{{execute}}
With that we are ready with the initial setup. Time to go to the next step.
8 changes: 8 additions & 0 deletions sming-on-esp32/step2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ Sit back and relax until the ESP-IDF libraries, Sming libraries and the applicat
Notice that we are using the directive `SMING_ARCH=Esp32`. This directive instructs the Sming build system to build the application for the Esp32 architecture.
Once we have the applications compiled we can flash the compiled application on the ESP32 device using the following command:
```
make flash
```
This command should be executed on your local computers as this tutorial does not have a real ESP32 device attached to it.
Note that you may get an error related to a missing `pyserial` module. Fix this by running:
```
make python-requirements
```{{execute}}
## Basic_Serial
You can build also other sample applications as for example the Basic_Serial one. This can be done using the commands below:
Expand Down

0 comments on commit 4601d9d

Please sign in to comment.