Adafruit_TinyUSB_Arduino icon indicating copy to clipboard operation
Adafruit_TinyUSB_Arduino copied to clipboard

Hint platform io to not statically link

Open JoonasMelin opened this issue 4 years ago • 5 comments

  • Platform IO defaults to building all the libraries statically linked, this appears to prevent the Serial port from working on nrf52840

NOTE! This is almost certainly not how this should be resolved, the underlying issue is likely on how some of the symbols that configure the serial driver are handled

JoonasMelin avatar Aug 07 '21 11:08 JoonasMelin

The issue that this addresses: https://github.com/adafruit/Adafruit_TinyUSB_Arduino/issues/117

JoonasMelin avatar Aug 07 '21 12:08 JoonasMelin

NOTE! This is almost certainly not how this should be resolved, the underlying issue is likely on how some of the symbols that configure the serial driver are handled

Since it is not how we should resolved the issue, why wouldn't we fix it in proper way !!? To be honest, I don't user PlatformIO at all and don't quite understand (and have time to try out) their building process. AFAIK, PIO needs extra help with json file for crawling (not sure). Due to quite a number of some support so far regarding PIO, I am willing to test out PR and make it easier with PIO integration but would like to have it in proper way.

hathach avatar Aug 09 '21 09:08 hathach

Since it is not how we should resolved the issue, why wouldn't we fix it in proper way !!? To be honest, I don't user PlatformIO at all and don't quite understand (and have time to try out) their building process. AFAIK, PIO needs extra help with json file for crawling (not sure). Due to quite a number of some support so far regarding PIO, I am willing to test out PR and make it easier with PIO integration but would like to have it in proper way.

I can see if I can dig up the symbols that may/may not get overwritten - I suspect there is a chance that the current operation might rely on undefined/platform specific behavior. Hence why a proper fix would indeed be nice for this one!

I am not a huge fan of the "fix" on this PR as its really not clear to the user why the library would require such magic extra hints added when compiled on one platform but not on the other. But alas. even in its current state, it might help some other people struggling to get their boards working.

JoonasMelin avatar Aug 09 '21 21:08 JoonasMelin

Thanks, I think we can leave this open for people having the same issue until we could figure a more proper fix.

hathach avatar Aug 10 '21 08:08 hathach

until we could figure a more proper fix.

Can we get an issue opened in https://github.com/platformio/platformio-core/issues? Seems quite fundamental

maxgerhardt avatar Apr 29 '22 04:04 maxgerhardt

seem to be fixed by PR to arduino-pico core

hathach avatar Mar 11 '23 04:03 hathach