#embeddedswift
Just did a bunch of cleanup on my binary storage library to get it ready to be compiled for the Pico, and now it’s time to see the myriad things I missed

#swiftlang #embeddedswift
November 17, 2026 at 8:56 PM
Doing some very basic UI work for the dial. I added a new event that fires for each digit so I can add a bit of digital feedback as the physical dial rotates

#embeddedswift #swiftlang
September 26, 2026 at 1:42 AM
I changed how I was adding the library to pico_add_library, which is how the PicoSDK handles its own libraries, and now everything is happy. Time to test it out on a real library, not just my test project

#embeddedswift
September 20, 2026 at 9:35 PM
I’m trying to include a remote SPM library by adding a CMake library in the package which can be included in the main CMakeLists. Unfortunately the Swift compiler can't find the types in the library. My guess is that's because the library doesn't have a header file

#embeddedswift
September 20, 2026 at 8:41 PM
If I were feeling particularly ambitious I’d combine this with the Pico-based clock so I could dial letter directly to the display.

The clock could also use a rewrite in Swift, just for fun

#embeddedswift
September 21, 2026 at 12:41 AM
Alright, made a little bit of progress. I changed the library type to STATIC and now the compiler says it's created for the wrong target, which is good news! That means the linking is working, probably

#embeddedswift
September 20, 2026 at 9:10 PM
Couldn't resist turning the rotary dial into a shitty (not a) keyboard.

#embeddedswift
September 21, 2026 at 12:35 AM
Now that I'm diving back into #embeddedswift has there been any progress on integrating SPM? Previously I’ve defined shared components in a target and just manually included them in CMakeLists and made local copies of files included in dependencies that I need.
September 19, 2026 at 2:42 AM
I tried installing a newer version of the ARM toolchain. Apparently I had a couple versions installed with a mix of symlinks, so that's been cleaned up.

Unfortunately all that's done is swap one unknown argument for another, this time in the linker.

#swiftlang #embeddedswift
September 7, 2026 at 5:19 PM
Finally got it once I found a more complete example for the CMakeLists, which included a bunch of other options.

A bit of changes to the sample Swift code to blink the LED on a Pico W and everything is compiling and blinking.

#swiftlang #embeddedswift
September 7, 2026 at 5:53 PM
Resolved the first problem by using SwiftBlinky, guess it doesn't like the hyphen?

Still not sure about the unknown argument. It looks like it's being added by CMake, so one would think it would be a valid argument.

#swiftlang #embeddedswift
September 6, 2026 at 8:20 PM
Believe it or not this is wireless!

#embeddedswift #raspberrypipico
August 20, 2025 at 12:12 AM
August 18, 2025 at 7:44 PM
Just one more debugging probe, then it’ll work…

#raspberrypipico #embeddedswift
August 17, 2025 at 10:58 PM
Added a nice little EEPROM page debug view to the app. Now after writing it shows a table of all the pages and the CRC16 checksum for each. The device returns a locally calculated checksum after writing a page

#swiftlang #swiftui #embeddedswift
August 13, 2025 at 12:17 AM
Well how about that? The EEPROM is working!

#swiftlang #embeddedswift
July 31, 2025 at 10:09 PM
Huh, I did not expect the first time I'd use typed throws in Swift to be because embedded Swift can't throw a generic `any Error`

#swiftlang #embeddedswift
July 31, 2025 at 1:56 AM
Oh neat, I guess at some point I upgraded my CMake install to 4.0 which I guess drops compatibility with CMake 3.5 which the 1.5 branch of the RP2040 SDK uses. I can't update to the 2.0 branch because of some incompatibility when building Swift 😖

#embeddedswift
April 13, 2025 at 11:58 PM
So it seems like the same symbols are being produced by both my test library and test executable. I kind of figured that's what whole module optimization was for. Or maybe I need to find the right command for the linker?

#embeddedswift
March 22, 2025 at 10:43 PM
Exciting progress? on building my RP2040 test project with Swift. I think I got the right toolchain installed because now instead of “No such file" errors I'm getting so many duplicate symbol errors the compiler gave up! No idea where to go from here

#embeddedswift
March 22, 2025 at 1:38 AM
I’m fairly pleased with this. All of the features are controlled from the UI, which matches the data sent back from the Pico. Now to find a use for it

#embeddedswift #swiftlang #3dprinting
February 24, 2025 at 7:36 PM
Not gonna lie, I’m shocked this is working correctly, and it didn't even take that many attempts

#embeddedswift
February 23, 2025 at 10:44 PM
Took a break to make dinner & watch some Star Trek and realized I'd made some silly mistakes in how I was setting up the button IRQ. The callback is working now, just need to add some debouncing logic

#swiftlang #embeddedswift
February 23, 2025 at 5:15 AM
Trying to run Swift on RP2040 again. It's going 🫤

#swiftlang #embeddedswift
February 23, 2025 at 2:30 AM