I'm trying to move my original C++ code to Swift. Since my project uses TinyUSB for HID keyboard control, I decided to copy paste some codes from pico-blink-sdk.
Now when I build it, everything compiles but fails at linking:
/Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: warning: /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v6-m/nofp/crtn.o: missing .note.GNU-stack section implies executable stack
/Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: _swiftcode.o:(.ARM.extab.text.$s10_swiftcode4MainV4mainyyFZ+0x0): undefined reference to `_swift_exceptionPersonality'
So pro tip for anyone who gets this kind of error: seems like pico-sdk that's released a week ago has major change that Swift is yet to follow, using 1.5.1 sdk worked without issue
I'm trying to move my original C++ code to Swift. Since my project uses TinyUSB for HID keyboard control, I decided to copy paste some codes from
pico-blink-sdk
.Here's what
CMakeLists.txt
looks like:And here's my incomplete Swift code(
Main.swift
):Here's the file structure:
Now when I build it, everything compiles but fails at linking: