Can't build for ESP8266 ESP01

Hi there! I’m trying to compile an example project for my ESP8266 ESP01 board. I have my project considered like so:

[env:latest_stable]
platform = espressif8266
board_build.f_cpu = 80000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
upload_resetmethod = ck
upload_speed = 9600
board = esp01

However, when I try to build it I get the following error:

pio run --target upload --target monitor
Processing latest_stable (platform: espressif8266; board: esp01)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01.html
PLATFORM: Espressif 8266 2.4.0 > Espressif Generic ESP8266 ESP-01 512k
HARDWARE: ESP8266 80MHz, 80KB RAM, 512KB Flash
PACKAGES: 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - tool-mkspiffs 1.200.0 (2.0) 
 - toolchain-xtensa 1.40802.0 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
AttributeError: 'SConsEnvironment' object has no attribute 'ElfToBin':
  File "/home/andrew/.local/lib/python2.7/site-packages/platformio/builder/main.py", line 156:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/andrew/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/andrew/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
    exec _file_ in call_stack[-1].globals
  File "/home/andrew/.platformio/platforms/espressif8266/builder/main.py", line 218:
    target_firm = env.ElfToBin(

I can build for a different platform (Kendryte k210) just fine, so I know that my platformio install isn’t completely broken. I’m on version 4.3.1, and I’ve recently run platformio platform update, so I should be fine in that regard.

Has anybody seen this before? I’d appreciate any help in getting this fixed.
Thanks!

Actually, the problem seems to be that I didn’t specify the android framework. It gets past the build step, but times out when trying to connect. But that’s unfortunately common for these modules, since I can never seem to wire them up properly lol. But I should be good for now!

1 Like