ole / swift-rp-pico-bare

Embedded Swift on the Raspberry Pi Pico without the Pico C/C++ SDK
93 stars 3 forks source link

Talking to GPIO and other peripherals doesn't work #5

Closed ole closed 8 months ago

ole commented 8 months ago

The sample app is not working correctly because the GPIO (and other peripherals) are not being initialized correctly.

The reason: In 7978162acaedde18598a5dd6e9d0cb496a97feeb I moved the runtime_init function from the App binary into the "SDK" module. This caused the function to not get linked into the final executable.

This wasn't detected during the build (no linker error) because the linker script defines a weak symbol for runtime_init with an empty implementation. We inherited this from the Pico C SDK, but I don't think it's a good idea. I'd rather get a linker error if an essential symbol gets dropped.

Working on a fix.