Skip to content

Commit a0f9d8d

Browse files
mredigrauhul
andauthored
Update pico readmes with additional clarity (#39)
Co-authored-by: Rauhul Varma <[email protected]>
1 parent a3b2df7 commit a0f9d8d

File tree

10 files changed

+28
-14
lines changed

10 files changed

+28
-14
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,22 @@ This repository is a set of demonstration projects of **Embedded Swift**. Embedd
1111
> [!WARNING]
1212
> Embedded Swift is experimental. Some information on this page might be out of date with latest development.
1313
14-
> [!IMPORTANT]
15-
> Use the latest downloadable 'main' [Development Snapshot](https://www.swift.org/install/macos/#development-snapshots) from swift.org to use Embedded Swift. Public releases of Swift do not yet support Embedded Swift.
14+
## Building the examples
1615

17-
> [!NOTE]
18-
> This repository contains code that is not continuously developed, instead it's presented "as is" for educational and demonstrational purposes. Making major improvements to existing examples is discouraged, but additions of new examples is welcome.
16+
Each example in this repository contains build and deployment instructions, however there are a couple common steps needed for many of the examples included below:
17+
18+
1. Install the latest downloadable 'main' [Development Snapshot](https://www.swift.org/install/macos/#development-snapshots) from swift.org to use Embedded Swift. Public releases of Swift do not yet support Embedded Swift.
19+
20+
You can follow the [tutorial here](https://apple.github.io/swift-matter-examples/tutorials/swiftmatterexamples/setup-macos/) for instructions on installing and using nighly Swift toolchains.
21+
22+
2. Install the Python3 dependencies listed in `requirements.txt`.
23+
24+
```console
25+
$ cd swift-embedded-examples
26+
$ python3 -m venv .venv
27+
$ source .venv/bin/activate
28+
$ python3 -m pip install -r Tools/requirements.txt
29+
```
1930

2031
## Catalog of Examples
2132

@@ -55,6 +66,8 @@ Please note that the presence of community repositories and devices in this list
5566

5667
## Contributing to this repository
5768

69+
This repository contains code that is not continuously developed, instead it's presented "as is" for educational and demonstrational purposes. Making major improvements to existing examples is discouraged, but additions of new examples is welcome.
70+
5871
### Code of Conduct
5972

6073
Like all Swift.org projects, we would like these Embedded Swift example projects to foster a diverse and friendly community. We expect contributors to adhere to the [Swift.org Code of Conduct](https://swift.org/code-of-conduct/).

nrfx-blink-sdk/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This example demonstrates how to integrate with the Zephyr SDK via CMake and how
2323
``` console
2424
$ cd nrfx-blink-sdk
2525
$ source ~/zephyrproject/.venv/bin/activate
26-
(.venv) export TOOLCHAINS='<toolchain-name>'
26+
(.venv) export TOOLCHAINS='<toolchain-identifier>'
2727
(.venv) cmake -B build -G Ninja -DBOARD=nrf52840dk_nrf52840 -DUSE_CCACHE=0 .
2828
(.venv) cmake --build build
2929
```

pico-blink-sdk/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ This example demonstrates how to integrate with the Pico SDK which is using CMak
2020

2121
- Make sure you have a recent nightly Swift toolchain that has Embedded Swift support.
2222
- Build and copy the program in the UF2 format to the Mass Storage device to trigger flashing the program into memory (after which the device will reboot and run the firmware):
23+
2324
``` console
2425
$ cd pico-blink-sdk
25-
$ export TOOLCHAINS='<toolchain-name>'
26+
$ export TOOLCHAINS='<toolchain-identifier>'
2627
$ export PICO_BOARD=pico
2728
$ export PICO_SDK_PATH='<path-to-your-pico-sdk>'
28-
$ export PICO_TOOLCHAIN_PATH='<path-to-the-arm-toolchain>'
29+
$ export PICO_TOOLCHAIN_PATH='<path-to-the-arm-toolchain>' # A default `brew` install will be located at `/Applications/ArmGNUToolchain/[version]/arm-none-eabi`
2930
$ cmake -B build -G Ninja .
3031
$ cmake --build build
3132
```

pico-blink/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- Build and copy the program in the UF2 format to the Mass Storage device to trigger flashing the program into memory (after which the device will reboot and run the firmware):
1414
``` console
1515
$ cd pico-blink
16-
$ TOOLCHAINS='<toolchain-name>' ./build.sh
16+
$ TOOLCHAINS='<toolchain-identifier>' ./build.sh
1717
$ cp .build/blink.uf2 /Volumes/RP2040
1818
```
1919
- The green LED should now be blinking in a pattern.

pico-w-blink-sdk/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This example demonstrates how to integrate with the Pico SDK which is using CMak
2222
- Build and copy the program in the UF2 format to the Mass Storage device to trigger flashing the program into memory (after which the device will reboot and run the firmware):
2323
``` console
2424
$ cd pico-w-blink-sdk
25-
$ export TOOLCHAINS='<toolchain-name>'
25+
$ export TOOLCHAINS='<toolchain-identifier>'
2626
$ export PICO_BOARD=pico_w
2727
$ export PICO_SDK_PATH='<path-to-your-pico-sdk>'
2828
$ export PICO_TOOLCHAIN_PATH='<path-to-the-arm-toolchain>'

pico2-neopixel/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ index f6867b5..a2291db 100644
3737
- Build and copy the program in the UF2 format to the Mass Storage device to trigger flashing the program into memory (after which the device will reboot and run the firmware):
3838
``` console
3939
$ cd pico2-neopixel
40-
$ TOOLCHAINS='<toolchain-name>' make
40+
$ TOOLCHAINS='<toolchain-identifier>' make
4141
$ cp .build/release/Application.uf2 /Volumes/RP2350
4242
```
4343
- The RGB LED should be animating through the color wheel.

stm32-blink/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This example shows a simple baremetal firmware for an STM32 board that blinks an
1212
- Build and upload the program to flash memory of the microcontroller:
1313
```console
1414
$ cd stm32-blink
15-
$ TOOLCHAINS='<toolchain-name>' ./build.sh
15+
$ TOOLCHAINS='<toolchain-identifier>' ./build.sh
1616
$ st-flash --reset write .build/blink.bin 0x08000000
1717
```
1818
- The green LED next to the RESET button should now be blinking in a pattern.

stm32-lcd-logo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Build and upload the program to flash memory of the STM:
1111
```console
1212
$ cd stm32-lcd-logo
13-
$ TOOLCHAINS='<toolchain-name>' ./build.sh
13+
$ TOOLCHAINS='<toolchain-identifier>' ./build.sh
1414
$ st-flash --reset write .build/lcd-logo.bin 0x08000000
1515
```
1616
- The LCD display on the board should now be showing a bouncing animating Swift logo on a fading background, and the user LED on should be blinking.

stm32-neopixel/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We recommend including a capacitor across the LED strip power supply.
2424
- Build and upload the program to flash memory of the STM:
2525
```console
2626
$ cd stm32-neopixel
27-
$ export TOOLCHAINS='<toolchain-name>'
27+
$ export TOOLCHAINS='<toolchain-identifier>'
2828
$ make
2929
$ st-flash --reset write .build/release/Application.bin 0x08000000
3030
```

stm32-uart-echo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ screen /dev/cu.usbmodem<...> 115200
1414
- Build and upload the program to flash memory of the STM:
1515
```console
1616
$ cd stm32-uart-echo
17-
$ export TOOLCHAINS='<toolchain-name>'
17+
$ export TOOLCHAINS='<toolchain-identifier>'
1818
$ make
1919
$ st-flash --reset write .build/release/Application.bin 0x08000000
2020
```

0 commit comments

Comments
 (0)