Majubs
May 31, 2019, 8:29pm
#1
Hi,
I’m trying to move my project from Arduino IDE to PlatoformIO, but I’m having some trouble. It’s for a NodeMCUv2 board. It compiles and works fine on the board using Arduino IDE, but not when compiled using PlatformIO. I’m using PlatformIDE for Atom, on Linux Mint.
I created a new project, pasted the code from my sketch into src/main.cpp, added a private library at lib/, and this is my platform.ini:
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
build_flags = !python git_rev_macro.py
lib_deps =
Crypto=https://github.com/intrbiz/arduino-crypto
It compiles without any errors and seems to upload without any problems as well, but using the serial monitor to check if it works, all I see is:
— Miniterm on /dev/ttyUSB0 115200,8,N,1 —
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
It appears it is not running anything after booting. The binaries produced are different. Don’t know what else to do to troubleshoot this.
Thanks in advance
In your Arduino IDE, what does the Board Manager
say about the installed ESP8266 version?
1 Like
Majubs
June 5, 2019, 3:36pm
#3
Sorry for the delay. It’s NodeMCU 1.0 (ESP-12E Module), version 2.5.0. I got it from this package.
Could you please try and use
platform = espressif8266@2.0.0
in your platformio.ini
instead of the espressif8266
. This equalizes the used Arduino ESP8266 framework version (see here ).
Hi! Have the same problem. Even setting
platform = espressif8266@2.0.0
doesn’t work for me
[env:esp82661m]
platform = espressif8266@2.0.0
board = esp01_1m
framework = arduino
Could you post a minimal code example that reproduces that error and the serial log for it please.
Oh actually this misses a few critical bugfixes which relate to the non-booting problem. Could you try
platform = espressif8266@2.0.4
please.
1 Like
Majubs
June 5, 2019, 6:39pm
#8
It worked with version 2.0.4 Thanks!
Could you still share a minimal code example which does not work at the current platform = espressif8266@2.2.1
? Using an older version is not the best solution
1 Like
Majubs
June 5, 2019, 7:32pm
#10
I tried to make a new project with a simpler version of my code, but still using the private library I’m using. It’s based on this example, that uses this library, placed under lib/
Majubs
June 5, 2019, 7:33pm
#11
The entire project is here if you want to try on you machine.
It did not work with version espressif8266@2.2.1
, same serial output form my original post, but worked with espressif8266@2.0.4
.
And here is log of the upload.
[made two posts because I can’t post more than 2 links]
Majubs
June 5, 2019, 7:54pm
#12
Another thing I noticed, uploading via CLI is also not working. The below part of the upload does not appear in the log:
Uploading .pioenvs/nodemcuv2/firmware.bin
Uploading 481072 bytes from .pioenvs/nodemcuv2/firmware.bin to flash at 0x00000000
................................................................................ [ 17% ]
................................................................................ [ 34% ]
................................................................................ [ 51% ]
................................................................................ [ 68% ]
................................................................................ [ 85% ]
................................................................................ [ 100% ]
I used the command
pio run --target upload
But clicking the Upload
button worked.
I fixed the problem!
[env:esp82661m]
platform = espressif8266
board = esp01_1m
framework = arduino
board_build.flash_mode = dout
monitor_speed = 115200
; upload_protocol = espota
; upload_port = 192.168.2.8
1 Like
Maybe, this is a real issue?