#EmbeddedSwift

Finn Voorheesfinnvoorhees
2025-05-30

⚙️ I've just merged a big change to the PlaydateKit build system. It now uses the SwiftPM build system for almost all of the build as opposed to a bunch of fragile individual commands and flags. This means:
- 1.5x faster clean builds
- 9x faster incremental builds
- Much more stable linux builds
- Possibly Windows support soon?

The embedded Swift team has been making tons of improvements, it's easier than ever to get started with on !

finnvoor.github.io/PlaydateKit

Eric Bariauxebariaux
2025-05-26

In this week's , @twostraws new open-source project ShipShape, SwiftCraft conference, documentation and loads of tech announcements...

ericbariaux.com/posts/explorin

Finn Voorheesfinnvoorhees
2025-05-09

I'd like something to keep tempo with while playing guitar, so let's design a drum sequencer using and the very limited set of parts I have laying around.

Eric Bariauxebariaux
2025-04-14

No this week but a longer post on and its impact on my development environment

ericbariaux.com/posts/swiftly-

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-04-13

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

Eric Bariauxebariaux
2025-04-09

@twostraws @mikaelacaron @swiftovercoffee
A lot of : github.com/nelcea/EmbeddedSwif github.com/nelcea/EmbeddedSwif github.com/nelcea/EmbeddedSwif
that I try to share with community whenever/wherever I can: github.com/ebariaux/slides

Ultimate project though is use Swift everywhere: firmware with EmbeddedSwift, mobile app using SwiftUI, backend using Vapor and some WebAssembly for the more advanced parts of the web UI. It's been on-hold for nearly a year now: github.com/nelcea/PAL

Eric Bariauxebariaux
2025-04-07

Last week I skipped , I just did not have the energy to write.
Back this week with a new edition of Embedded Swift community hour, my first time attending and some BLE in examples.

ericbariaux.com/posts/explorin

Eric Bariauxebariaux
2025-03-24

In this week’s “Exploring Uncut” (ericbariaux.com/posts/explorin), I fix my issue with connecting a Seeed Studio Round Display to a nRF 52840 dk board and progress with an implementation of Gyrus.

Also some answers in the value type, reference type, stack and heap quest, another Paul Hudson stream and a new Embedded Swift Community Hour coming up next Friday.

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-03-22

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

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-03-22

Also, as cool as I think it would be to figure this all out on my own, if someone else has already done it please tell me.

On the other hand maybe I get a good conference talk about of the project. "So at first I was confused, and then I swore at the compiler for a while, and then it worked!”

#EmbeddedSwift

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-03-22

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

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-03-22

All of the parts for my button project finally came together. I redesigned the enclosure to make the PCB and button easier to install and added an ARRI anti-twist mounting system to the bottom.
I also borrowed a little bushing press and printed a jig to add the threaded inserts.

#3DPrinting #EmbeddedSwift

A royal blue 3D printed tapering box. The front of the enclosure has a single clicky button with a not-at-all ominous glowing red LESThe back of the enclosure features a removable rear panel which given access to the electronics. It also has a USB-C slot and a speaker grill so the piezo speaker can be annoyingA heroic shot from a low angle of the button mounted to an adjustable arm.A photo of the bush press and jig which holds the button at a 30° angle so the back face is flat
Eric Bariauxebariaux
2025-03-12

If you’re interested in , come say hi during the first Embedded Swift Community Hour.

[Embedded Swift Community Hour! - Development / Embedded - Swift Forums](forums.swift.org/t/embedded-sw)
Thanks to @rauhul and @kubamracek for organising this.

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-03-01

Still working on the specifics, but I think something like this might work well. It makes it easy to show controls and information for a device that all updates automatically from the store of known devices and separates out a default state for when the device is disconnected.

`DeviceView` is generic soup, but there might be a way to clean some of that up

#SwiftUI #EmbeddedSwift

A snippet of SwiftUI code for presenting the UI for a USB device, in this case a button with an LED. The view takes the serial number and a store of devices and provides callbacks for two subviews: one for when the device is connected and another when disconnected
Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-26

Did some reorganization and put the shared models in their own target that can be conveniently referenced via SPM on the client side and, less conveniently, from the CMakeLists file for building the Pico binary. But at least if I make changes I'm no longer copying and pasting for each platform.

Would still love some kind of SPM support for building embedded binaries, but even this is a nice step forward

#EmbeddedSwift

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-24

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

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-23

Not gonna lie, I’m shocked this is working correctly, and it didn't even take that many attempts

#EmbeddedSwift

A code snippet which creates a repeating hardware timer which toggles an LED once per second. The timer callback loads a bool from memory pointers, set the LED state, and then stores the flipped bool back into memory
Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-23

More progress! Got USB communication up and running and can get button input and set the LED output.

I think next up is going to be merging the embedded code and client code with conditionals so they share files. I don't think that was an option the last time I tried embedded Swift

#SwiftLang #EmbeddedSwift

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-23

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

Emory Dunn :tiny_cart:emorydunn@tinycart.club
2025-02-23

Trying to run Swift on RP2040 again. It's going 🫤

#SwiftLang #EmbeddedSwift

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst