My little journey in using Swift on the Pico W... lets just say it could be better....
Пікірлер: 2
@ShivarajD252 ай бұрын
I agree with many of the limitations that you pointed out here, but getting it running on Linux is pretty straight forward. I have created a simple docker with just the packages listed in the Raspberry Pi Pico SDK GitHub repository and it just works fine for the examples that uses the SDK, setting up the Dev environment of the baremetal example is the tough one.
@joseph-montanez2 ай бұрын
I ended up giving up on using Swift on the pico. Using the debug probe causes issues with sleep timers (it never ends). However the nail in the coffin, anymore more than their examples, you have to implement a custom dynamic memory allocation and atomic operations. I tried but they all result in panics. So I used -no-allocations, and this was fine with a big exception. Every fixed-sized buffer I created needed its own swift implementation for every single fixed sized. This includes things like splitting a buffer, reversing, etc. Unlike Rust where I can use lifetimes and generics, Swifts generic or even macro system cannot handle this. I was writing swift code to generate more swift code for every sized buffer.