You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,40 +34,43 @@ Ensure you have the following hardware:
33
34
34
35
Before you begin, make sure you have the following:
35
36
36
-
-[ESP-IDF v5.3](https://docs.espressif.com/projects/esp-idf/en/release-v5.3/esp32/get-started/index.html): The official development framework for the ESP32, properly installed and sourced in your shell.
- Note: the article was written using Apple Swift version 6.0-dev (LLVM 3bba20e27a3bcf9, Swift 8e8e486fb05209f)
37
+
-[ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html): The official development framework for the ESP32, properly installed and sourced in your shell. This tutorial has been tested with ESP-IDF v6.0.
38
+
-[Swiftly](https://www.swift.org/install/macos/#using-swiftly): The Swift toolchain installer and manager.
39
+
- Swift 6.2 development snapshot (installed via swiftly).
40
+
- Note: This article has been updated and tested with Swift 6.2-dev snapshot from August 2025.
39
41
40
42
### Building an Example Project
41
43
42
44
First, let's see the whole build process in Asciinema recording:
Let's clone the project and configure `TOOLCHAINS` environment variable with the version of the installed Swift 6.
49
+
First, install Swiftly by following the official installation guide at [swift.org/install](https://www.swift.org/install/), then install the Swift 6.2 development snapshot:
48
50
51
+
```bash
52
+
# Install Swift 6.2 development snapshot
53
+
swiftly install 6.2-snapshot
54
+
```
49
55
50
-
{{< tabs groupId="config" >}}
51
-
{{% tab name="macOS" %}}
52
-
```shell
53
-
git clone [email protected]:apple/swift-embedded-examples.git --single-branch --branch main
54
-
#export TOOLCHAINS=org.swift.600202406111a
55
-
export TOOLCHAINS=$(plutil -extract CFBundleIdentifier raw /Library/Developer/Toolchains/swift-latest.xctoolchain/Info.plist)
56
-
cd swift-embedded-examples/esp32-led-strip-sdk
57
-
```
58
-
{{% /tab %}}
56
+
2.**Clone Sample Project**:
59
57
60
-
{{% tab name="Linux" %}}
61
-
```shell
62
-
git clone [email protected]:apple/swift-embedded-examples.git --single-branch --branch main
63
-
cd swift-embedded-examples/esp32-led-strip-sdk
64
-
```
65
-
{{% /tab %}}
66
-
{{< /tabs >}}
58
+
The repository contains two ESP32 examples. Let's use the LED strip example which demonstrates more advanced functionality:
59
+
60
+
```shell
61
+
git clone https://github.com/swiftlang/swift-embedded-examples.git --single-branch --branch main
62
+
cd swift-embedded-examples/esp32-led-strip-sdk
63
+
64
+
# Use the 6.2 snapshot for this project
65
+
swiftly use 6.2-snapshot
66
+
```
67
+
68
+
**Available ESP32 Examples:**
69
+
-`esp32-led-blink-sdk`: Simple LED blinking example
70
+
-`esp32-led-strip-sdk`: NeoPixel LED strip control example (used in this tutorial)
67
71
68
72
69
-
2.**Set the Target**:
73
+
3.**Set the Target**:
70
74
71
75
Ensure the correct target is set for your project:
72
76
@@ -76,7 +80,7 @@ cd swift-embedded-examples/esp32-led-strip-sdk
76
80
77
81
Note: It's possible to build the project also for other RISC-V based targets, like ESP32-C3.
78
82
79
-
3.**Build and Flash the Project**:
83
+
4.**Build and Flash the Project**:
80
84
81
85
Compile and flash your application to the ESP32-C6-DevKit:
82
86
@@ -86,11 +90,9 @@ cd swift-embedded-examples/esp32-led-strip-sdk
86
90
87
91
Note: Use `Ctrl+]` to quit the monitor application.
88
92
89
-
Note: If the build fails with linking error, please follow instructions at [swift-embedded-examples repository](https://github.com/apple/swift-embedded-examples/issues/17#issuecomment-2174606877)
90
-
91
93
### Exploring the Example
92
94
93
-
Let's look at the source code of the example: [Main.swift](https://github.com/apple/swift-embedded-examples/blob/main/esp32-led-strip-sdk/main/Main.swift)
95
+
Let's look at the source code of the example: [Main.swift](https://github.com/swiftlang/swift-embedded-examples/blob/main/esp32-led-strip-sdk/main/Main.swift)
@@ -140,11 +142,28 @@ The examples for ESP32-C6 could be easily simulated by Wokwi:
140
142
141
143
Embedded Swift even in **experimental** stage represents a significant advancement in bringing Swift's powerful features to embedded systems and constrained environments. By focusing on reducing runtime dependencies and optimizing code size, Embedded Swift allows developers to leverage Swift's modern programming paradigms even on MCUs.
142
144
145
+
## What's New Since the Original Article (Updated September 2025)
146
+
147
+
Since the original publication in July 2024, several important improvements have been made to the Embedded Swift ecosystem:
148
+
149
+
### Toolchain Management
150
+
-**Swiftly Integration**: The recommended way to install and manage Swift toolchains is now through [Swiftly](https://www.swift.org/install/macos/#using-swiftly), which simplifies toolchain management significantly.
151
+
-**Swift 6.2 Development**: The examples now work with Swift 6.2 development snapshots, providing access to the latest language features and improvements.
152
+
153
+
### ESP-IDF Compatibility
154
+
-**ESP-IDF 6.0 Support**: The examples have been tested and work with ESP-IDF v6.0, which includes many improvements and new features.
155
+
-**Updated Dependencies**: All component dependencies are automatically managed and updated to their latest versions.
156
+
157
+
### Repository Changes
158
+
-**Organization Move**: The swift-embedded-examples repository has moved from `apple/swift-embedded-examples` to `swiftlang/swift-embedded-examples`.
159
+
-**Documentation Improvements**: Enhanced documentation with better installation guides and troubleshooting information.
160
+
143
161
## Useful Links
144
162
145
163
-[WWDC24 - Go small with Embedded Swift](https://developer.apple.com/videos/play/wwdc2024/10197/)
146
-
-[Embedded Swift Example Projects](https://github.com/apple/swift-embedded-examples/tree/main/esp32-led-strip-sdk)
147
-
-[A Vision for Embedded Swift](https://github.com/apple/swift-evolution/blob/main/visions/embedded-swift.md)
148
-
-[Embedded Swift User Manual](https://github.com/apple/swift/tree/main/docs/EmbeddedSwift/UserManual.md)
164
+
-[Embedded Swift Example Projects](https://github.com/swiftlang/swift-embedded-examples)
165
+
-[A Vision for Embedded Swift](https://github.com/swiftlang/swift-evolution/blob/main/visions/embedded-swift.md)
166
+
-[Embedded Swift Documentation](https://www.swift.org/get-started/embedded/)
0 commit comments