Create Espressif 8266 Packages for FreeBSD

Okay, so it starts to compile but it cannot find xtensa-lx106-elf-g++ and xtensa-lx106-elf-ar

The full message is below:

$ platformio run -v
[Mon Sep 26 23:35:27 2016] Processing huzzah (platform: espressif8266, board: huzzah, framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Collected 23 compatible libraries
Looking for dependencies...
Project does not have dependencies
xtensa-lx106-elf-g++ -o .pioenvs/huzzah/src/main.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fdata-sections -DARDUINO=20300 -DLWIP_OPEN_SRC -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DPLATFORMIO=030100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -U__STRICT_ANSI__ -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/cores/esp8266 -I/home/tim/.platformio/packages/framework-arduinoespressif8266/variants/adafruit -Isrc src/main.cpp
xtensa-lx106-elf-ar rcs .pioenvs/huzzah/libFrameworkArduinoVariant.a
xtensa-lx106-elf-g++: not found
xtensa-lx106-elf-ar: not found
xtensa-lx106-elf-g++ -o .pioenvs/huzzah/FrameworkArduino/Esp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fdata-sections -DARDUINO=20300 -DLWIP_OPEN_SRC -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DPLATFORMIO=030100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -U__STRICT_ANSI__ -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/cores/esp8266 -I/home/tim/.platformio/packages/framework-arduinoespressif8266/variants/adafruit /home/tim/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Esp.cpp
*** [.pioenvs/huzzah/src/main.o] Error 127
xtensa-lx106-elf-g++ -o .pioenvs/huzzah/FrameworkArduino/FS.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fdata-sections -DARDUINO=20300 -DLWIP_OPEN_SRC -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DPLATFORMIO=030100 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -U__STRICT_ANSI__ -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include -I/home/tim/.platformio/packages/framework-arduinoespressif8266/cores/esp8266 -I/home/tim/.platformio/packages/framework-arduinoespressif8266/variants/adafruit /home/tim/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/FS.cpp
*** [.pioenvs/huzzah/libFrameworkArduinoVariant.a] Error 127
xtensa-lx106-elf-g++: not found
*** [.pioenvs/huzzah/FrameworkArduino/Esp.o] Error 127
xtensa-lx106-elf-g++: not found
*** [.pioenvs/huzzah/FrameworkArduino/FS.o] Error 127
================================================================ [ERROR] Took 0.84 seconds ================================================================

Here are the locations of the files it cannot find:

$HOME/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf-g++
$HOME/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf-ar

They should be located in bin directory. Take a look at other PlatformIO toolchains:

Ah thanks. For some reason, the toolchain did not populate the include nor the bin directories.

Could you fix that toolchain?

Yeah, sure. I probably won’t get to it until this weekend though.

How are we getting on here?

I’m still interested in this. but @ivankravets mentioned that there would be the ability to “cloud” compile (but i’d like to do it locally? is this possible in 3.1.0 yet…

(i.e. send my sketch to my local server for compiling and retrieve the .elf and .bin ?)

What do you mean under Cloud Compile? For package or project?

I think next week I’ll release first beta. It’s named as “PIO Remote”. This service will have a lot COOL features.

I downloaded a package of the toolchain-xtensa for linux and and started looking through it. It’s structured very differently than the FreeBSD one. Running platformio run errors out because it can’t find stdlib.h and memory in the framework-arduinoespressif8266 directory. Is there some symbolic link or something that connects the includes directory of toolchain?

@sticilface do you have any ideas?

Hi,

Sorry. i’ve been pretty mental with work and stuff!

I’ve actually lost the jail i had set up for this! I’ve created a new one. but got as far as this

PackageManager: Installing toolchain-xtensa @ ~1.40802.0
Error: Could not find a version that satisfies the requirement '~1.40802.0' for your system 'freebsd_amd64'

so i could probably cobble together the old tool chain with the new one, comparing to linux one.
and see where i get!

ok so i got it to work by doing the following…

install python
pkg install python gcc

install pip
python -m ensurepip

install platformio
pip install -U platformio

configure a project
mkdir test cd test platformio init

copy the files from this zip to your ./platformio/packages/ folder

now it should compile. it will fail to run the final stage creating the bin… but it should compile. this is because the esp-tool is just the mac version to keep platformio quiet… i need to get help from ivan for the makefile for esp-tool…
https://github.com/igrr/esptool-ck/issues/43

I’ve uploaded all toolchains and tools. Thanks, @sticilface!!! :blush:

Could someone test it?

the esp-tool i’ve included won’t work though. it is jus the mac one, to make it think it is correct…

fixed it. forgot to use gmake instead!

im uploading the fixed files to github. can u repackage them for me when they are done.
The toolchain works though

just to add. you can change the esptool to the right one.

I’ve updated this package. Try to remove it manually from ~/.platformio/packages and PlatformIO will reinstall it.

Sorry for the lack of communication on this, but I removed all the packages and let platformio download them. Running pio run worked as expected. (i.e. downloading all the libraries and compiling without error).

Thank you, @sticilface and @tfl5034!

Trying the new beta. quite excited about the PIOremote.

PioPlusPackageManager: Installing tool-pioplus @ >=0.4.0
Error: Could not find a version that satisfies the requirement '>=0.4.0' for your system 'freebsd_amd64'

Could you try again? I’ve just compiled PIO Plus package for FreeBSD. I used FreeBSD 10.2 and I hope that binaries work very well with your version.