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

Need #if in the code for the halconfig tables #736

Closed
terrillmoore opened this issue May 23, 2021 · 0 comments
Closed

Need #if in the code for the halconfig tables #736

terrillmoore opened this issue May 23, 2021 · 0 comments
Assignees
Labels

Comments

@terrillmoore
Copy link
Member

Some versions of GCC emit vtables for objects even if they're not used, even if the platform enables link-time garbage collection.

For example, when configured for an MCCI Catena 4610:

0800e9b8 V vtable for Arduino_LMIC::HalConfiguration_Catena4420_t
0800e9d4 V vtable for Arduino_LMIC::HalConfiguration_Catena4610_t
0800ea28 V vtable for Arduino_LMIC::HalConfiguration_heltec_lora32
0800ea44 V vtable for Arduino_LMIC::HalConfiguration_ttgo_lora32_v1
0800ea0c V vtable for Arduino_LMIC::HalConfiguration_FeatherM0LoRa_t
0800e9f0 V vtable for Arduino_LMIC::HalConfiguration_Feather32U4LoRa_t

The offending entries are never used. Luckily, it's easy to get rid of them, just add #ifdef on the config variables in the .cpp file that provide the begin() methods. A little ugly, but it works.

@terrillmoore terrillmoore self-assigned this May 23, 2021
terrillmoore added a commit that referenced this issue Jun 1, 2021
Fix #736: don't compile config objects that are for other platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant