Skip to content
frankdownunder edited this page Aug 7, 2019 · 74 revisions

You will need Sming 1.1 or newer to support cross-platform tools. You might want to use sming-bootstrap.

Install prerequisites

Ubuntu
sudo apt-get install make unrar autoconf automake libtool libtool-bin gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat1-dev python sed python-serial python-dev srecord bc git help2man unzip bzip2
Fedora
sudo dnf install make autoconf automake libtool gcc gcc-c++ gperf flex bison texinfo gawk ncurses-devel expat-devel python sed pyserial srecord bc git patch unzip help2man python-devel

Prepare directory

We recommend /opt/ but you can use anything you want

mkdir -p /opt/
cd /opt/

Build esp-open-sdk

(Or get precompiled esp-open-sdk 1.5.4 (x86_64-bit) (x86_32-bit) (Raspbian) or 1.4.0 (x86_64-bit) (x86_32-bit) (Raspbian) )

git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
cd esp-open-sdk

sudo chown -R [username] ./ # be careful this command can do damage if used in the wrong directory, try without sudo first!
make VENDOR_SDK=1.5.4 STANDALONE=y # It will take a while...

The parameter VENDOR_SDK=1.5.4 specifies that you will be using SDK version 1.5.4. Before changing this value to a newer version make sure to check that the SDK version that you have chosen is supported.

Set ENV Variables

export ESP_HOME=/opt/esp-open-sdk
export SMING_HOME=/opt/Sming/Sming

To Sming environment paths permanently: Just go to the Sming home directory /opt/Sming/Sming and edit the file Makefile: because this library has defaults for a nutter and programmers (like myself add config options and never document them)

more information here

Get and Build Sming Core:

cd /opt          #{or whichever folder you chose to use}
git clone https://github.com/SmingHub/Sming.git
# Warning: Do NOT use the --recursive option for the command above. 
#          Our build mechanism will take care to get the third-party sources and patch them, if needed.

# You will get a copy of our `develop` branch which intended for developers 
# and it is the one where all new cool (unstable) features are landing. 

# If you want to use our stable branch type the command below
cd Sming && git checkout origin/master

[Note: Prior to July 2019, the next step was to build the sming library, this is no longer necessary; it is done automatically now. Further information read building.rst]

Install esptool.py:

sudo apt-get install python-serial unzip
wget https://github.com/themadinventor/esptool/archive/master.zip
unzip master.zip
mv esptool-master $ESP_HOME/esptool
rm master.zip

Install esptool2:

cd  $ESP_HOME
git clone https://github.com/raburton/esptool2
# For the command above: do NOT use the --recursive option as it will break the patching of the third-party libraries.
cd esptool2
make
export PATH=$PATH:$ESP_HOME/esptool2

Build a 'Basic Blink' example:

cd $SMING_HOME/../samples/Basic_Blink
make

Build and flash a 'Basic Blink' example (using ttyUSB0):

cd $SMING_HOME/../samples/Basic_Blink
make flash

Configuration

You might want to configure your project before building. Edit component.mk [Prior to July 2019 this was Makefile-user.mk]

Clone this wiki locally