Skip to content

Commit 12f2733

Browse files
Merge branch 'master' into master
2 parents 269f89c + 8166263 commit 12f2733

File tree

117 files changed

+8212
-6595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+8212
-6595
lines changed

.travis.yml

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,29 @@
11
sudo: false
22
language: bash
3-
os:
4-
- linux
3+
os: linux
4+
dist: trusty
55

6-
addons:
7-
apt:
8-
sources:
9-
- ubuntu-toolchain-r-test
10-
packages:
11-
- g++-4.8
6+
env:
7+
- BUILD_TYPE=build
8+
9+
install:
10+
- pip install --user -r doc/requirements.txt
1211

1312
script:
14-
- set -e
15-
- export CXX="g++-4.8" CC="gcc-4.8" GCOV="gcov-4.8"
16-
- echo -e "travis_fold:start:host_tests"
17-
- pushd $TRAVIS_BUILD_DIR/tests/host
18-
- make
19-
- make clean-objects
20-
- echo -e "travis_fold:end:host_tests"
21-
- echo -e "travis_fold:start:sketch_test_env_prepare"
22-
- popd
23-
- wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
24-
- tar xf arduino.tar.xz
25-
- mv arduino-nightly $HOME/arduino_ide
26-
- cd $HOME/arduino_ide/hardware
27-
- mkdir esp8266com
28-
- cd esp8266com
29-
- ln -s $TRAVIS_BUILD_DIR esp8266
30-
- cd esp8266/tools
31-
- python get.py
32-
- export PATH="$HOME/arduino_ide:$TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf/bin:$PATH"
33-
- which arduino
34-
- cd $TRAVIS_BUILD_DIR
35-
- source tests/common.sh
36-
- install_libraries
37-
- echo -e "travis_fold:end:sketch_test_env_prepare"
38-
- echo -e "travis_fold:start:sketch_test"
39-
- build_sketches $HOME/arduino_ide $TRAVIS_BUILD_DIR/libraries "-l $HOME/Arduino/libraries"
40-
- echo -e "travis_fold:end:sketch_test"
41-
- echo -e "travis_fold:start:size_report"
42-
- cat size.log
43-
- echo -e "travis_fold:end:size_report"
13+
- $TRAVIS_BUILD_DIR/tests/common.sh
4414

