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

fix for "undefined reference to `vtable for HardwareSerial'" #336

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

EndlessDelirium
Copy link
Contributor

Not all functions of HardwareSerial are declared as pure virtual. This leads to "undefined reference to `vtable for HardwareSerial'" errors when used via Segger Studio.

@dlabun
Copy link
Collaborator

dlabun commented Jan 21, 2019

Can you clarify what you mean by used via Segger Studio? Are building code inside their IDE or just debugging? The code builds without issue in Arduino IDE.

@EndlessDelirium
Copy link
Contributor Author

Yes, I'm building your project with Segger Studio.
Your project is awesome as it allows me to tap into the large Arduino ecosystem. The downside however is that I'm supposed to use the crappy Arduino IDE, reconfigure my J-Link and give up its debugging capabilities. Why should I do that when I can simply cherry pick all the good things?
This is the only code change needed in order to integrate this Arduino core into a Segger Studio project (apart from project configuration). It's rather unclear to me why some functions of HardwareSerial are pure virtual while others aren't. This change makes things more consistent and shouldn't lead to issues when building via Arduino IDE. It would however save other people who would like to integrate your Arduino core into a Segger Studio project some time.

@dlabun
Copy link
Collaborator

dlabun commented Jan 22, 2019

I think this issue really originates from the ArduinoCore-Samd repository as it looks like Sandeep copied over HardwareSerial.h without any modifications. I have no problem merging in this fix, but you may want to also submit a patch to Arduino since it originated from them.

@dlabun dlabun merged commit 9c8d057 into sandeepmistry:master Jan 22, 2019
@EndlessDelirium EndlessDelirium deleted the features/vtable_bugfix branch January 22, 2019 13:51
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

Successfully merging this pull request may close these issues.

2 participants