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

Use current head of ESP8266 Arduino #401

Closed
sticilface opened this Issue Dec 23, 2015 · 21 comments

Comments

Projects
None yet
6 participants
@sticilface
Contributor

sticilface commented Dec 23, 2015

Is there a way to use the current head from
https://github.com/esp8266/Arduino

see here for my issues trying to do this (Posted in the wrong thread by mistake)
#366 (comment)

Dropping in the latest code compiles but does not link correctly.


Current working instruction #401 (comment)

Edited by @ivankravets


@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Dec 23, 2015

Member

I want to note that we don't support ALPHA/BETA/STAGE or other development software because could spent spare time only the ONE framework or platform. However, I'll give a few hints which should allow you to use latest ESP8266 for Arduino.

Updated: http://docs.platformio.org/en/latest/platforms/espressif.html#using-arduino-framework-with-staging-version

Member

ivankravets commented Dec 23, 2015

I want to note that we don't support ALPHA/BETA/STAGE or other development software because could spent spare time only the ONE framework or platform. However, I'll give a few hints which should allow you to use latest ESP8266 for Arduino.

Updated: http://docs.platformio.org/en/latest/platforms/espressif.html#using-arduino-framework-with-staging-version

@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Dec 23, 2015

Contributor

Many thanks :)

I've done all these.. actions.. I will provide what you need....

Arduino Output http://pastebin.com/6cKrVnKS
PlatformIO Output http://pastebin.com/Tr1cQv8F

It fails at the linking stage, right at the end!

compiling any sketch produces it.. The one I use us
http://pastebin.com/QtfTWEsT

Your help is much appreciated... and I know others will be helped too. The IDE moves at such a pace at the moment... but i do understand that you can't support it!

Contributor

sticilface commented Dec 23, 2015

Many thanks :)

I've done all these.. actions.. I will provide what you need....

Arduino Output http://pastebin.com/6cKrVnKS
PlatformIO Output http://pastebin.com/Tr1cQv8F

It fails at the linking stage, right at the end!

compiling any sketch produces it.. The one I use us
http://pastebin.com/QtfTWEsT

Your help is much appreciated... and I know others will be helped too. The IDE moves at such a pace at the moment... but i do understand that you can't support it!

@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Dec 23, 2015

Contributor

I should add that this is option 4. compile with Arduino IDE, but not with PlatformIO.

Contributor

sticilface commented Dec 23, 2015

I should add that this is option 4. compile with Arduino IDE, but not with PlatformIO.

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Dec 23, 2015

Member

Try to find difference between

Arduino IDE
-lm -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh

PlatformIO
-lsmartconfig -lpp -lmain -lwpa -llwip -lnet80211 -lwps -lcrypto -lphy -lhal -laxtls -lgcc -lm 

:)

build_flags should help you.

Member

ivankravets commented Dec 23, 2015

Try to find difference between

Arduino IDE
-lm -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh

PlatformIO
-lsmartconfig -lpp -lmain -lwpa -llwip -lnet80211 -lwps -lcrypto -lphy -lhal -laxtls -lgcc -lm 

:)

build_flags should help you.

@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Dec 23, 2015

Contributor

