ole / swift-rp-pico-bare

Embedded Swift on the Raspberry Pi Pico without the Pico C/C++ SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Talking to GPIO and other peripherals doesn't work

ole opened this issue · comments

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

The reason: In 7978162 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.