Giter Club home page Giter Club logo

platform-espressif8266's Introduction

Espressif 8266: development platform for PlatformIO

Build Status

ESP8266 is a cost-effective and highly integrated Wi-Fi MCU with built-in TCP/IP networking software for IoT applications. ESP8266 integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit processor and on-chip SRAM.

  • Home (home page in the PlatformIO Registry)
  • Documentation (advanced usage, packages, boards, frameworks, etc.)

Usage

  1. Install PlatformIO
  2. Create PlatformIO project and configure a platform option in platformio.ini file:

Stable version

[env:stable]
platform = espressif8266
board = ...
...

Development version

[env:development]
platform = https://github.com/platformio/platform-espressif8266.git
board = ...
...

Configuration

Please navigate to documentation.

platform-espressif8266's People

Contributors

adipascu avatar alwint3r avatar bighoneypot avatar boneskull avatar capnbry avatar dvv avatar earlephilhower avatar eerimoq avatar fimtrey avatar hotchpotch avatar ivankravets avatar jason2866 avatar mcspr avatar mfornander avatar sanderv32 avatar tasssadar avatar valeros avatar yanbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

platform-espressif8266's Issues

Blink example for Simba framework fails to build when created in path with spaces

Created Blink example in C:\Temp\Platformio Projects\blink. Notice the error line - it looks for file in path partially truncated at the space position.

Archiving .pioenvs\esp01\libSimbaFramework.a
Linking .pioenvs\esp01\firmware.elf
xtensa-lx106-elf-gcc: error: Projects\blink.pioenvs\esp01/firmware.map: No such file or directory
*** [.pioenvs\esp01\firmware.elf] Error 1

Perhaps it's not just Blink example, but all projects for Simba framework.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Errors on save / compile / serial monitor (seems originated by special characters in windows username)

My windows user path is as follows: C:/Users/Serial'S/
That does not seem to go well with Atom / PlatformIO

2 of the errors i get are:
"C:/Users/Serial'S/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe" not found
Note it should be:
"C:/Users/Serial'S/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe"

