updated Readme

This commit is contained in:
2017-01-27 22:32:02 +01:00
parent 5aaef1a972
commit 46320ef4b9
+48 -24
View File
@@ -51,42 +51,66 @@ The screen size is adjustable up to 25x80 (via a special control sequence) and u
esphttpd's wifi config page, but re-styled and much improved. You can set AP SSID, channel, see the IP esphttpd's wifi config page, but re-styled and much improved. You can set AP SSID, channel, see the IP
address etc right there. address etc right there.
## Setting it all up ## Development
### Installation for development
- Clone this project with `--recursive`, or afterwards run `git submodule init` and `git submodule update`.
- Install [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk/) and build it with - Install [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk/) and build it with
`make toolchain esptool libhal STANDALONE=n`. Make sure the `xtensa-lx106-elf/bin` folder is on $PATH. `make toolchain esptool libhal STANDALONE=n`.
- Install [esptool](https://github.com/espressif/esptool) (it's in Arch community repo and on AUR, too)
Make sure the `xtensa-lx106-elf/bin` folder is on $PATH.
- Install [esptool](https://github.com/espressif/esptool) (it's in the Arch community repo and on AUR, too)
- Set up udev rules so you have access to ttyUSB0 without root, eg: - Set up udev rules so you have access to ttyUSB0 without root, eg:
``` ```
KERNEL=="tty[A-Z]*[0-9]*", GROUP="uucp", MODE="0666" KERNEL=="tty[A-Z]*[0-9]*", GROUP="uucp", MODE="0666"
``` ```
- Clone this project with `--recursive`, or afterwards run `git submodule init` and `git submodule update`.
## Development - Install Ragel if you wish to make modifications to the parser.
If not, comment out it's call in `build_parser.sh`. The `.rl` file is the actual source, the `.c` is generated.
The web resources are in `html_orig`. To prepare for a build, run `compress_html.sh`. - Install Ruby and then the `sass` package with `gem install sass` (or try some other implementation, such as
This should pack them and put in `html`. `sassc`)
If you're missing the compression tools, you can simply copy them there manually uncompressed and hope for the best. - Get the IoT SDK from one of:
serial comm is handled in `serial.c`, sockets etc in `user_main.c`. ```
ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1690"
ESP8266_NONOS_SDK_V2.0.0_16_07_19.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1613"
ESP8266_NONOS_SDK_V1.5.4_16_05_20.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1469"
ESP8266_NONOS_SDK_V1.5.3_16_04_18.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1361"
ESP8266_NONOS_SDK_V1.5.2_16_01_29.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1079"
```
Get the IoT SDK from one of: It's tested with 1.5.2, 2.0.0 won't work without adjusting the build scripts. Any 1.5.x could be fine.
``` The `esp-open-sdk` Makefile could also download this for you with the right flags.
ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1690"
ESP8266_NONOS_SDK_V2.0.0_16_07_19.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1613"
ESP8266_NONOS_SDK_V1.5.4_16_05_20.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1469"
ESP8266_NONOS_SDK_V1.5.3_16_04_18.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1361"
ESP8266_NONOS_SDK_V1.5.2_16_01_29.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1079"
```
It's tested with 1.5.2, 2.0.0 won't work without adjusting the build scripts. Any 1.5.x could be fine. - Make sure your `esphttpdconfig.mk` is set up properly - link to the SDK etc.
To flash, just run `make flash`. First make sure your `esphttpdconfig.mk` is set up properly - link to sdk etc. ### Web resources
The web resources are in `html_orig`. To prepare for a build, run `build_web.sh`, which packs them and
copies over to `html`. The compression and minification is handled by scripts in libesphttpd, specifically
it runs yuicompressor on js and css and gzip or heatshrink on the other files. The `html` folder is
then embedded in the firmware image.
It's kind of tricky to develop the web resources locally; you might want to try the "split image"
Makefile option, then you can flash just the html portion with `make htmlflash`. I haven't tried this.
### Flashing
The Makefile should automatically build the parser and web resources for you when you run `make`.
Sometimes it does not, particularly with `make -B`. Try just plain `make`. You can always run those
build scripts manually, too.
To flash, just run `make flash`.