Huzzah + Simba "BOARD huzzah is not supported by Simba"

Trying to use the Simba framework with the Adafruit Huzzah board, which is espressif8266. The Simba framework page states that the Huzzah board is supported.

platformio.ini:

[env:huzzah]
platform = espressif8266
board = huzzah
framework = simba

But when I run platformio run:

Result:

ValueError: BOARD huzzah is not supported by Simba.:
File "/usr/local/lib/python2.7/dist-packages/platformio/builder/main.py", line 142:
env.SConscript("$BUILD_SCRIPT")
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "/home/epoulsen/.platformio/platforms/espressif8266/builder/main.py", line 347:
target_elf = env.BuildProgram()
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/platformio/builder/tools/platformio.py", line 56:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/platformio/builder/tools/platformio.py", line 258:
SConscript(env.GetFrameworkScript(f))
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 604:
return method(*args, **kw)
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "/home/epoulsen/.platformio/platforms/espressif8266/builder/frameworks/simba.py", line 58:
[env.subst(join("$PLATFORMFW_DIR", "make", "platformio.sconscript"))])
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 604:
return method(*args, **kw)
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "/home/epoulsen/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "/home/epoulsen/.platformio/packages/framework-simba/make/platformio.sconscript", line 3092:
raise ValueError("BOARD {} is not supported by Simba.".format(board))

Hi,

select nodemcu or esp12e instead of huzzah, then the build should work. I don’t know how to control reset and boot mode of the Huzzzah board, so the upload might fail.

I can add support for the Huzzah board, but as I don’t own that board myself I cannot properly test it. Can you help out testing it on your board if I implement it, just to make sure the pin mapping is correct?

Erik

select nodemcu or esp12e instead of huzzah, then the build should work. I don’t know how to control reset and boot mode of the Huzzzah board, so the upload might fail

Will do. Looks like the Huzzah is just a breakout (with a few extras stuff) around the esp12 module.

Are the docs incorrect WRT the huzzah being supported?

I can add support for the Huzzah board, but as I don’t own that board myself I cannot properly test it. Can you help out testing it on your board if I implement it, just to make sure the pin mapping is correct?

Absolutely. Heck, give me a hint in the right direction in the code, and I’ll work on a PR myself.

Okay, I thought you were one of the PlatformIO devs, now I realize you’re the main dev for Simba. =)

I realize I was assuming it was supported because that’s what the PIO docs say, but looking at the Simba page, it appears it is not.

The Huzzah does not have any electronically triggered bootloader mode; it’s not much more than a simple breakout with a couple of buttons for reset and GPIO0.

I’ll report back what I find here – my Huzzah boards should arrive tomorrow.

Follow these steps to add the Huzzah board.

  1. Install PlatformIO.

  2. Setup a project for the esp12e board with framework simba.

  3. Build the project with platformio run to download and unpack required packages.

  4. Change directory to ~/.platformio/packages/framework-simba/src/boards. ~ on Windows is C:\Users\<my user>.

  5. Create a new folder called huzzah and copy esp12e/board.[hc] into it. Don’t mind the other files in esp12e, they are used by the Simba build system, and not by PlatformIO. I think the pin mapping in board.h matches the Huzzah board. Maybe the LED pin mapping has to be changed.

  6. Now to the messy part. There is a script called make/platformio/platformio.py that the Simba build system uses to generate the PlatformIO sconscript, make/platformio.sconscript. For the sake of testing I suggest that you directly modify make/platformio.sconscript and simply search and replace esp12e with huzzah.

  7. Now you can build for huzzah using PlatformIO, hopefully.

If it works, fork the simba repository on GitHub, copy .platformio/framework-simba/src/boards/huzzah to it, add board.[hc] to git, commit, push and create a pull request. I can add the build system related stuff for huzzah, unless you figure out how to do it yourself =)

Also, a documentation page for Huzzah should be created in doc/boards, with a fancy pin mapping image and other useful information. I guess I can do that as well. It’s very easy, but requires you to use the Simba build system to generate the html documentation from the .rst files.

Hi Erik,

Yes, this works. Only change I can see for board.c is the LED pin. The Huzzah board has GPIO4/5 swapped on the schematic, which looks to be the same for the ESP12E boad.

I can only confirm that it compiles. When I receive the boards, and test that it works 100% as expected, and submit a PR.

– Eric