i partially got platformio running on OpenBSD for my esp8266 chips. I hade to make two fake packages for toolchain-xtensa und tool-esptool (see https://github.com/lotherk/platformio-openbsd-toolchain-xtensa) to build the firmware.
The trick is basically just symlinking things from the system to ~/.platformio/packages/xyz. See https://termbin.com/qlwy as an example for the toolchain-xtensa. You get the idea.
However, I couldn’t upload my project with pio as I couldn’t make the same trick work for tool-mkspiffs. Uploading directly with esptool.py worked. So currently I’m using pio run to compile the project for my esp8266 and esptool.py to upload it. It’s not nice but works.
I tried this trick also to make atmelavr work on OpenBSD but couldn’t convince pio to accept my toolchain-atmelavr fake package. I tried multiple things, comparing folder structure from a linux installation etc. but for the sake of me can’t get it to work.
All the binaries needed for compiling esp, atmelavr and all the tools needed for uploading like mkspiffs, esptool, avrdude etc. are available on my system and are working.
My actual question is what do I have to do to make toolchain-atmelavr and tool-mkspiffs work with my symlink magic. The fake package.json seem correct (just like the ones I generate for toolchain-xtensa and tool-esptool).
Also, why are all the binaries needed in pio packages and why isn’t it possible for pio to just use what is inside PATH?
As a last resort I would also be thankful for a tip on how to make pio print the actual command it is using for compiling, uploading etc. so I would just run it once on Linux and copy the commands into a Makefile…
I sure can build all the firmware using a linux vm but I want it on my OpenBSD directly and am willing to help upstream.
I can compile and provide binaries if needed. I am running OpenBSD-current but could set up a VM with the current stable RELEASE if that would be needed.
I seem not to be the only one trying to get pio working on *BSD as can be seen on some posts here on the forum and on github for example from user trombik, which were the inspiration for the fake packages thing. Sorry, I only can post 2 links as a new user here in this forum so you have to search the links yourself.
Any help or tipps are greatly appreciated. Also happy new year to everyone of you.