Thanks for the fast answer but it dosn’t work. I had a new error “permission denied” on package_json but when i put the good right. i got the usual error
o_O weird. That file should have normal rw permissons coming from the tar gz. I will setup a virtual machine and check whether this doesn’t work personally.
I’ve just personally verified that this works. Installed a clean FreeBSD 12.1. Then had to install Gnome3 as desktop environment, sudo, python3, pip-3.7 and PlatformIO through pip. In a shell from the home directory, I did
wget https://bintray.com/platformio/tool-packages/download_file?file_path=3445d11-toolchain-xtensa-freebsd_amd64-1.40802.0.tar.gz
mv download_file\?file_path\=3445d11-toolchain-xtensa-freebsd_amd64-1.40802.0.tar.gz xtensa.tar.gz
cd ~/.platformio/packages/
mkdir toolchain-xtensa
mv ~/xtensa.tar.gz toolchain-xtensa/.
cd toolchain-xtensa/
tar xfv xtensa.tar.gz
nano package.json
<edit version to 2.40802.200502>
and created a new project
mkdir esp8266-test && cd esp8266-test
pio init -b nodemcuv2
nano src/main.cpp
<insert blinky sketch>
pio run
…which made me run into an error that libstdc++.so.6 wasn’t installed. This is solved incidentally by installing GCC. After a sudo pkg install gcc and a rerun of pio run:
[max@freebsd ~/esp8266-test]$ pio run
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (2.6.2) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20704.0 (2.7.4)
- tool-esptool 1.409.0 (4.9)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.191122 (4.8.2)
Building .pio/build/nodemcuv2/firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 32.7% (used 26776 bytes from 81920 bytes)
Flash: [== ] 24.6% (used 256844 bytes from 1044464 bytes)
Creating BIN file ".pio/build/nodemcuv2/firmware.bin" using "/usr/home/max/.platformio/packages/framework-arduinoespressif8266/bootloaders/eboot/eboot.elf" and ".pio/build/nodemcuv2/firmware.elf"
======================== [SUCCESS] Took 6.13 seconds ========================
So this trick works for me.
Maybe retry my steps and make sure you’ve edit all the right files and versions.
Okay thanks a lot the first reply you made works but I was namin toolchain-xtensa32 and not toolchain-xtensa. Thanks for help and sorry for the trouble. I got others issues but will try to find some solutions first
Thanks for your time
Feel free to open new topics if there are additional tools missing for FreeBSD. Missing support packages or versioning mistakes seemed to happen there.
Just if someone use the fix that @maxgerhardt gave be sure that you have the good right on the platformio packages folder with : chown {USER} path/to/.platformio/packages
it’s all working for me now thanks for all
I am having a similar issue. I dont have any version of the toolchain-xtensa installed.
when I try to wget the tar.gz file i get zsh: no matches found " wget Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog".
I know I’m late to the post here. I’m using the current stable version of Truenas with the ESPHome and HomeAssistant plugins.
Hello.
I found this file, download it
/home/homeassistant/.platformio/packages/toolchain-xtensa/package.json
{
“description”: “xtensa-gcc”,
“name”: “toolchain-xtensa”,
“system”: [“freebsd_amd64”],
“url”: “GitHub - jcmvbkbc/gcc-xtensa: gcc for xtensa”,
“version”: “2.40802.200502”
}
But i got still this same error.
Resolving nodemcuv2 dependencies…
Tool Manager: Installing platformio/toolchain-xtensa @ ~2.100300.0
Error: Could not find the package with ‘platformio/toolchain-xtensa @ ~2.100300.0’ requirements for your system ‘freebsd_amd64’
Yeah seems like the compiler you have gotten through this is not new enough to support C++17, which the platform-espressif32, and through it the Arduino-ESP8266 core, needs.
Is this really Xtensa-GCC 4.8.2? What does /home/homeassistant/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++ --version say?
xtensa-lx106-elf-g++ (crosstool-NG 1.20.0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i try to link as xtensa-lx106-elf-g++ g++ from Freebsd, but no luck
In FreeBSD i have
g++ (FreeBSD Ports Collection) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Weird how it doesn’t have xtensa in the output name there, are you sure its targeting XTensa LX106?
How do you do this? The safest way is to just overwrite all files in /home/homeassistant/.platformio/packages/toolchain-xtensa/ with the newer compiler package. (So, bin, lib, include, all of it)
I make only ln -s from system g++ to this file xtensa-lx106… but this not help.
And this what i have in platformio is this
xtensa-lx106-elf-g++ (crosstool-NG 1.20.0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
o_O that’s not going to work at all. PlatformIO will at runtime add /home/homeassistant/.platformio/packages/toolchain-xtensa/bin to the PATH of the shell used for building and invoke xtensa-lx106-elf-g++.
You really should modify the files in /home/homeassistant/.platformio/packages/toolchain-xtensa itself.
But in home/homeassistant/.platformio/packages/toolchain-xtensa
I have filed downloaded by platformio, and this version is :
xtensa-lx106-elf-g++ (crosstool-NG 1.20.0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.