nqd / esp8266-dev

ESP8266 Wifi SoC dev, with OTA made easy
44 stars 12 forks source link

Why this?

Short: I do not like the developing environment provided by Espressif. Then I rewrite Makefile (mostly) to:

This dev env will use as much (closed blobs) libs from Espressif as possible. However, current json parsing of SDK (taken from Contiki OS) is not good enough, I have no way to check if this/that string is a valid one, then I decided to use jsmn

All examples have been testing with SDK 1.3.0, 4MB Module-12. Module-01 512KB is considered out of date.

Begin

  1. Install compiler for ESP with esp-open-sdk. It would be good if you install at HOME.

  2. Clone this project

    git clone --recursive https://github.com/nqd/esp8266-dev.git
  3. Try OTA example under examples/ota-update

I setup an OTA server at http://103.253.146.183/, you may need to

Via UART logging, you should see new version 0.0.2 downloaded, then ESP boots new firmware, print out your last compiling time.

To use

By default, flash size is 4096 KB (1024+1024 with OTA=1). Pull request for Makefile to work with all flash options is more than welcome.

Command to use:

make OTA=1/0                # default OTA=1
make OTA=1 IMAGE=1/2        # generate image user1/user2
make OTA=1 IMAGE=1/2 flash  # program with OTA enable
make register               # upload, register new version. Must setup OTA server first

How to write makefile for your own program:

Look at Makefile for program under /examples:

PROJECT = yourprojectname
ROOT = ../..

APPS += fota
APPS += mqtt

include ${ROOT}/Makefile.common

Using APPs

All credit of apps/ belong to their authors. Mis config and/or using belong to me.

Todo

License

MIT