Giter Club home page Giter Club logo

esp8266's Introduction

ESP8266

ESP210 – makefile

A makefile to build Arduino projects to a SweetPea ESP210 bord. The makefile will work on other ESP8266 variants as well with some modifications. It is tested and builds on Mac OS X and Linux (Debian); it will, however, not run out of the box on Windows.

The environment used is based on the 2.3.0 version of the esp8266/Arduino project that brings support for the ESP8266 bords to the Arduino IDE. It contain all the software needed to make use of features as WiFi, filesystem etc. The later needs some modification on some core files.

As stated in Arduino IDE 1.5 3rd party Hardware specification there must be three files in the root:

  • platform.txt contains definitions for the CPU architecture used (compiler, build process parameters, tools used for upload, etc.)
  • boards.txt contains definitions for the boards (board name, parameters for building and uploading sketches, etc.)
  • programmers.txt contains definitions for external programmers (typically used to burn bootloaders or sketches on a blank CPU/board)

These three files are especially intresting because they constitute the makefile; they contain all information needed and the files configure the different architectures on Arduino 3rd part bords. They are important if one will use an other version or run on a other ESP8266 board.

Step-by-step

Install the esp8266/Arduino environment by

mkdir esp8266
cd esp8266
git clone https://github.com/esp8266/Arduino.git

or just follow the instruction given by the provider. Alternatively install it from the Arduino IDE and a json file. The later can be handy because it will provide you some parameters specific for your setup.

Download the binary tools needed as described by the provider or by:

cd esp8266/tools
python get.py

Create your Arduino project or just an ordinary C/C++/asm project that use the Arduino hooks – setup() and loop(); if you would like to add other psedo tasks that is possible.

Download the makefile to your project:

cd <your project>
git clone https://github.com/ejanjoh/esp8266.git

Change the following variables in the script to your settings:

  • TOOLS_PATH point out the tools directory installed as a part of above.
  • ARDUINO_PATH point out the esp8266/Arduino environment installed above.
  • PROJ_PATH point out the directory contaning your sketch or other source files.
  • BUILD_PATH point out a directory containing all files that will be built.
  • SERIAL_PORT point out the port to be used

If you use other versions then described in this short guide some paths needs to be modified. The full paths in the makefile may vary depending on how you install the supported environent, and the makefile needs to be adjusted thereafter.

Using the makefile

// build it all 
make all -f make_esp210.mk

// clean the build
make clean -f make_esp210.mk

// get the size of the build
make size -f make_esp210.mk

// upload the code the target board
make upload -f make_esp210.mk

// create list files and files containing the section headers
make extra -f make_esp210.mk

Attached source files

esp210_blink.ino is an Arduino file that will blink the internal led in the ESP210 board.

esp210_blink.c is a C file that will blink the internal led on the ESP210 board.

Just attach one of the sorce files to your PROJ_PATH, build and flash your project.

esp8266's People

Contributors

ejanjoh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.