Even with my PhD I spotted that one. So far though my attempts at build_flags has failed:(

I've added -lmesh to lots of the options but it still fails. I'm a beginner! Never used anything apart from arduino IDE... Another clue please...

Contributor

sticilface commented Dec 23, 2015

Even with my PhD I spotted that one. So far though my attempts at build_flags has failed:(

I've added -lmesh to lots of the options but it still fails. I'm a beginner! Never used anything apart from arduino IDE... Another clue please...

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Dec 23, 2015

Member

Don't make any modifications to your projects. The problem is in LD script. I've just created separated branch with LD scripts. Please use it https://github.com/platformio/platformio-pkg-ldscripts/tree/esp8266_stage

Member

ivankravets commented Dec 23, 2015

Don't make any modifications to your projects. The problem is in LD script. I've just created separated branch with LD scripts. Please use it https://github.com/platformio/platformio-pkg-ldscripts/tree/esp8266_stage

@ivankravets ivankravets self-assigned this Dec 23, 2015

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Dec 23, 2015

Member

I updated comment #401 (comment)

Member

ivankravets commented Dec 23, 2015

I updated comment #401 (comment)

@sticilface

This comment has been minimized.

Show comment
Hide comment
@sticilface

sticilface Dec 24, 2015

Contributor

That worked purrrrfectly. Thank you

Contributor

sticilface commented Dec 24, 2015

That worked purrrrfectly. Thank you

@donnib

This comment has been minimized.

Show comment
Hide comment
@donnib

donnib Jan 15, 2016

@ivankravets I am trying to build my project using latest code from Arduino/ESP8266 and by following your guide above i can build but the board keeps on rebooting, i tried Arduino IDE with the same code and it works there so i guess maybe there is a problem with the flashing ? I know you said you don't support these versions so if you have an idea that would be good to hear if not i will see what i can do.

donnib commented Jan 15, 2016

@ivankravets I am trying to build my project using latest code from Arduino/ESP8266 and by following your guide above i can build but the board keeps on rebooting, i tried Arduino IDE with the same code and it works there so i guess maybe there is a problem with the flashing ? I know you said you don't support these versions so if you have an idea that would be good to hear if not i will see what i can do.

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Jan 15, 2016

Member

@donnib please follow to step 5 here #401 (comment)

Member

ivankravets commented Jan 15, 2016

@donnib please follow to step 5 here #401 (comment)

@donnib

This comment has been minimized.

Show comment
Hide comment
@donnib

donnib Jan 17, 2016

@ivankravets ok so here it is
https://gist.github.com/donnib/8b5ecff157a7cf129daf

I have posted the code used I have also pasted the console output from PlatformIO and ArduinoIDE. I have also pasted the bin files as links to dropbox at the bottom of the Gist paste. Let me know of you need more ?

donnib commented Jan 17, 2016

@ivankravets ok so here it is
https://gist.github.com/donnib/8b5ecff157a7cf129daf

I have posted the code used I have also pasted the console output from PlatformIO and ArduinoIDE. I have also pasted the bin files as links to dropbox at the bottom of the Gist paste. Let me know of you need more ?

@valeros

This comment has been minimized.

Show comment
Hide comment
@valeros

valeros Jan 18, 2016

Member

Hi @donnib
I've just tested latest ESP8266 framework with my esp01 board.
Our example wifi-scan works without any errors.
Serial output from your sketch:

Reason for reboot 0
I am in setup...
We just been booted first time so disable WiFi to lower power usage
rtc = 0
Member

valeros commented Jan 18, 2016

Hi @donnib
I've just tested latest ESP8266 framework with my esp01 board.
Our example wifi-scan works without any errors.
Serial output from your sketch:

Reason for reboot 0
I am in setup...
We just been booted first time so disable WiFi to lower power usage
rtc = 0
@donnib

This comment has been minimized.

Show comment
Hide comment
@donnib

donnib Jan 18, 2016

@valeros thx well that's weird. I guess i must be doing something wrong then....hmmm. i wonder what that could be. Any ideas ? Just for the sake of clarity you took tip of the master from https://github.com/esp8266/Arduino right ?

donnib commented Jan 18, 2016

@valeros thx well that's weird. I guess i must be doing something wrong then....hmmm. i wonder what that could be. Any ideas ? Just for the sake of clarity you took tip of the master from https://github.com/esp8266/Arduino right ?

@valeros

This comment has been minimized.

Show comment
Hide comment
@valeros

valeros Jan 18, 2016

Member

@donnib Yes, latest master branch https://github.com/esp8266/Arduino/archive/master.zip
Could you try to upload simple wifi-scan example?

Member

valeros commented Jan 18, 2016

@donnib Yes, latest master branch https://github.com/esp8266/Arduino/archive/master.zip
Could you try to upload simple wifi-scan example?

@donnib

This comment has been minimized.

Show comment
Hide comment
@donnib

donnib Jan 18, 2016

@valeros yes i just tried and that worked fine but my code not. I have even tried to run on a different workstation so now i tried windows and MacOSX. Can it be some HW related thing ? Idk what that could be when it works in Arduino IDE

donnib commented Jan 18, 2016

@valeros yes i just tried and that worked fine but my code not. I have even tried to run on a different workstation so now i tried windows and MacOSX. Can it be some HW related thing ? Idk what that could be when it works in Arduino IDE

@valeros

This comment has been minimized.

Show comment
Hide comment
@valeros

valeros Jan 19, 2016

Member

@donnib According to your Arduino IDE build log the firmware was compiled for 40MHz frequency. Could you try latest develop version of PlatformIO and specify board_f_cpu=40000000L option in your platformio.ini?

Member

valeros commented Jan 19, 2016

@donnib According to your Arduino IDE build log the firmware was compiled for 40MHz frequency. Could you try latest develop version of PlatformIO and specify board_f_cpu=40000000L option in your platformio.ini?

@donnib

This comment has been minimized.

Show comment
Hide comment
@donnib

donnib Jan 20, 2016

@valeros ok so i did what you suggested. I uninstalled platformio as per the doc, installed dev, added the board_f_cpu line and then i flashed and wola it worked, i was curios so i removed the board line from the platform.ini, it still worked, hmmm. I then uninstalled dev platformio and installed stable and it still worked, now i don't understand what happened, what made it work ?

donnib commented Jan 20, 2016

@valeros ok so i did what you suggested. I uninstalled platformio as per the doc, installed dev, added the board_f_cpu line and then i flashed and wola it worked, i was curios so i removed the board line from the platform.ini, it still worked, hmmm. I then uninstalled dev platformio and installed stable and it still worked, now i don't understand what happened, what made it work ?

@coaxial

This comment has been minimized.

Show comment
Hide comment
@coaxial

coaxial Feb 20, 2016

Hi,

This code doesn't build with platformio following your instructions to use Arduino-git but it builds using the Arduino framework's git version with the Arduino IDE.

Problematic code: https://github.com/Coaxial/vintage-cec/tree/tmp/ws-build-issue
Platformio output:

$ make
platformio -f -c vim run
[Sat Feb 20 15:04:39 2016] Processing nodemcu (platform: espressif, lib_install: 549, board: nodemcu, framework: arduino)
-----------------------------------------------------------------------------------------------------
xtensa-lx106-elf-g++ -o .pioenvs/nodemcu/src/main.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=210 -DPLATFORMIO=020804 -I/Users/hfp/.platformio/packages/framework-arduinoespressif/tools/sdk/include -I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant -I.pioenvs/nodemcu/IRremoteESP8266 -I.pioenvs/nodemcu/WebSockets_ID549 src/main.cpp
xtensa-lx106-elf-ar rcs .pioenvs/nodemcu/libFrameworkArduino.a
xtensa-lx106-elf-ranlib .pioenvs/nodemcu/libFrameworkArduino.a
xtensa-lx106-elf-g++ -o .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=210 -I/Users/hfp/.platformio/packages/framework-arduinoespressif/tools/sdk/include -I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant -I.pioenvs/nodemcu/IRremoteESP8266 -I.pioenvs/nodemcu/WebSockets_ID549 .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.cpp
In file included from .pioenvs/nodemcu/FrameworkArduino/Arduino.h:38:0,
from .pioenvs/nodemcu/IRremoteESP8266/IRremoteInt.h:27,
from .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.cpp:29:
.pioenvs/nodemcu/FrameworkArduino/esp8266_peri.h:24:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
In file included from .pioenvs/nodemcu/FrameworkArduino/Arduino.h:38:0,
from src/main.cpp:1:
.pioenvs/nodemcu/FrameworkArduino/esp8266_peri.h:24:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
scons: *** [.pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.o] Error 1
scons: *** [.pioenvs/nodemcu/src/main.o] Error 1
==================================== [ ERROR ] Took 1.19 seconds ====================================
make: *** [all] Error 1

Arduino IDE output:


Sketch uses 241,676 bytes (23%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 33,761 bytes (41%) of dynamic memory, leaving 48,159 bytes for local variables. Maximum is 81,920 bytes.

coaxial commented Feb 20, 2016

Hi,

This code doesn't build with platformio following your instructions to use Arduino-git but it builds using the Arduino framework's git version with the Arduino IDE.

Problematic code: https://github.com/Coaxial/vintage-cec/tree/tmp/ws-build-issue
Platformio output:

$ make
platformio -f -c vim run
[Sat Feb 20 15:04:39 2016] Processing nodemcu (platform: espressif, lib_install: 549, board: nodemcu, framework: arduino)
-----------------------------------------------------------------------------------------------------
xtensa-lx106-elf-g++ -o .pioenvs/nodemcu/src/main.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=210 -DPLATFORMIO=020804 -I/Users/hfp/.platformio/packages/framework-arduinoespressif/tools/sdk/include -I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant -I.pioenvs/nodemcu/IRremoteESP8266 -I.pioenvs/nodemcu/WebSockets_ID549 src/main.cpp
xtensa-lx106-elf-ar rcs .pioenvs/nodemcu/libFrameworkArduino.a
xtensa-lx106-elf-ranlib .pioenvs/nodemcu/libFrameworkArduino.a
xtensa-lx106-elf-g++ -o .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=210 -I/Users/hfp/.platformio/packages/framework-arduinoespressif/tools/sdk/include -I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant -I.pioenvs/nodemcu/IRremoteESP8266 -I.pioenvs/nodemcu/WebSockets_ID549 .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.cpp
In file included from .pioenvs/nodemcu/FrameworkArduino/Arduino.h:38:0,
from .pioenvs/nodemcu/IRremoteESP8266/IRremoteInt.h:27,
from .pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.cpp:29:
.pioenvs/nodemcu/FrameworkArduino/esp8266_peri.h:24:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
In file included from .pioenvs/nodemcu/FrameworkArduino/Arduino.h:38:0,
from src/main.cpp:1:
.pioenvs/nodemcu/FrameworkArduino/esp8266_peri.h:24:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
scons: *** [.pioenvs/nodemcu/IRremoteESP8266/IRremoteESP8266.o] Error 1
scons: *** [.pioenvs/nodemcu/src/main.o] Error 1
==================================== [ ERROR ] Took 1.19 seconds ====================================
make: *** [all] Error 1

Arduino IDE output:


Sketch uses 241,676 bytes (23%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 33,761 bytes (41%) of dynamic memory, leaving 48,159 bytes for local variables. Maximum is 81,920 bytes.
@ivankravets

This comment has been minimized.

Show comment
Hide comment

@ivankravets ivankravets added this to the 2.8.5 milestone Mar 5, 2016

ivankravets added a commit that referenced this issue Mar 7, 2016

@majklovec

This comment has been minimized.

Show comment
Hide comment
@majklovec

majklovec Aug 31, 2016

After going through your steps. The first run is compiled ok. But the second run of pio run "updates" to the last stable version

Is there any way to deny the update?

majklovec commented Aug 31, 2016

After going through your steps. The first run is compiled ok. But the second run of pio run "updates" to the last stable version

Is there any way to deny the update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment