Skip to content

Commit

Permalink
Merge pull request #1 from esp8266/esp8266
Browse files Browse the repository at this point in the history
Get latest
  • Loading branch information
Makuna committed May 7, 2015
2 parents 367962d + 8b114a5 commit 9977276
Show file tree
Hide file tree
Showing 6 changed files with 1,410 additions and 4 deletions.
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project brings support for ESP8266 chip to the Arduino environment. ESP8266
| OS | Build status | Latest release | Alpha Version |
| --- | ------------ | -------------- | --------------- |
| Linux | [![Linux build status](http://img.shields.io/travis/igrr/Arduino.svg)](https://travis-ci.org/igrr/Arduino) | [arduino-1.6.1-linux64.tar.xz](../../releases/download/1.6.1-esp8266-1/arduino-1.6.1-linux64.tar.xz) | |
| Windows | [![Windows build status](http://img.shields.io/appveyor/ci/igrr/Arduino.svg)](https://ci.appveyor.com/project/igrr/Arduino) | [arduino-1.6.1-p1-windows.zip](https://github.com/igrr/Arduino/releases/download/1.6.1-esp8266-1/arduino-1.6.1-p1-windows.zip) | [appveyor Build](https://ci.appveyor.com/project/igrr/Arduino/build/artifacts) |
| Windows | [![Windows build status](http://img.shields.io/appveyor/ci/igrr/Arduino.svg)](https://ci.appveyor.com/project/igrr/Arduino) | [arduino-1.6.1-p1-windows.zip](https://github.com/igrr/Arduino/releases/download/1.6.1-esp8266-1/arduino-1.6.1-p1-windows.zip) | [appveyor 64Bit Build](https://ci.appveyor.com/project/igrr/Arduino/build/artifacts) |
| OS X | | [arduino-1.6.1-macosx-java-latest-signed.zip](../../releases/download/1.6.1-esp8266-1/arduino-1.6.1-macosx-java-latest-signed.zip) | |


Expand Down Expand Up @@ -181,8 +181,48 @@ Libraries that don't rely on low-level access to AVR registers should work well.

#### Upload via serial port ####
Pick the correct serial port.
You need to put ESP8266 into bootloader mode before uploading code (pull GPIO0 low and
toggle power).
You need to put ESP8266 into bootloader mode before uploading code.

#### Minimal hardware Setup for Bootloading and usage ####

ESPxx Hardware

| PIN | Resistor | Serial Adapter |
| ------------- | -------- | -------------- |
| VCC | | VCC (3.3V) |
| GND | | GND |
| TX or GPIO2* | | RX |
| RX | | TX |
| GPIO0 | PullUp | DTR |
| Reset* | | RTS |
| GPIO15* | PullDown | |
| CH_PD | PullUp | |

* Note
- GPIO15 is also named MTDO
- Reset is also named RSBT or REST (adding PullUp improves the stability of the Module)
- GPIO2 is alternative TX for the boot loader mode

ESP01 example:

![ESP01 connect](https://raw.githubusercontent.com/Links2004/Arduino/esp8266/docs/ESP01_connect.jpg)

#### Minimal hardware Setup for Bootloading only ####
ESPxx Hardware

| PIN | Resistor | Serial Adapter |
| ------------- | -------- | -------------- |
| VCC | | VCC (3.3V) |
| GND | | GND |
| TX or GPIO2 | | RX |
| RX | | TX |
| GPIO0 | | GND |
| Reset | | RTS* |
| GPIO15 | PullDown | |
| CH_PD | PullUp | |

* Note
- if no RTS is used a manual power toggle is needed

### Issues and support ###

Expand Down
47 changes: 47 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
menu.UploadSpeed=Upload Speed
menu.CpuFrequency=CPU Frequency
menu.FlashSize=Flash size

##############################################################
generic.name=Generic ESP8266 Module

Expand Down Expand Up @@ -56,6 +57,52 @@ generic.menu.FlashSize.2M.build.flash_size=2M
generic.menu.FlashSize.4M=4M
generic.menu.FlashSize.4M.build.flash_size=4M

##############################################################
modwifi.name=Olimex MOD-WIFI-ESP8266(-DEV)

modwifi.upload.tool=esptool
modwifi.upload.speed=115200
modwifi.upload.resetmethod=ck
modwifi.upload.maximum_size=2097152
modwifi.upload.wait_for_upload_port=true
modwifi.serial.disableDTR=true
modwifi.serial.disableRTS=true

modwifi.build.mcu=esp8266
modwifi.build.f_cpu=80000000L
modwifi.build.board=MOD_WIFI_ESP8266
modwifi.build.core=esp8266
modwifi.build.variant=generic
# Winbond W25Q16 flash
modwifi.build.flash_mode=qio
modwifi.build.flash_size=2M
modwifi.build.flash_freq=40

modwifi.menu.CpuFrequency.80=80 MHz
modwifi.menu.CpuFrequency.80.build.f_cpu=80000000L
modwifi.menu.CpuFrequency.160=160 MHz
modwifi.menu.CpuFrequency.160.build.f_cpu=160000000L

modwifi.menu.UploadSpeed.115200=115200
modwifi.menu.UploadSpeed.115200.upload.speed=115200
modwifi.menu.UploadSpeed.9600=9600
modwifi.menu.UploadSpeed.9600.upload.speed=9600
modwifi.menu.UploadSpeed.57600=57600
modwifi.menu.UploadSpeed.57600.upload.speed=57600
modwifi.menu.UploadSpeed.256000.windows=256000
modwifi.menu.UploadSpeed.256000.upload.speed=256000
modwifi.menu.UploadSpeed.230400.linux=230400
modwifi.menu.UploadSpeed.230400.macosx=230400
modwifi.menu.UploadSpeed.230400.macosx=230400
modwifi.menu.UploadSpeed.230400.upload.speed=230400
modwifi.menu.UploadSpeed.460800.linux=460800
modwifi.menu.UploadSpeed.460800.macosx=460800
modwifi.menu.UploadSpeed.460800.upload.speed=460800
modwifi.menu.UploadSpeed.512000.windows=512000
modwifi.menu.UploadSpeed.512000.upload.speed=512000
modwifi.menu.UploadSpeed.921600=921600
modwifi.menu.UploadSpeed.921600.upload.speed=921600

##############################################################
nodemcu.name=NodeMCU (ESP8266 ESP-12 Module)

Expand Down
2 changes: 1 addition & 1 deletion cores/esp8266/esp8266_peri.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static uint8_t esp8266_gpioToFn[16] = {0x34, 0x18, 0x38, 0x14, 0x3C, 0x40, 0x1C,
#define T1I ESP8266_REG(0x60C) //Interrupt Status Register (1bit) write to clear
//edge interrupt enable register
#define TEIE ESP8266_DREG(0x04)
#define TEIE1 0x02 //it for timer 1
#define TEIE1 0x02 //bit for timer 1

//Timer 2 Registers (32bit CountUp Timer)
#define T2L ESP8266_REG(0x620) //Load Value (Starting Value of Counter)
Expand Down
Loading

0 comments on commit 9977276

Please sign in to comment.