Closed PatrickLove closed 4 years ago
Never mind, turns out I wasn't using the latest version. The problem was solved my Arduino install from 1.8.10 to 1.8.12.
Thanks for reporting, and the followup when you found out it was fixed :-)
For future reference, this was fixed by https://github.com/arduino/arduino-cli/pull/467
I am trying to define a custom board definition for a PCB I made using at ATMega1281. I want to mostly extend the MegaCore package, but with a few modifications mainly to use a different bootloader since I am running at an unsupported clock rate.
I saw on the wiki documentation that it was possible to reference another package's core/variants/platform config, etc. Among other things I set:
However this fails claiming
MCUdude_corefiles:myvendorid:avr
is missing. I then found that if I change the core toboardid.build.core=[anything]:MegaCore
it does find the MegaCore package, butbuild.core.path
ends up set to/path/to/MegaCore/platform/cores/MegaCore
regardless of what I put in the first position. Since MegaCore has its core folder called MCUdude_corefiles instead, it fails to find any core headers. The loader in the Arduino IDE complains if the first part isn't a package, but even if you set it to a different package id (likearduino:MegaCore
) it fails during build trying to include headers (and the log saysUsing core 'MegaCore' from platform in folder: /path/to/MegaCore/platform/
).It looks to me like arduino-builder is using the second half (core name) for both the referenced package and the name of the core to use within the package, and ignores the actual vendorID. Conveniently this works for the
arduino:arduino
core since they are the same, but it does not seem to work in general.After going down this rabbit hole, I think I actually can use
arduino:arduino
and only reference the MegaCore variants to get what I was trying to achieve, but this seems like it could cause problems in other situations.