Skip to content

Referencing another platform's core with a different name than it's vendorID #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PatrickLove opened this issue Feb 19, 2020 · 2 comments
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@PatrickLove
Copy link

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:

boardid.build.core=MegaCore:MCUdude_corefiles
boardid.build.variant=MegaCore:64-pin-avr
boardid.upload.tool=MegaCore:avrdude
boardid.bootloader.tool=MegaCore:avrdude

However this fails claiming MCUdude_corefiles:myvendorid:avr is missing. I then found that if I change the core to boardid.build.core=[anything]:MegaCore it does find the MegaCore package, but build.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 (like arduino:MegaCore) it fails during build trying to include headers (and the log says Using 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.

@PatrickLove
Copy link
Author

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.

@matthijskooijman
Copy link
Collaborator

Thanks for reporting, and the followup when you found out it was fixed :-)

For future reference, this was fixed by arduino/arduino-cli#467

@per1234 per1234 added conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants