Skip to content

Arduino boards with ESP8266 #3121

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 4 commits into from
Apr 11, 2017
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
70 changes: 70 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu.BoardModel=Model
menu.UploadSpeed=Upload Speed
menu.CpuFrequency=CPU Frequency
menu.CrystalFreq=Crystal Frequency
menu.FlashSize=Flash Size
menu.FlashMode=Flash Mode
menu.FlashFreq=Flash Frequency
Expand Down Expand Up @@ -1892,3 +1894,71 @@ coredev.menu.DebugLevel.OTA2____=OTA + Updater
coredev.menu.DebugLevel.OTA2____.build.debug_level=-DDEBUG_ESP_OTA -DDEBUG_ESP_UPDATER
coredev.menu.DebugLevel.all_____=All
coredev.menu.DebugLevel.all_____.build.debug_level=-DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM

############ Arduino boards with Esp8266 ############

arduino-esp8266.name=Arduino

arduino-esp8266.upload.tool=esptool
arduino-esp8266.upload.speed=9600
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the default upload speed intentionally set that low?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, because into uno wifi dev. ed. the maximum speed between ATmega328P and esp8266 is 9600, for the other boards the speed can be higher.

arduino-esp8266.upload.resetmethod=ck
arduino-esp8266.upload.maximum_size=1044464
arduino-esp8266.upload.maximum_data_size=81920
arduino-esp8266.upload.wait_for_upload_port=true
arduino-esp8266.serial.disableDTR=true
arduino-esp8266.serial.disableRTS=true

arduino-esp8266.build.mcu=esp8266
arduino-esp8266.build.f_cpu=80000000L
#arduino-esp8266.build.f_crystal=40000000
arduino-esp8266.build.core=esp8266
arduino-esp8266.build.flash_mode=qio
arduino-esp8266.build.flash_size=4M
arduino-esp8266.build.flash_freq=40
arduino-esp8266.build.debug_port=
arduino-esp8266.build.debug_level=
arduino-esp8266.build.board=ESP8266_ARDUINO

arduino-esp8266.menu.BoardModel.starottodeved=Star OTTO
arduino-esp8266.menu.BoardModel.starottodeved.build.board=ESP8266_ARDUINO_STAR_OTTO
arduino-esp8266.menu.BoardModel.starottodeved.build.variant=arduino_uart
arduino-esp8266.menu.BoardModel.starottodeved.build.extra_flags=-DF_CRYSTAL=40000000

arduino-esp8266.menu.BoardModel.primo=Primo
arduino-esp8266.menu.BoardModel.primo.build.board=ESP8266_ARDUINO_PRIMO
arduino-esp8266.menu.BoardModel.primo.build.variant=arduino_spi
arduino-esp8266.menu.BoardModel.primo.build.extra_flags=-DF_CRYSTAL=40000000

arduino-esp8266.menu.BoardModel.unowifideved=Uno WiFi
arduino-esp8266.menu.BoardModel.unowifideved.build.board=ESP8266_ARDUINO_UNOWIFI
arduino-esp8266.menu.BoardModel.unowifideved.build.variant=arduino_uart
arduino-esp8266.menu.BoardModel.unowifideved.build.extra_flags=-DF_CRYSTAL=40000000

arduino-esp8266.menu.UploadSpeed.9600=9600
arduino-esp8266.menu.UploadSpeed.9600.upload.speed=9600
arduino-esp8266.menu.UploadSpeed.19200=19200
arduino-esp8266.menu.UploadSpeed.19200.upload.speed=19200
arduino-esp8266.menu.UploadSpeed.57600=57600
arduino-esp8266.menu.UploadSpeed.57600.upload.speed=57600
arduino-esp8266.menu.UploadSpeed.115200=115200
arduino-esp8266.menu.UploadSpeed.115200.upload.speed=115200
arduino-esp8266.menu.UploadSpeed.230400=230400
arduino-esp8266.menu.UploadSpeed.230400.upload.speed=230400
arduino-esp8266.menu.UploadSpeed.460800=460800
arduino-esp8266.menu.UploadSpeed.460800.upload.speed=460800

arduino-esp8266.menu.FlashSize.4M1M=4M (1M SPIFFS)
arduino-esp8266.menu.FlashSize.4M1M.build.flash_size=4M
arduino-esp8266.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld
arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_start=0x300000
arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000
arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_blocksize=8192
arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_pagesize=256

arduino-esp8266.menu.FlashSize.4M3M=4M (3M SPIFFS)
arduino-esp8266.menu.FlashSize.4M3M.build.flash_size=4M
arduino-esp8266.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld
arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_start=0x100000
arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000
arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_blocksize=8192
arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_pagesize=256
7 changes: 5 additions & 2 deletions cores/esp8266/core_esp8266_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] =
// 0: 40MHz
// 1: 26MHz
// 2: 24MHz
[48] = 1,
#if F_CRYSTAL == 40000000
[48] = 0,
#else
[48] = 1,
#endif



Expand Down Expand Up @@ -312,4 +316,3 @@ void user_rf_pre_init()


void ICACHE_RAM_ATTR user_spi_flash_dio_to_qio_pre_init() {}

4 changes: 2 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implici
compiler.S.cmd=xtensa-lx106-elf-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls

compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read

compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc

compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections
Expand Down
39 changes: 39 additions & 0 deletions variants/arduino_spi/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/

Copyright (c) 2007 David A. Mellis
Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
*/

/*
Modified 23 March 2017
by Sergio Tomasello and Andrea Cannistrá
*/

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

static const uint8_t LED_BUILTIN = 2;
static const uint8_t BUILTIN_LED = 2;

#endif /* Pins_Arduino_h */
39 changes: 39 additions & 0 deletions variants/arduino_uart/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/

Copyright (c) 2007 David A. Mellis
Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
*/

/*
Modified 23 March 2017
by Sergio Tomasello and Andrea Cannistrá
*/

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

static const uint8_t LED_BUILTIN = 14;
static const uint8_t BUILTIN_LED = 14;

#endif /* Pins_Arduino_h */