ess.target.send (internal/child_process.js:540:16)
at Task.module.exports.Task.send (C:\Users\Serial'S\AppData\Local\atom\app-1.17.2\resources\app\src\task.js:119:1)
at PlatformIOTerminalView.module.exports.PlatformIOTerminalView.input (file:///C:/Users/Serial'S/.atom/packages/platformio-ide-terminal/lib/view.coffee:264:17)
at Terminal. (file:///C:/Users/Serial'S/.atom/packages/platformio-ide-terminal/lib/view.coffee:142:8)
at Terminal.EventEmitter.emit (C:\Users\Serial'S.atom\packages\build\node_modules\term.js\src\term.js:109:12)
at Terminal.handler (C:\Users\Serial'S.atom\packages\build\node_modules\term.js\src\term.js:3493:8)
at Terminal.keyPress (C:\Users\Serial'S.atom\packages\build\node_modules\term.js\src\term.js:3243:8)
at HTMLDocument. (C:\Users\Serial'S.atom\packages\build\node_modules\term.js\src\term.js:608:29)

Any idea how could i go from here?

This is when dealing with an esp8266 project

Thanks in advance
Julián


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

toolchain-xtensa version 1.40802.0 is broken for armv6

The packaged toolchain at https://dl.bintray.com/platformio/dl-packages/toolchain-xtensa-linux_armv6l-1.40802.0.tar.gz (most recent revision for ~6 months) is broken for armv6.

Two issues I've encountered when trying to follow the "quick start" instructions at http://docs.platformio.org/en/latest/quickstart.html on raspberry pi:

  1. the contents of bin/ and xtensa-lx106-elf/ contain broken links to relative paths "bin/"
  2. xtensa-lx106-elf-c++ seems to be calling the system assembler |as| instead of the toolchain specific xtensa-lx106-elf-as

I worked around by dumping the contents of https://dl.bintray.com/platformio/dl-packages/toolchain-xtensa-linux_armv6l-2.tar.gz with fake package.json info into my packages directory. This package seems to be correct and I could compile the blink sample.

typo

should be

platformio platforms install https://github.com/platformio/platform-espressif/archive/develop.zip

not

platformio platform install https://github.com/platformio/platform-espressif/archive/develop.zip

even then the url doesn't work.

Support HTTP Upload in a simple way

I use PlatformIO to develop hobby projects with the espressive8266 platform / huzzah board. There are situations where the ArduinoOTA upload method is unusable*, so i'd like PlatformIO to support http as a hex upload port.

Currently I have a shell script which contains:

platformio run
curl -v -F "[email protected]/huzzah/firmware.bin" http://doorbell-11a251.local/update
echo

and I use this to do uploads, instead of the cmd+u shortcut in these projects. The extra_script method was too confusing to add support with the weird way the form argument is specified to curl.

I think this would be generally useful for other platforms. I could imagine it being really useful for people modifying firmwares on network routers and things like that, which usually use a http form for firmware upgrades. It could also be useful for upgrading devices on different subnets or even over cellular link. I propose the following:

the standard uploader should be modified so when upload_port begins with http:// or https://, it invokes curl in verbose mode and does a http post as above. A platformio.ini config file working in this mode would look like:

[env:huzzah]
platform=espressif8266
framework=arduino
board=huzzah
upload_port=http://192.168.1.20/update

* ArduinoOTA can become unusable if you're using UDP for other stuff. The Arduino UDP library isn't great at supporting multiple concurrent services on different ports.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41040733-support-http-upload-in-a-simple-way?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

SparkFun L6470 AutoDriver_ID1300 not compiling

works fine for Arduino uno but with the Espressif
[env:esp12e] platform = espressif8266 board = esp12e framework = arduino
It gives .piolibdeps/SparkFun L6470 AutoDriver_ID1300/src/SparkFunAutoDriverSupport.cpp:323:40: error: no matching function for call to 'SPIClass::transfer(byte [(((sizetype)(((ssizetype)AutoDriver::_numBoards) + -1)) + 1)], int&)'

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41757613-sparkfun-l6470-autodriver_id1300-not-compiling?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

Builder script hardcoding upload address

When trying to compile a native project without the use of Arduino framework BUT with the preconfigured loader script esp8266.flash.4m1m.ld, the uploaded application crashed. Later, it was determined that this loader script, processed normally when Arduino framework is in place (where irom0 code is loaded AND uploaded to flash address 0x40201010), was mistakenly uploaded to 0x40240000 with the builder.

This behavior caused inability for ESP8266 to boot from the expected address (0x01010), because the actual program was located at 0x40000.

builder/main.py, lines 299-308:

     UPLOADERFLAGS=[
            "-vv",
            "-cd", "$UPLOAD_RESETMETHOD",
            "-cb", "$UPLOAD_SPEED",
            "-cp", '"$UPLOAD_PORT"',
            "-ca", "0x00000",
            "-cf", "${SOURCES[0]}",
            "-ca", "0x40000",
            "-cf", "${SOURCES[1]}"
        ],

It seems like the builder assumes eagle.app.v6.ld in use (default setting for bare metal ESP8266), which indeed maps from0_0_seg at 0x40000. However, the "eagle" loaders packed with the toolchain has no support for 4MB flash memory.

Could anyone inspire me on how to fix such a problem?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41266198-builder-script-hardcoding-upload-address?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

mkspiffs outdated - breaks staging!

Staging updated SPIFFS to 0.3.7 which is not compatible with the tool mkspiffs that is currently deployed

tool-mkspiffs @ 1.102.0 [Up-to-date]

As a result now there is a terrible condition that mkspiffs is breaking the SPIFFS from staging rendering it unusable.
Please update the tool-mkspiffs.

ENV PROGNAME can't be overriden

I was redirected here from platformio/platformio-core/issues/1090

What kind of issue is this?

  • [x ] PlatformIO Core. If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system:
win10 64bit

PlatformIO Version (platformio --version):
3.5.0a16

Description of problem

Followed guidance from https://community.platformio.org/t/rename-bin-file-on-build/2390

Nevertheless, the file name does not change from "firmware.bin"

Steps to Reproduce

  1. add platform.ini extra_scripts = extra_script.py
  2. edit extra_script.py
Import("env")
build_tag = "v2.2"
env.Replace(PROGNAME="test%s" % build_tag)
print env['PROGNAME'] 
  1. Prints out testv2.2

Actual Results

Prints out testv2.2
but firmware filename stays "firmware.bin"

testv22
Linking .pioenvs\nodemcuv2\firmware.elf
Calculating size .pioenvs\nodemcuv2\firmware.elf
Building .pioenvs\nodemcuv2\firmware.bin

Expected Results

filename should be "testv2.2.bin"

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
extra_scripts = extra_script.py

The content of extra_script.py:

Import("env")

build_tag = "v22"

env.Replace(PROGNAME="test%s" % build_tag)
print env['PROGNAME'] 

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ESP8266 RTOS SDK

Moved from platformio/platformio-core#402

/cc @andriyadi

I'm about to adopt ESP8266 native SDK, and since my use cases require parallelism, it would be great to adopt RTOS SDK. I've found this project, ESP-OPEN-RTOS, somehow better than the official Espressif's.

Would it be possible to support this kind of SDK into Platformio?

Thanks in advance. Have a great holiday guys!

LD scripts fail

Just upgraded to version PlatformIO, version 3.4.0b10

Now get failure on building

Error: Could not find 'esp8266.flash.4m.ld' LD script in LDPATH '/Users/amelvin/.platformio/packages/framework-arduinoespressif8266@src-e093741c24b1f814060be0cac08f8093/tools/sdk/lib /Users/amelvin/.platformio/packages/framework-arduinoespressif8266@src-e093741c24b1f814060be0cac08f8093/tools/sdk/ld /Users/amelvin/.platformio/packages/framework-arduinoespressif8266@src-e093741c24b1f814060be0cac08f8093/tools/sdk/libc/xtensa-lx106-elf/lib /Users/amelvin/git/MySONOFF/.pioenvs/debug'

using this in PIO as board definition

[env:debugsonoff]

platform = espressif8266_stage
framework = arduino
board = esp12e
build_flags = -Wl,-Tesp8266.flash.4m.ld-DDEBUG_CODE=Serial -DMY_SETTINGS_FILE=\"/sonoff.json\"  
board_flash_mode = qio
board_f_cpu = 160000000L
board_f_flash = 80000000L
upload_port = 192.168.1.151 ; square
;upload_port = /dev/cu.Repleo*
;upload_speed = 460800
lib_deps = ArduinoJson, ESPAsyncTCP, ESPAsyncWebServer, AsyncMqttClient, Bounce2

Changing to build_flags = -Wl,-Teagle.flash.4m.ld fixes the issue

outdated to Arduino

First of all great work done here!

I need SDK 2.0 for WPA2, but it seems that the platform is outdated against Arduino ESP8266 which is based on SDK 2.0 in meantime?

Can this be upgraded?
Thanks!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ELF conversion and flashing is currently broken

I discovered that scripts doesn't properly support other linker maps than stock one. According to https://espressif.com/en/support/explore/get-started/esp8266/getting-started-guide because I use modules with 4M memory I adjusted linker script to have irom section starting at 0x40210000. Thus converting should yield two files flashable at adresseses 0x00000 and 0x10000. As far I undestand scons build scripts build process is designed for creating two image files for adresseses 0x00000 and 0x40000. Am I right? How this can be fixed?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

unable to upload SPIFFS

After using espressif8266_stage instead of espressif8266, and upgrading Platformio from 3.0 to 3.4, I am unable to run platformio --target uploadfs successfully. The single output from the command is:
Error: Could not find LD script

platformio run and platformio run -t upload are working.

Observed this only with espressif8266_stage, espressif8266 uploads SPIFFS image without a problem.

Faster flashing for ESP8266 (and CC3200) boards

Moved from platformio/platformio-core#592

/cc @georgkreimer, @nzbuu, @Jorgen-VikingGod, @georgkreimer, @eni23


Flashing of the ESP8266 boards takes a while. Anybody who has flashed some of them noticed it's about a minute. I saw this post blog today. Those guys at Cesanta Software have created a modified version of the esptool but also have another flash tool called Flash'N'Chips which reduces the flash times significantly. It would be great to have the flash time reduced for PlatformIO using these 2 options.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39567661-faster-flashing-for-esp8266-and-cc3200-boards?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

ERROR warning: can't read source directory

I tried everything but i'm not able to upload spiffs to my esp12e, any help would be appreciated

also reinstalled Platformio core and still not working

PS C:\Users\Michael\Documents\PlatformIO\Projects\170906-221237-nodemcuv2> platformio run -t uploadfs[09/13/17 01:23:43] Processing nodemcuv2 (data_dir : C:\Users\Michael\Documents\PlatformIO\Projects\170906-221237-nodemcuv2\src\data; build_flags: -Wl,-Teagle.flash.4m1m.ld; platform: espressif8266_stag e; upload_speed: 9600; board: nodemcuv2; framework: arduino; upload_resetmethod: ck; board_flash_mode: dio; board_f_flash: (80000000L)
------------------------------------------------------------------------------------------------------------------------------------------------------ Detected non-PlatformIO data_dir option in [env:nodemcuv2] section Verbose mode can be enabled via -v, --verbose option Building SPIFFS image from 'data' directory to .pioenvs\nodemcuv2\spiffs.bin warning: can't read source directory *** [.pioenvs\nodemcuv2\spiffs.bin] Error 1 ============================================================= [ERROR] Took 0.68 seconds =============================================================


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Problem with compiled code

Hi,

I'm trying to compile simple code using WiFiManager.
Unfortunatelly output on terminal seems corrupted, displaying 'Serial.println' which shouldn't be displayed.

platform.ini
[env:esp12e] platform = espressif8266 board = esp12e framework = arduino lib_deps = [email protected]

EntryPoint.cpp
`
#define PROGRAM_NAME "cESPDummy"

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <ESP8266mDNS.h>

#include "WiFiManager.h"

void configModeCallback (WiFiManager *myWiFiManager) {
Serial.println("Entered config mode");
Serial.println(WiFi.softAPIP());

Serial.println(myWiFiManager->getConfigPortalSSID());
}

void setup()
{
Serial.begin(115200);
Serial.println();

Serial.println("Connecting WiFi...");
WiFiManager wifiManager;
if (!wifiManager.autoConnect(PROGRAM_NAME))//, "AP-PASSWORD"))
{
Serial.println("ERROR: Connection failed! Restarting to repeat attempt.");
delay(3000);
ESP.reset();
delay(5000);
}

//led_fill(0, 0, bStartBrightness);
Serial.println();

Serial.println("IP      : " + WiFi.localIP());
Serial.println("NetMask : " + WiFi.subnetMask());
Serial.println("RSSI    : " + WiFi.RSSI());

}

void loop()
{
Serial.print(".");
delay(1000);
}
`

Terminal Output
`
Connecting WiFi...
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 192.168.1.177

F

R: Connection failed! Restarting to repeat attempt.
Setup Done!
Loop!
Loop!
Loop!
Loop!
Loop!
Loop!
Loop!
Loop!
`

board esp12e doesn't support esp8266-rtos-sdk framework

Got an error when triyng to compile the example provided in the rtos SDK.

--- message: ---

Error: This board doesn't support esp8266-rtos-sdk framework!

========================== [ERROR] Took 0.77 seconds ==========================

--- file: platformio.ini: ---
[env:esp012]
platform = espressif8266
board = esp12e
framework = esp8266-rtos-sdk


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Failures in esptool(1)

The actual esptool(1) may be defective, when used on a modern Amica (AI-Thinker ESP-14) NodeMCU R2 platform:

user@host:~/.platformio/packages/tool-esptool$ ./esptool -v
esptool v0.4.9 - (c) 2014 Ch. Klippel <[email protected]>

user@host:~/.platformio/packages/tool-esptool$ ./esptool -vv -cd nodemcu -cb 115200 -cp /dev/ttyUSB0 -cf $HOME/platformio/esplatest/.pioenvs/nodemcuv2/firmware.bin
esptool v0.4.9 - (c) 2014 Ch. Klippel <[email protected]>
        setting board to nodemcu
        setting baudrate from 115200 to 115200
        setting port from /dev/ttyUSB0 to /dev/ttyUSB0
        espcomm_upload_file
        espcomm_upload_mem
opening port /dev/ttyUSB0 at 115200
        tcgetattr
        tcsetattr
        serial open
opening bootloader
resetting board
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
resetting board
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
resetting board
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
user@host:~/.platformio/packages/tool-esptool$

Please give constructive advice, if this is a user error. Thanks!

Support for Sming ESP8266 framework

Moved from platformio/platformio-core#398

/cc @itsjustvenky, @chall3ng3r, @eerimoq, @kireevco, @voyo, @robotiko, @chriscohnen, @phuonglm, @direvius


@SmingHub is open Source framework for high efficiency native ESP8266 development

https://github.com/SmingHub/Sming

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39567971-support-for-sming-esp8266-framework?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

More descriptive memory report

Sming framework uses more descriptive format for memory usage:

   Section|                   Description| Start (hex)|   End (hex)|Used space
------------------------------------------------------------------------------
      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8394|     916
    rodata|           ReadOnly Data (RAM)|    3FFE83A0|    3FFE8C74|    2260
       bss|      Uninitialized Data (RAM)|    3FFE8C78|    3FFF0440|   30664
      text|            Cached Code (IRAM)|    40100000|    40106F85|   28549
irom0_text|           Uncached Code (SPI)|    40201010|    40237153|  221507
Total Used RAM : 33840
Free RAM : 48080
Free IRam : 4237

This is done by script https://github.com/SmingHub/Sming/blob/develop/tools/memanalyzer.py that uses xtensa-lx106-elf-objdump instead of xtensa-lx106-elf-size, it provides more details, specially IRAM left where ISR code is located. It would be nice to have such detailed report after build finishes.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mkspiffs ignoring custom flash layout

I'm having a funny issue where mkspiffs is ignoring my custom defined flash layout. I'm working on an esp01 a like board with 1M flash and want to specify 64k spiffs so i can retain OTA updates.

Running platformio run --target uploadfs
results in it trying to upload a 256k spiffs.bin despite me having specified

[env:esp12e]
platform = espressif8266
framework = arduino
board = esp01_1m

upload_port = /dev/tty.SLAB_USBtoUART
build_flags = -Wl,-Tesp8266.flash.1m64.ld

running with verbose is showing:

$ platformio run -v --target uploadfs
[Tue Oct  4 20:40:06 2016] Processing esp12e (platform: espressif8266, build_flags: -Wl,-Tesp8266.flash.1m64.ld, upload_port: /dev/tty.SLAB_USBtoUART, board: esp01_1m, framework: arduino)
---------------------------------------------------------------------------------------------------------
"mkspiffs" -c data -p 256 -b 4096 -s 262144 .pioenvs/esp12e/spiffs.bin
/homie/ui_bundle.gz

-s 262144 would appear to be the wrong value.

I can make this work if i run mkspiffs manually, and specify the correct spiffs_start with esptool.

This has been working just fine up to now, so im not sure if this an issue in platformio 3.1 or a recent update to the espressif platform, or some configuration issue at my end?

Can't uploadfs

Hello and thanks for the great tools!

I have some files in the data directory, which I want to upload as SPIFFS to an ESP8266-12 (nodemcuv2 with 4MB SPI flash). pio run -t buildfs works and the resulting .spiffs file is 1028096 bytes long.

Code compiles fine:

$ pio run -v
[Tue Aug 22 21:45:50 2017] Processing nodemcuv2 (monitor_baud: 115200; platform: espressif8266; board: nodemcuv2; framework: esp8266-rtos-sdk)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Detected non-PlatformIO `monitor_baud` option in `[env:nodemcuv2]` section
Collected 1 compatible libraries
Looking for dependencies...
Library Dependency Graph
|-- <i2s> (/Users/javi/V/DEV/esp8266-c64-tape-emulator/firmware/lib/i2s)
xtensa-lx106-elf-size -B -d .pioenvs/nodemcuv2/firmware.elf
text	   data	    bss	    dec	    hex	filename
277214	   2126	  27352	 306692	  4ae04	.pioenvs/nodemcuv2/firmware.elf
========================================================================== [SUCCESS] Took 1.48 seconds ==========================================================================

But, when trying to upload I get this error:

$ pio run -t uploadfs
[Tue Aug 22 21:46:26 2017] Processing nodemcuv2 (monitor_baud: 115200; platform: espressif8266; board: nodemcuv2; framework: esp8266-rtos-sdk)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Detected non-PlatformIO `monitor_baud` option in `[env:nodemcuv2]` section
Verbose mode can be enabled via `-v, --verbose` option
*** [uploadfs] IndexError `list index out of range' trying to evaluate `${SOURCES[1]}'
=========================================================================== [ERROR] Took 0.90 seconds ===========================================================================

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

JerryScript on the ESP8266

I've been trying to use platformio to compile JerryScript as a library on the ESP8266.

I cloned JerryScript in to the lib folder and it can't find the "jerry-api.h".

I'm using the Arduino framework and I've also tried ESP8266 staging.

I've attempted other JavaScript interpreters like v7 and duktape and haven't got very far either.

Please update ESP8266 Arduino framework soon

Hello there,

Please upgrade ESP8266 Arduino framework mirror soon, as the main upstream project repo (https://github.com/esp8266/Arduino) has fixed some bugs, updated some SDK APIs and it's useful for developments.

If you are not convenient to update, could you please tell me how to create my own mirror/fork so that I can use the newest code. Thanks.

Thanks and Regards,
Jackson

The board is not supported although it is listed as such

The board esp01_1m is not supported by framework Simba, although it is listed in supported boards at http://docs.platformio.org/en/latest/frameworks/simba.html#espressif.
Here's the platformio.ini file:

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = simba
upload_resetmethod = ck

The error during build is:

ValueError: BOARD esp01_1m is not supported by Simba.:
File "C:.pioidepenv\lib\site-packages\platformio\builder\main.py", line 147:
env.SConscript("$BUILD_SCRIPT")
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 250:
exec file in call_stack[-1].globals
File "C:.platformio\platforms\espressif8266\builder\main.py", line 347:
target_elf = env.BuildProgram()
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:.pioidepenv\lib\site-packages\platformio\builder\tools\platformio.py", line 56:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:.pioidepenv\lib\site-packages\platformio\builder\tools\platformio.py", line 258:
SConscript(env.GetFrameworkScript(f))
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 604:
return method(*args, **kw)
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 250:
exec file in call_stack[-1].globals
File "C:.platformio\platforms\espressif8266\builder\frameworks\simba.py", line 58:
[env.subst(join("$PLATFORMFW_DIR", "make", "platformio.sconscript"))])
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 604:
return method(*args, **kw)
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py", line 250:
exec file in call_stack[-1].globals
File "C:.platformio\packages\framework-simba\make\platformio.sconscript", line 3838:
raise ValueError("BOARD {} is not supported by Simba.".format(board))
[ERROR] Took 1.84 seconds


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

section '.text' will not fit in region 'iram1_0_seg'

What kind of issue is this?
[x ] PlatformIO Core. If you’ve found a bug, please provide an information below.

I am not sure if it is bug... I have found this link esp8266/Arduino#1582 but I am not able to solve this problem in Platformio... Arduino IDE builds without any problem... Please help if possible

Configuration
Operating system: W10

PlatformIO Version (platformio --version):
CLI 3.0.1, IDE 1.5.0 (Atom)

Description of problem
I cannot build simple programm with library....

Steps to Reproduce
pio run

Actual Results
... see the attached picture

Expected Results
... simple build

If problems with PlatformIO Build System:
The content of platformio.ini:

[env:d1_mini]
platform = espressif8266
framework = arduino
board = d1_mini

Source file to reproduce issue:
used library https://github.com/sumotoy/TFT_ILI9163C/tree/Pre-Release-1.0p7
main programm ... basicSetup.ino

#include <SPI.h>
#include <TFT_ILI9163C.h>

#define __CS  0   //(D3) ... fp
#define __DC  5   //(D1)
#define __RST 4   //(D2)
/*
 SCLK:D5
 MOSI:D7
*/

TFT_ILI9163C tft = TFT_ILI9163C(__CS, __DC, __RST);

void setup() {
  tft.begin();
  tft.print("Hello World!");
}

void loop(void) {
}

Additional info

err_text not fit in region iram1_0_seg

Add WeMos D1 mini pro

Please add support for WeMos D1 mini pro (16 MBytes)
https://www.wemos.cc/product/d1-mini-pro.html

(Moved my wish on behalf of ivankravets from platformio/platformio-core#798 - hope I got the right place now.)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38047911-add-wemos-d1-mini-pro?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

Can't Install Staging Version

I am having a problem installing staging version:

platformio --version
PlatformIO, version 3.3.0a1
platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage
PlatformManager: Installing platform-espressif8266
git version 2.11.0.windows.1
Cloning into 'C:\Users\Owner\.platformio\platforms\installing-lnxoe5-package'...
fatal: https://github.com/platformio/platform-espressif8266.git#feature/stage/info/refs not valid: is this a git repository?

xtensa toolchain path not set properly

Hi there, I'm sorry if that's not the right place to post...

I just installed platformio-ide to do some development with an esp8266, namely the WeMos D1 mini board using the arduino framework. However, the initialization step does not seem to properly set the xtensa toolchain path... Everytime I hit ctrl-s to save/build, an error message displays telling me that:

'xtensa-lx106-elf-g++' is not recognized as an internal or external command,
operable program or batch file.
'xtensa-lx106-elf-ar' is not recognized as an internal or external command,
operable program or batch file.

If I open a platformio terminal window from within the IDE (Atom) and manually set the path to the toolchain bin directory (located in %USERPROFILE%.platformio\packages\toolchain-xtensa\bin since I am on Windows...), it does the trick, but for that terminal window only. I mean that, from that terminal window, I can do platformio run just fine and the build will run properly.

I don't know if its really a bug or just a misconfiguration, nor if it is only on windows...

function as parameter -> "was not declared in this scope"

Hi all,

I have a problem with an Arduino Sketch for a NodeMCU (esp8266) board.

It compiles on the Arduino IDE and everything works fine, but when I try to build it in platform.io,
I get this error:

....: error: 'callback' was not declared in this scope

void setup() {
client.set_callback(callback);
}

void callback(const MQTT::Publish& pub) {
...
}

Any idea what might be causing this?
If I change the callback function params, it seems to accept the declaration but then an error is thrown regarding wrong function params.

BR
Daniel

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39280254-function-as-parameter-was-not-declared-in-this-scope?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

PackageManager: Installing tool-mkspiffs @ ~1.200.0 Error: Could not find a version that satisfies the requirement '~1.200.0' for your system 'windows_amd64'

After this commit bfd2397 I cannot build software for nodemcuv2 using feature/stage.

Got this error:

PackageManager: Installing tool-mkspiffs @ ~1.200.0
Error: Could not find a version that satisfies the requirement '~1.200.0' for your system 'windows_amd64'

I can handle this temporary by set platform to one commit before in platformio.ini:

platform = https://github.com/platformio/platform-espressif8266.git#3c7d5ab5ce959adb50e859aab485b3928082a0da

ESP8266WiFi has missing requirement in current platform-espressif8266 packages

tools directory out of sync with package ESP8266WiFi in framework-arduinoespressif8266`.

When trying to use ESP8266WiFi.h it complains about missing WPS_CB_ST_UNK that is supposed to be declared in tools/sdk/include/user_interface.h.

The problem seems like the platform definition is :

    "framework-arduinoespressif8266": {
      "type": "framework",
      "optional": true,
      "version": "~1.20300.1"
    },

But it would require https://github.com/platformio/framework-arduinoespressif8266/commit/db5e20f23770e1be307348633dc497f689493996, or 1.204 ? Not sure since when that framework has been packaged, but at the time that constant has been added, there was no package.json, that might explain it.

Anyway, fetching master fixes the issue but it took me a while to figure out what was wrong

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40617860-esp8266wifi-has-missing-requirement-in-current-platform-espressif8266-packages?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

upload_port does not support FQDN for OTA target

Attempting to specify an upload_port for OTA that is a fully qualified domain name, for example esp8266-1bda0b.lan incorrectly invokes the serial port uploader.

Looking for upload port...
Use manually specified: "esp8266-1bda0b.lan"
Uploading .pioenvs\nodemcuv2\firmware.bin
error: Failed to open esp8266-1bda0b.lan
error: espcomm_open failed
error: espcomm_upload_mem failed

The only way I see to ensure the OTA espota.py is invoked is for the upload_port to end with .local. There is a RegEx in main.py

r"\"?((([0-9]{1,3}\.){3}[0-9]{1,3})|.+\.local)\"?$",
that seems to be the culprit.

Please provide a way to specify an upload_port that is a valid and resolvable network endpoint that does not cause the serial port uploader to be invoked.

staging out of sync

Compiling with stage gives new compile error..
due to this commit esp8266/Arduino@93413ef

➜  piotest pio run -e stage

[Wed Mar  8 22:36:30 2017] Processing stage (build_flags: -Wl,-Tesp8266.flash.4m.ld, lib_deps: ArduinoJson, ESPAsyncTCP, ESPAsyncWebServer, board_f_cpu: 160000000L, platform: espressif8266_stage, upload_speed: 921600, board: esp12e, framework: arduino, board_flash_mode: qio, upload_port: /dev/cu.wchusbserial1460, board_f_flash: 80000000L)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Converting test.ino
Collected 32 compatible libraries
Looking for dependencies...
Library Dependency Graph
|-- <ArduinoJson> v5.8.3
|-- <ESPAsyncTCP> v1.0.1
|   |-- <ESP8266WiFi> v1.0
|-- <ESPAsyncWebServer>
|   |-- <ESPAsyncTCP> v1.0.1
|   |   |-- <ESP8266WiFi> v1.0
|   |-- <ESP8266WiFi> v1.0
|   |-- <ArduinoJson> v5.8.3
|   |-- <Hash> v1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> v1.0
|-- <ESP8266WiFi> v1.0
|-- <Hash> v1.0
|-- <ArduinoOTA> v1.0
|   |-- <ESP8266WiFi> v1.0
|   |-- <ESP8266mDNS>
|   |   |-- <ESP8266WiFi> v1.0
Compiling .pioenvs/stage/src/test.ino.o
Archiving .pioenvs/stage/libFrameworkArduino.a
Indexing .pioenvs/stage/libFrameworkArduino.a
Compiling .pioenvs/stage/lib/ESP8266WiFi/ESP8266WiFiScan.o
Compiling .pioenvs/stage/lib/ESP8266WiFi/WiFiUdp.o
Compiling .pioenvs/stage/lib/ESPAsyncTCP_ID305/AsyncPrinter.o
Compiling .pioenvs/stage/lib/ESPAsyncTCP_ID305/ESPAsyncTCP.o
Compiling .pioenvs/stage/lib/ESPAsyncTCP_ID305/ESPAsyncTCPbuffer.o
Compiling .pioenvs/stage/lib/ESPAsyncTCP_ID305/SyncClient.o
Compiling .pioenvs/stage/lib/ESPAsyncTCP_ID305/tcp_axtls.o
Compiling .pioenvs/stage/lib/Hash/Hash.o
Compiling .pioenvs/stage/lib/Hash/sha1/sha1.o
/Users/amelvin/git/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp: In static member function 'static void ESP8266WiFiScanClass::_scanDone(void*, int)':
/Users/amelvin/git/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp:297:41: error: cannot convert 'bss_info::<anonymous struct>' to 'bss_info*' in assignment
for(bss_info* it = head; it; it = it->next, ++i)
^
/Users/amelvin/git/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFiScan.cpp:305:45: error: cannot convert 'bss_info::<anonymous struct>' to 'bss_info*' in assignment
for(bss_info* it = head; it; it = it->next, ++i) {
^
*** [.pioenvs/stage/lib/ESP8266WiFi/ESP8266WiFiScan.o] Error 1
================================================================================ [ERROR] Took 2.51 seconds ================================================================================

======================================================================================== [SUMMARY] ========================================================================================
Environment default    [SKIP]
Environment stage      [ERROR]
================================================================================ [ERROR] Took 2.51 seconds ================================================================================

not downloaded: unknown package

after import show error:
PlatformIO: Failed to import an Arduino IDE project!
Error: Detected unknown package 'espressif8266_stage'

target uploadfs

After last update to espressif 1.1.0 uploadfs target fault:

`gallochri@mediacenter:~/dev/gallNFC> pio run --target uploadfs

[Tue Oct 4 13:06:42 2016] Processing esp12e (platform: espressif8266, lib_install: 28,63,64, upload_speed: 460800, board: d1_mini, framework: arduino)

PackageManager: Installing tool-mkspiffs @ ~1.102.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
tool-mkspiffs @ 1.102.0 has been successfully installed!
Verbose mode can be enabled via -v, --verbose option
TypeError: coercing to Unicode: need string or buffer, NoneType found:
File "/usr/lib/python2.7/site-packages/platformio/builder/main.py", line 134:
env.SConscript("$BUILD_SCRIPT")
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, _files, *_subst_kw)
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 260:
exec file in call_stack[-1].globals
File "/home/gallochri/.platformio/platforms/espressif8266/builder/main.py", line 327:
join("$BUILD_DIR", "spiffs"), "$PROJECTDATA_DIR")
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 260:
return MethodWrapper.call(self, target, source, _args, *_kw)
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(_nargs, *_kwargs)
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Builder.py", line 626:
return self._execute(env, target, source, OverrideWarner(kw), ekw)
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Builder.py", line 547:
tlist, slist = self._create_nodes(env, target, source)
File "/home/gallochri/.platformio/packages/tool-scons/script/../engine/SCons/Builder.py", line 511:
target, source = self.emitter(target=tlist, source=slist, env=env)
File "/home/gallochri/.platformio/platforms/espressif8266/builder/main.py", line 161:
with open(env.GetActualLDScript()) as f:
========================================================================================================================= [ERROR] Took 0.84 seconds =========================================================================================================================`

`#include <ESP8266WiFi.h>` in library results in "No such file or directory"

I'm running platformio 3.2.1 on OS X.

When choosing the nodemcuv2 board and attempting to include the ESP8266WiFi.h header file in a file in the lib/ directory, I consistently get "ESP8266WiFi.h: No such file or directory".

This is alleviated by including the ESP8266WiFi.h header file in a file in the src/ directory, but it seems like it should be able to work regardless.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40492052-include-esp8266wifi-h-in-library-results-in-no-such-file-or-directory?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38211776&utm_medium=issues&utm_source=github).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.