Skip to content

Commit c59b06e

Browse files
authored
Merge pull request #104 from ahdinko/main
Updated Windows Build Instructions
2 parents 389e310 + 854c342 commit c59b06e

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,47 +88,62 @@ Reference: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
8888

8989
### Prerequistes
9090

91-
[Git](https://gitforwindows.org/) and [VSCode](https://code.visualstudio.com/) are required to build the firmware. To install build dependencies, you will need to use [VSCode Raspberry Pi Pico extension](https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico) and create an pico-example project (any project will trigger the download of pico-sdk, a collection of tools required to build the firmware locally).
91+
[Git](https://gitforwindows.org/) and [VSCode](https://code.visualstudio.com/) are required to build the firmware. To install build dependencies, you will need to use:
92+
[VSCode Raspberry Pi Pico extension](https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico) and create an pico-example project (any project will trigger the download of pico-sdk, a collection of tools required to build the firmware locally). When creating the example project, select a Pico SDK version of v2.1.1 in the version dropdown.
9293

9394
Then you can verify the installation of pico-sdk by inspecting the path from `C:\Users\<user name>\.pico-sdk`.
9495
![pico_sdk_path](resources/pico_sdk_path.png)
9596

9697
### Downloading Source Code
9798

9899
From PowerShell, execute below command to fetch the source code:
100+
99101
git clone https://github.com/eamars/OpenTrickler-RP2040-Controller
100-
102+
101103
Next change to the cloned directory
104+
105+
102106
cd OpenTrickler-RP2040-Controller
107+
103108

104109
Next use git to initalise the required submodules
110+
105111
git submodule init
112+
106113

107114
Now using git clone all submodules. It may take up to 5 minutes to clone all required submodules.
115+
108116
git submodule update --init --recursive
109-
117+
110118
### Configure CMake
111119

112120
Open the PowerShell, run the below script to load required environment variables:
121+
113122
.\configure_env.ps1
114-
123+
115124
To build firmware for Pico W, from the same PowerShell session, run below command:
125+
116126
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico_w
117-
127+
118128
To build firmware for Pico 2W, from the same PowerShell session, run below command:
129+
119130
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico2_w
131+
120132

121133
### Build Firmware
122134

123135
From the same workspace root directory, run the below command to build the firmware from source code into the `build` directory:
136+
124137
cmake --build build --config Debug
125-
138+
126139
On success, you can find the app.uf2 from `<workspace_root>/build/` directory.
127140

128141
### Use VSCode
129142

130143
You need to call VScode from script to pre-configure environment variables. You can simply call
144+
131145
.\run_vscode.ps1
146+
132147

133148
The VSCode cmake plugin is pre-configured to build for Pico 2W by default. You can change the build config to Pico W by modifying `<workspace_root>.vscode/settings.json`.
134149

0 commit comments

Comments
 (0)