Start a new topic

firmware won't compile with arduino ide

 I purchased a Huzza ESP8266 wifi module from adafruit and am trying to flash the firmware to the module with problems.

When I compile the firmware, it doesn't finish and throws an error:

Arduino: 1.8.3 (Windows 7), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200, 4M (1M SPIFFS)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\willys e6500\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\willys e6500\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\willys e6500\Documents\Arduino\libraries -fqbn=esp8266:esp8266:huzzah:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M1M -ide-version=10803 -build-path C:\Users\WILLYS~1\AppData\Local\Temp\arduino_build_463733 -warnings=all -build-cache C:\Users\WILLYS~1\AppData\Local\Temp\arduino_cache_148136 -prefs=build.warn_data_percentage=75\Users\willys e6500\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\Users\willys e6500\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.1.2\Users\willys e6500\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.9 -verbose C:\leaf\wificode\ESP8266_WiFi_v2.x-master\ESP8266_WiFi_v2.x-master\src\src.ino

Board huzzah (platform esp8266, package esp8266) is unknown

Error compiling for board Adafruit HUZZAH ESP8266.

Sorry for the long error messages, but wanted to include all the errors.

I have added the esp8266 ver.2.3.0 in the boards manager along with the

string in the preferences without any problems.

Selected the Adafruit Huzza esp8266 board, set the correct port and speed, but it never gets that far as I am just verifying the compile.

Is something missing, do I have something configured wrong?   I am at a loss right now and haven't found anything on the forums as per this problem.


Most of the developers have abandoned the Arduino IDE and moved over to PlatformIO.

Here are details on the code and loading with platform IO.

You can also load the firmware fro our latest release binary with esptool.

OK so I went with platform IO and have NOTHING but problems and errors.
Had to install several other packages to get PIO to try and run, but STILL get errors.
This is the latest error that I get when opening platforio.ini
Error: [04/16/18 12:23:45] Processing openevse (framework: arduino; platform:; board: esp12e)
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 8266 > Espressif ESP8266 ESP-12E
SYSTEM: ESP8266 80MHz 80KB RAM (4MB Flash)
Converting src.ino
Library Dependency Finder ->
Collected 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <PubSubClient> v2.6
|-- <ESP Async WebServer> v1.1.1
| |-- <ESPAsyncTCP> v1.1.3
| | |-- <ESP8266WiFi> v1.0
| |-- <Hash> v1.0
| |-- <ESP8266WiFi> v1.0
|-- <ESPAsyncTCP> v1.1.3
| |-- <ESP8266WiFi> v1.0
|-- <DNSServer> v1.1.0
| |-- <ESP8266WiFi> v1.0
|-- <Hash> v1.0
|-- <ESP8266HTTPClient> v1.1
| |-- <ESP8266WiFi> v1.0
|-- <EEPROM> v1.0
|-- <ArduinoOTA> v1.0
| |-- <ESP8266mDNS>
| | |-- <ESP8266WiFi> v1.0
| |-- <ESP8266WiFi> v1.0
|-- <ESP8266WiFi> v1.0
|-- <ESP8266mDNS>
| |-- <ESP8266WiFi> v1.0
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode, sharing)
AttributeError: 'module' object has no attribute 'main':
File "C:\users\willys~1\platfo~1\penv\lib\site-packages\platformio\builder\", line 171:
env.SConscript(item, exports="env")
File "C:\Users\willys e6500\.platformio\packages\tool-scons\script\..\engine\SCons\Script\", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\willys e6500\.platformio\packages\tool-scons\script\..\engine\SCons\Script\", line 250:
exec _file_ in call_stack[-1].globals
File "C:\leaf\wificode\ESP8266_WiFi_v2.x-2.7.0\ESP8266_WiFi_v2.x-2.7.0\scripts\", line 19:
pip.main(["install", "closure"])
[ERROR] Took 5.15 seconds
Environment openevse [ERROR]
Environment openevse_slow [SKIP]
Environment openevse_ota [SKIP]
Environment openevse_dev [SKIP]
Environment openevse_staging [SKIP]
Environment openevse_staging_libs [SKIP]
[ERROR] Took 5.16 seconds

Then when I try and build:

I surley don't know HOW to use this thing!!!! A little help would be appreciated as to the steps to load code, how to build, necessary files...... etc.
This is becoming VERY frustrating for such a simple device!!!

I have a 3D printer that I have modified the firmware for using Arduino IDE, and have NO PROBLEM using, compiling, uploading, and it uses an arduino AT mega 2560 processor.
WHY is this so damn difficult??????

Is there a reason you need to compile the code yourself? We provide pre-compiled firmware releases for each major version on our website.

We also sell the Huzzah modules with the UBEC power supply and harness ready to go with the firmware pre-loaded.

Hello Chris.
No, there is no particular reason that I need to compile, and I didn't realize that the pre compiled version existed and all I needed to do was upload the .bin file to the wifi board.   DUH!!!
Is the best (easiest) way to upload the firmware in windows 7 is???  (can you tell I'm dump in this department?)
Can you tell I was becoming frustrated?  I seemed to try everything I knew of, and it refused to work, but I know it is probably something simple that I am missing.
Your help with this is VERY much appreciated!


Setting up a development environment and uploading firmware can be a real headache. This is precisely why we offer the Adafruit Huzzah with a custom wiring harnesses, power supply and pre-loaded firmware.

Loading the firmware from a BIN is a bit easier.

You will need to load esptool and its dependencies from here:

Then you will need the firmware BIN release from here:

Enter programming mode (press and hold GPIO0 then press reset, then release GPIO0)

From the windows command prompt run: -b 1500000 -p COM4 write_flash 0x000000 firmware.bin

*note Substitute COM4 for your COMM port.

Hello Chris;
So I installed python 3.6.5 (don't know if I need to actually run it or not), then tried the string and changed the com port number to 6 which is what my computer uses to talk to the esp module, and got this:

C:\leaf\wificode\esptool-master> -b 1500000 -p COM6 write_flash 0x000000 firmware.bin
Traceback (most recent call last):
  File "C:\leaf\wificode\esptool-master\", line 34, in <module>
    import serial
ModuleNotFoundError: No module named 'serial'

 I must admit I am really lost because I am having so much trouble with something that should be so simple I'm sure.

I don't know how to use python so that may be the problem, but there seems to be something that I need to install from python to get this to work?

Here is the Adafruit page that explains the setup process of esptool and python.

Both the esptool guide linked above and the Adafruit guide require pyserial, your error looks like pyserial is missing.

If you have trouble, this is the Adafruit Support Forum:

Just wanted to say....

Thank you for all your help and putting up with me!
Now all I have to do is use the webinterface and customize some gauges and charts.
I am able to change settings on the charger from the website just like it is supposed to do.

Thank you so very much again for your help!

Login or Signup to post a comment