Open JDuchniewicz opened 3 years ago
Thanks @JDuchniewicz
The LTO_PLUGIN_DIR = $(HOME)/.arduino15/packages/...
doesn't look very cross platform as it does not exist on macOS.
Are those changes upstream already? If so, I'll just rebase my fork to get them.
I did not push the LTO_PLUGIN changes upstream as they are relevant only to this project - without including additional libs with the ar
command (as is done normally) it does not complain. The one thing they did in the past was to replace the linking process with the g++ linker instead of gcc one.
I'm not sure how to do it in a future proof manner... As the versions will be changing and we have many platforms to serve. The easiest would be asking the user to provide it themselves but this might be asking for too much in some cases.
Not opening a PR because I noticed that you have your own fork of Arduino-Makefile project and maintain it.
Took me some time to figure it out but now it works.
First of all, with new SAMD devices, this will fail to compile and it requires changes in the README (might open a PR just for that). For the SAMD boards, there is no need for
BOARD_SUB
, everything is stored inBOARD_TAG
.With the newest commits from the upstream repository, the example project will still not build due to missing LTO plugins.
Suggested change is as follows:
I did not find a way to replace the
arm-none-eabi-gcc-ar
with a C++ one so this requires the LTO Plugin to be included. Feel free to alter it. Also I opened a PR upstream to fix zeroing the board before flashing.