From a631269f3c316351623ef1948dac7d966f159c88 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 30 Oct 2015 01:58:56 +0300 Subject: [PATCH] Update readme and fix tool paths --- README.md | 24 +++++++++++++++++------- platform.txt | 10 ++++++++-- tools/get.py | 9 +++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c73cd8917..76f4fcfbb 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,29 @@ Boards manager link: `http://arduino.esp8266.com/staging/package_esp8266com_inde Documentation: [Reference](http://arduino.esp8266.com/staging/doc/reference.html) -### Building latest version from source [![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) +### Using git version [![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) +- Install Arduino 1.6.5 +- Go to Arduino directory +- Clone this repository into hardware/esp8266com/esp8266 directory (or clone it elsewhere and create a symlink) +```bash +cd hardware +mkdir esp8266com +cd esp8266com +git clone https://github.com/esp8266/Arduino.git esp8266 ``` -$ git clone https://github.com/esp8266/Arduino.git -$ cd Arduino/build -$ ant dist +- Download binary tools (you need Python 2.7) +```bash +cd esp8266/tools +python get.py ``` +- Restart Arduino Documentation for latest development version: -- [Reference](hardware/esp8266com/esp8266/doc/reference.md) -- [Supported boards](hardware/esp8266com/esp8266/doc/boards.md) -- [Change log](hardware/esp8266com/esp8266/doc/changes.md) +- [Reference](doc/reference.md) +- [Supported boards](doc/boards.md) +- [Change log](doc/changes.md) ### Issues and support ### diff --git a/platform.txt b/platform.txt index 5440f55b3..58ba9edfa 100644 --- a/platform.txt +++ b/platform.txt @@ -9,7 +9,7 @@ name=ESP8266 Modules version=1.6.4 runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf -runtime.tools.esptool.path={runtime.platform.path}/tools +runtime.tools.esptool.path={runtime.platform.path}/tools/esptool compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/ compiler.sdk.path={runtime.platform.path}/tools/sdk @@ -91,7 +91,13 @@ recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).* tools.esptool.cmd=esptool tools.esptool.cmd.windows=esptool.exe -tools.esptool.path={runtime.platform.path}/tools +tools.esptool.path={runtime.platform.path}/tools/esptool +#runtime.tools.esptool.path + +tools.mkspiffs.cmd=mkspiffs +tools.mkspiffs.cmd.windows=mkspiffs.exe +tools.mkspiffs.path={runtime.platform.path}/tools/mkspiffs +#runtime.tools.mkspiffs.path tools.esptool.upload.protocol=esp tools.esptool.upload.params.verbose=-vv diff --git a/tools/get.py b/tools/get.py index 84e4bee1e..3f780205f 100755 --- a/tools/get.py +++ b/tools/get.py @@ -6,6 +6,7 @@ from __future__ import print_function import urllib import os +import errno import os.path import hashlib import json @@ -24,6 +25,13 @@ def sha256sum(filename, blocksize=65536): hash.update(block) return hash.hexdigest() +def mkdir_p(path): + try: + os.makedirs(path) + except OSError as exc: + if exc.errno != errno.EEXIST or not os.path.isdir(path): + raise + def report_progress(count, blockSize, totalSize): percent = int(count*blockSize*100/totalSize) percent = min(100, percent) @@ -90,5 +98,6 @@ def identify_platform(): if __name__ == '__main__': print('Platform: {0}'.format(identify_platform())) tools_to_download = load_tools_list('tools.json', identify_platform()) + mkdir_p(dist_dir) for tool in tools_to_download: get_tool(tool)