Skip to content
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

Unexpected problem-causing definition of initVariant() #141

Open
Sergio-Slobodrian opened this issue Nov 5, 2024 · 0 comments
Open

Unexpected problem-causing definition of initVariant() #141

Sergio-Slobodrian opened this issue Nov 5, 2024 · 0 comments

Comments

@Sergio-Slobodrian
Copy link

When attempting to use initVariant() in a library I'm creating for the Arduino Nano Every I was getting linker errors about multiple definitions of the initVariant function which is weakly defined in main.cpp specifically so it can be defined elsewhere.

The issue is the following. At the bottom of the file: .arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/nona4809/variant.c an apparently random definition of the initVariant() function exists. It's empty and it's the last function in the file with no comments as to why it's there.

The file came with the download when the board was selected.

The board was selected as follows:
Arduino megaAVR Boards by Arduino Version 1.8.8 INSTALLED
Boards included in this package:
Arduino UNO WiFi Rev2, Arduino Nano Every

I selected the 4809 version.

The fix is simple, remove the function from the file. It shouldn't be there as an empty shell anyway and prevents the initVariant function from being used for its intended purpose. I just commented it out in the file for now but it would be nice to not have to go find and comment it out for each future upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant