Building the toolchain - the easy way #820
jvasileff
started this conversation in
Future Development Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Continuing the conversation from #800, it looks like it's pretty easy to package a toolchain by copying files from new Packs into an existing, precompiled bintools, gcc, and avr-libc toolchain. This only takes a few seconds, and doesn't involve a compilation step.
Here's a script to do that, which supports x86_64 macOS, Linux, and Windows. I didn't test the Windows output, but I don't see why it wouldn't work.
Differences from Arduino's toolchain
Note that the official Arduino toolchain goes through a bit more work processing the packs, but it seems to me the extra work is unnecessary.
First, it avoids overwriting files included with gcc with files from the Microchip packs. But... I'm not sure why. The files in the packs would generally be newer, and I assume you'd usually want all files from one source, rather than running the risk of mixing and matching incompatible files.
Second, it adds a bunch of lines to
io.h
like:for new devices added from the packs, but those don't seem necessary as (the current?)
io.h
has a catch all to support all possible devices:For possible use in megaTinyCore
I don't see why there would be any problem using this approach for megaTinyCore and DxCore, but the existing Arduino toolchain would probably need to be used as a base rather than Microchip's toolchain, since Microchip only supports x86_64.
Beta Was this translation helpful? Give feedback.
All reactions