Skip to content

Remove the need to set programmer #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ GPIO16 can be ```INPUT``` or ```OUTPUT```.

```analogRead(0)``` reads the value of the ADC channel connected to the TOUT pin.

Pin interrupts are supported through ```attachInterrupt```, ```detachInterrupt``` functions.
Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt
Pin interrupts are supported through ```attachInterrupt```, ```detachInterrupt``` functions.
Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt
types are supported: ```CHANGE```, ```RISING```, ```FALLING```.

#### Timing and delays ####
```millis``` and ```micros``` return the number of milliseconds and microseconds elapsed after reset, respectively.
```millis``` and ```micros``` return the number of milliseconds and microseconds elapsed after reset, respectively.

```delay``` pauses the sketch for a given number of milliseconds and allows WiFi and TCP/IP tasks to run.
```delayMicroseconds``` pauses for a given number of microseconds.

Remember that there is a lot of code that needs to run on the chip besides the sketch
Remember that there is a lot of code that needs to run on the chip besides the sketch
when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending
events each time the ```loop()``` function completes, OR when ```delay(...)``` is called.
If you have a loop somewhere in your sketch that takes a lot of time (>50ms) without
Expand All @@ -62,7 +62,7 @@ more than 20 milliseconds is not recommended.

```Serial``` object works much the same way as on a regular Arduino. Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty.

Only 8n1 mode is supported right now.
Only 8n1 mode is supported right now.

By default the diagnostic output from WiFi libraries is disabled when you call ```Serial.begin```. To enable debug output again, call ```Serial.setDebugOutput(true);```

Expand Down Expand Up @@ -93,7 +93,7 @@ Size can be anywhere between 4 and 4096 bytes.

```EEPROM.write``` does not write to flash immediately, instead you must call ```EEPROM.commit()```
whenever you wish to save changes to flash. ```EEPROM.end()``` will also commit, and will
release the RAM copy of EEPROM contents.
release the RAM copy of EEPROM contents.

Three examples included.

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


#### Upload via serial port ####
Select "esptool" as a programmer, and pick the correct serial port.
You need to put ESP8266 into bootloader mode before uploading code (pull GPIO0 low and
Pick the correct serial port.
You need to put ESP8266 into bootloader mode before uploading code (pull GPIO0 low and
toggle power).

### Things not done yet ###
Expand Down
2 changes: 2 additions & 0 deletions hardware/esp8266com/esp8266/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ esp01.build.board=ESP8266_ESP01
esp01.build.core=esp8266
esp01.build.variant=esp01

esp01.upload.tool=esptool

##############################################################
wifio.name=WIFIO
Expand All @@ -29,3 +30,4 @@ wifio.build.board=ESP8266_WIFIO
wifio.build.core=esp8266
wifio.build.variant=wifio

wifio.upload.tool=esptool
11 changes: 6 additions & 5 deletions hardware/esp8266com/esp8266/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lc -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp

compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD
compiler.cpp.flags=-c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD

compiler.as.cmd=xtensa-lx106-elf-as

Expand Down Expand Up @@ -66,7 +66,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{build.path}/{archive_file}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{build.path}/{archive_file}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"

## Create eeprom
recipe.objcopy.eep.pattern=
Expand All @@ -88,7 +88,8 @@ tools.esptool.cmd=esptool
tools.esptool.cmd.windows=esptool.exe
tools.esptool.path={runtime.ide.path}/hardware/tools/esp8266

tools.esptool.program.params.verbose=-vv
tools.esptool.program.params.quiet=
tools.esptool.program.pattern="{path}/{cmd}" {program.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp {serial.port} -ca 0x00000 -cf "{build.path}/{build.project_name}_00000.bin" -ca 0x40000 -cf "{build.path}/{build.project_name}_40000.bin"
tools.esptool.upload.protocol=esp
tools.esptool.upload.params.verbose=-vv
tools.esptool.upload.params.quiet=
tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp {serial.port} -ca 0x00000 -cf "{build.path}/{build.project_name}_00000.bin" -ca 0x40000 -cf "{build.path}/{build.project_name}_40000.bin"

6 changes: 0 additions & 6 deletions hardware/esp8266com/esp8266/programmers.txt
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
esptool.name=esptool
esptool.communication=serial
esptool.protocol=esp
esptool.program.protocol=esp
esptool.program.tool=esptool
esptool.program.extra_params=