45-
after_success:
46-
- pushd $TRAVIS_BUILD_DIR/tests/host
47-
- bash <(curl -s https://codecov.io/bash) -X gcov
15+
deploy:
16+
provider: releases
17+
prerelease: true
18+
api_key:
19+
secure: A4FBmqyhlzy33oPeZVolg2Q/A3ZcJ3WnRQqQJ3NAPy+qGM5xcboOYtwcLL9vKaHZGfUB7lUP9QVZFGou1Wrmo9DnPvAoe3+XvCaDRGzVMxeIpu7UStbBD4Knbh98tlbMvZCXYRlT4VcusI9bMLK6UWw4sMdPislBh2FEfglTiag=
20+
file_glob: true
21+
file:
22+
- package/versions/$TRAVIS_TAG/esp8266-$TRAVIS_TAG.zip
23+
- package/versions/$TRAVIS_TAG/package_esp8266com_index.json
24+
on:
25+
repo: esp8266/Arduino
26+
tags: true
4827

4928
notifications:
5029
email:

README.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ This project brings support for ESP8266 chip to the Arduino environment. It lets
55

66
ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, work with SD cards, servos, SPI and I2C peripherals.
77

8-
A large community is well established for questions and answers about Arduino for ESP8266 [ESP8266 Community Forum](http://www.esp8266.com/u/arduinoanswers)
9-
108
# Contents
119
- Installing options:
1210
- [Using Boards Manager](#installing-with-boards-manager)
@@ -18,35 +16,24 @@ A large community is well established for questions and answers about Arduino fo
1816
- [Contributing](#contributing)
1917
- [License and credits](#license-and-credits)
2018

21-
### Installing with Boards Manager ###
19+
### Installing with Boards Manager
2220

2321
Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).
2422

25-
- Install Arduino 1.6.8 from the [Arduino website](http://www.arduino.cc/en/main/software).
23+
- Install Arduino 1.8.2 from the [Arduino website](http://www.arduino.cc/en/main/software).
2624
- Start Arduino and open Preferences window.
2725
- Enter ```http://arduino.esp8266.com/stable/package_esp8266com_index.json``` into *Additional Board Manager URLs* field. You can add multiple URLs, separating them with commas.
2826
- Open Boards Manager from Tools > Board menu and install *esp8266* platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
2927

30-
The best place to ask questions related to this core is ESP8266 community forum: http://www.esp8266.com/arduino.
31-
If you find this forum or the ESP8266 Boards Manager package useful, please consider supporting it with a donation. <br />
32-
[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=4M56YCWV6PX66)
33-
34-
#### Available versions
35-
36-
##### Stable version ![](http://arduino.esp8266.com/stable/badge.svg)
28+
#### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
3729
Boards manager link: `http://arduino.esp8266.com/stable/package_esp8266com_index.json`
3830

3931
Documentation: [http://esp8266.github.io/Arduino/versions/2.3.0/](http://esp8266.github.io/Arduino/versions/2.3.0/)
4032

41-
##### Staging version ![](http://arduino.esp8266.com/staging/badge.svg)
42-
Boards manager link: `http://arduino.esp8266.com/staging/package_esp8266com_index.json`
43-
44-
Documentation: [http://esp8266.github.io/Arduino/versions/2.3.0-rc2/](http://esp8266.github.io/Arduino/versions/2.3.0-rc2/)
45-
4633
### Using git version
47-
[![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) [![codecov.io](https://codecov.io/github/esp8266/Arduino/coverage.svg?branch=master)](https://codecov.io/github/esp8266/Arduino?branch=master)
34+
[![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino)
4835

49-
- Install Arduino 1.6.8
36+
- Install Arduino 1.8.2 from the [Arduino website](http://www.arduino.cc/en/main/software).
5037
- Go to Arduino directory
5138
- Clone this repository into hardware/esp8266com/esp8266 directory (or clone it elsewhere and create a symlink)
5239
```bash
@@ -72,7 +59,7 @@ Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
7259
- [What is PlatformIO?](http://docs.platformio.org/page/what-is-platformio.html)
7360
- [PlatformIO IDE](http://platformio.org/platformio-ide)
7461
- Quick Start with [PlatformIO IDE](http://docs.platformio.org/page/ide/atom.html#quick-start) or [PlatformIO Core](http://docs.platformio.org/page/core.html)
75-
- [Advanced using](http://docs.platformio.org/page/platforms/espressif.html) -
62+
- [Advanced usage](http://docs.platformio.org/page/platforms/espressif.html) -
7663
custom settings, uploading to SPIFFS, Over-the-Air (OTA) or using stage version
7764
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/page/ide.html) -
7865
Cloud9, Codeanywhere, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM and Visual Studio
@@ -85,30 +72,33 @@ Using make instead of the Arduino IDE makes it easier to do automated and produc
8572

8673
### Documentation
8774

88-
Documentation for latest development version:
89-
90-
- [Reference](doc/reference.md)
91-
- [Libraries](doc/libraries.md)
92-
- [File system](doc/filesystem.md)
93-
- [OTA update](doc/ota_updates/readme.md)
94-
- [Supported boards](doc/boards.md)
95-
- [FAQ / Trubleshooting](doc/faq/readme.md)
96-
- [Change log](doc/changes.md)
75+
Documentation for latest development version: https://arduino-esp8266.readthedocs.io/en/latest/
9776

9877
### Issues and support ###
9978

100-
If you encounter an issue, you are welcome to submit it here on Github: https://github.com/esp8266/Arduino/issues.
101-
Please provide as much context as possible: version which you are using (you can check it in Boards Manager), your sketch code, serial output, board model, IDE settings (board selection, flash size, etc).
79+
[ESP8266 Community Forum](http://www.esp8266.com/u/arduinoanswers) is a well established community for questions and answers about Arduino for ESP8266.
80+
81+
If you find this forum useful, please consider supporting it with a donation. <br />
82+
[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=4M56YCWV6PX66)
83+
84+
If you encounter an issue which you think is a bug in the ESP8266 Arduino Core or the associated libraries, you are welcome to submit it here on Github: https://github.com/esp8266/Arduino/issues.
85+
86+
Please provide as much context as possible:
10287

103-
If you can not find the answers above, you can also try [ESP8266 Community Forum](http://www.esp8266.com/arduino)
88+
- ESP8266 Arduino core version which you are using (you can check it in Boards Manager)
89+
- your sketch code; please wrap it into a code block, see [Github markdown manual](https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code)
90+
- when encountering an issue which happens at run time, attach serial output. Wrap it into a code block, just like the code.
91+
- for issues which happen at compile time, enable verbose compiler output in the IDE preferences, and attach that output (also inside a code block)
92+
- ESP8266 development board model
93+
- IDE settings (board choich, flash size)
10494

10595
### Contributing
10696

107-
For minor fixes of code and documentation, go ahead and submit a pull request.
97+
For minor fixes of code and documentation, please go ahead and submit a pull request.
10898

10999
Check out the list of issues which are easy to fix — [easy issues for 2.4.0](https://github.com/esp8266/Arduino/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.4.0+label%3A%22level%3A+easy%22). Working on them is a great way to move the project forward.
110100

111-
Larger changes (rewriting parts of existing code from scratch, adding new functions to the core, adding new libraries) should generally be discussed [in the chat](https://gitter.im/esp8266/Arduino) first.
101+
Larger changes (rewriting parts of existing code from scratch, adding new functions to the core, adding new libraries) should generally be discussed by opening an issue first.
112102

113103
Feature branches with lots of small commits (especially titled "oops", "fix typo", "forgot to add file", etc.) should be squashed before opening a pull request. At the same time, please refrain from putting multiple unrelated changes into a single pull request.
114104

boards.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ generic.menu.FlashSize.1M64.build.spiffs_end=0xFB000
148148
generic.menu.FlashSize.1M64.build.spiffs_blocksize=4096
149149
generic.menu.FlashSize.1M64.upload.maximum_size=958448
150150

151+
generic.menu.FlashSize.1M0=1M (no SPIFFS)
152+
generic.menu.FlashSize.1M0.build.flash_size=1M
153+
generic.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld
154+
generic.menu.FlashSize.1M0.upload.maximum_size=1023984
155+
151156
generic.menu.FlashSize.2M=2M (1M SPIFFS)
152157
generic.menu.FlashSize.2M.build.flash_size=2M
153158
generic.menu.FlashSize.2M.build.flash_ld=eagle.flash.2m.ld

cores/esp8266/MD5Builder.cpp

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
#include <Arduino.h>
22
#include <MD5Builder.h>
33

4-
uint8_t hex_char_to_byte(uint8_t c)
5-
{
4+
uint8_t hex_char_to_byte(uint8_t c){
65
return (c >= 'a' && c <= 'f') ? (c - ((uint8_t)'a' - 0xa)) :
76
(c >= 'A' && c <= 'F') ? (c - ((uint8_t)'A' - 0xA)) :
87
(c >= '0' && c<= '9') ? (c - (uint8_t)'0') : 0;
98
}
109

11-
void MD5Builder::begin(void)
12-
{
10+
void MD5Builder::begin(void){
1311
memset(_buf, 0x00, 16);
1412
MD5Init(&_ctx);
1513
}
1614

17-
void MD5Builder::add(uint8_t * data, uint16_t len)
18-
{
15+
void MD5Builder::add(const uint8_t * data, const uint16_t len){
1916
MD5Update(&_ctx, data, len);
2017
}
2118

22-
void MD5Builder::addHexString(const char * data)
23-
{
19+
void MD5Builder::addHexString(const char * data){
2420
uint16_t i, len = strlen(data);
2521
uint8_t * tmp = (uint8_t*)malloc(len/2);
2622
if(tmp == NULL) {
@@ -35,8 +31,7 @@ void MD5Builder::addHexString(const char * data)
3531
free(tmp);
3632
}
3733

38-
bool MD5Builder::addStream(Stream & stream, const size_t maxLen)
39-
{
34+
bool MD5Builder::addStream(Stream & stream, const size_t maxLen){
4035
const int buf_size = 512;
4136
int maxLengthLeft = maxLen;
4237
uint8_t * buf = (uint8_t*) malloc(buf_size);
@@ -76,25 +71,21 @@ bool MD5Builder::addStream(Stream & stream, const size_t maxLen)
7671
return true;
7772
}
7873

79-
void MD5Builder::calculate(void)
80-
{
74+
void MD5Builder::calculate(void){
8175
MD5Final(_buf, &_ctx);
8276
}
8377

84-
void MD5Builder::getBytes(uint8_t * output)
85-
{
78+
void MD5Builder::getBytes(uint8_t * output){
8679
memcpy(output, _buf, 16);
8780
}
8881

89-
void MD5Builder::getChars(char * output)
90-
{
82+
void MD5Builder::getChars(char * output){
9183
for(uint8_t i = 0; i < 16; i++) {
9284
sprintf(output + (i * 2), "%02x", _buf[i]);
9385
}
9486
}
9587

96-
String MD5Builder::toString(void)
97-
{
88+
String MD5Builder::toString(void){
9889
char out[33];
9990
getChars(out);
10091
return String(out);

cores/esp8266/MD5Builder.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/*
1+
/*
22
md5.h - exposed md5 ROM functions for esp8266
33
44
Copyright (c) 2015 Hristo Gochkov. All rights reserved.
55
This file is part of the esp8266 core for Arduino environment.
6-
6+
77
This library is free software; you can redistribute it and/or
88
modify it under the terms of the GNU Lesser General Public
99
License as published by the Free Software Foundation; either
@@ -31,13 +31,13 @@ class MD5Builder {
3131
uint8_t _buf[16];
3232
public:
3333
void begin(void);
34-
void add(uint8_t * data, uint16_t len);
35-
void add(const char * data){ add((uint8_t*)data, strlen(data)); }
34+
void add(const uint8_t * data, const uint16_t len);
35+
void add(const char * data){ add((const uint8_t*)data, strlen(data)); }
3636
void add(char * data){ add((const char*)data); }
37-
void add(String data){ add(data.c_str()); }
37+
void add(const String data){ add(data.c_str()); }
3838
void addHexString(const char * data);
3939
void addHexString(char * data){ addHexString((const char*)data); }
40-
void addHexString(String data){ addHexString(data.c_str()); }
40+
void addHexString(const String data){ addHexString(data.c_str()); }
4141
bool addStream(Stream & stream, const size_t maxLen);
4242
void calculate(void);
4343
void getBytes(uint8_t * output);

0 commit comments

Comments
 (0)