These are additions to the xtensa-gcc image
You will need esptool.py
to flash your binaries.
It can be installed with pip
or directly from GitHub:
# using pip or pip3
pip install esptool
# if that does not work:
git clone https://github.com/espressif/esptool.git ~/esptool
cd ~/esptool
python setup.py install
# on MacOs, Homebrew also works
brew install esptool
Then, from a terminal, just run the make
commands from your project's folder.
Tip: you don't really need "make" installed in order to build. Just look at the commands inside the example Makefile to build without
make
make build
// you will see something like this:
CC project/src/index.c
AR project/build/esp8266_app.a
LD project/build/esp8266.out
FW project/firmware/
esptool.py vx.y
// then flash your rom to the defaults
make flash
// or specify a serial port to flash
ESP_PORT=/dev/ttyUSB0 make flash
See some example projects here or here
A project looks like this:
-- Makefile
-- src/
|-- index.cpp
|
-- includes/
|-- lib.h
|-- other-lib.h
You can check the tests folder for samples of how to use the project.