@@ -208,7 +208,7 @@ if (-not $SkipDownload) {
208208 # Normal update
209209 msys ' pacman --noconfirm -Suu'
210210
211- msys " pacman -S --noconfirm --needed autoconf automake base-devel expat git libtool pactoys patchutils pkg-config"
211+ msys " pacman -S --noconfirm --needed autoconf automake base-devel expat git libtool pactoys patchutils pkg-config bison flex "
212212 # pacboy adds MINGW_PACKAGE_PREFIX to package names suffixed with :p
213213 msys " pacboy -S --noconfirm --needed cmake:p ninja:p toolchain:p libusb:p hidapi:p libslirp:p"
214214}
@@ -225,11 +225,22 @@ if (-not (Test-Path ".\build\picotool-install\$msysEnv")) {
225225 msys " cd build && ../packages/windows/picotool/build-picotool.sh $version "
226226}
227227
228+ if (-not (Test-Path " .\build\dtc-install\$msysEnv " )) {
229+ msys " cd build && ../packages/windows/dtc/build-dtc.sh $version "
230+ }
231+
228232if ($version.Substring (0 , 1 ) -ge 2 ) {
229233 # Sign files before packaging up the installer
230234 sign " build\openocd-install\$msysEnv \bin\openocd.exe" ,
231235 " build\pico-sdk-tools\$msysEnv \pioasm\pioasm.exe" ,
232- " build\picotool-install\$msysEnv \picotool\picotool.exe"
236+ " build\picotool-install\$msysEnv \picotool\picotool.exe" ,
237+ " build\dtc-install\$msysEnv \bin\dtc.exe" ,
238+ " build\dtc-install\$msysEnv \bin\convert-dtsv0.exe" ,
239+ " build\dtc-install\$msysEnv \bin\dtdiff.exe" ,
240+ " build\dtc-install\$msysEnv \bin\fdtdump.exe" ,
241+ " build\dtc-install\$msysEnv \bin\fdtget.exe" ,
242+ " build\dtc-install\$msysEnv \bin\fdtoverlay.exe" ,
243+ " build\dtc-install\$msysEnv \bin\fdtput.exe"
233244} else {
234245 $template = Get-Content " .\packages\windows\pico-sdk-tools\pico-sdk-tools-config-version.cmake" - Raw
235246 $ExecutionContext.InvokeCommand.ExpandString ($template ) | Set-Content " .\build\pico-sdk-tools\$msysEnv \pico-sdk-tools-config-version.cmake"
@@ -238,7 +249,14 @@ if ($version.Substring(0, 1) -ge 2) {
238249 sign " build\openocd-install\$msysEnv \bin\openocd.exe" ,
239250 " build\pico-sdk-tools\$msysEnv \elf2uf2.exe" ,
240251 " build\pico-sdk-tools\$msysEnv \pioasm.exe" ,
241- " build\picotool-install\$msysEnv \picotool.exe"
252+ " build\picotool-install\$msysEnv \picotool.exe" ,
253+ " build\dtc-install\$msysEnv \bin\dtc.exe" ,
254+ " build\dtc-install\$msysEnv \bin\convert-dtsv0.exe" ,
255+ " build\dtc-install\$msysEnv \bin\dtdiff.exe" ,
256+ " build\dtc-install\$msysEnv \bin\fdtdump.exe" ,
257+ " build\dtc-install\$msysEnv \bin\fdtget.exe" ,
258+ " build\dtc-install\$msysEnv \bin\fdtoverlay.exe" ,
259+ " build\dtc-install\$msysEnv \bin\fdtput.exe"
242260}
243261
244262# Package pico-sdk-tools separately as well
@@ -262,6 +280,17 @@ $filename = 'picotool-{0}-{1}.zip' -f
262280Write-Host " Saving picotool package to $filename "
263281exec { tar - a - cf " bin\$filename " - C " build\picotool-install\$msysEnv " ' *' }
264282
283+ # Package dtc separately as well
284+ $versionOutput = & " .\build\dtc-install\$msysEnv \bin\dtc.exe" -- version
285+ $version = $versionOutput -split ' \s+' | Select-Object - Last 1
286+ Write-Host " DTC version $version "
287+
288+ $filename = ' dtc-{0}-{1}.zip' -f
289+ $version ,
290+ $suffix
291+ Write-Host " Saving DTC package to $filename "
292+ exec { tar - a - cf " bin\$filename " - C " build\dtc-install\$msysEnv " ' *' }
293+
265294if ($env: SKIP_OPENOCD -ne ' 1' ) {
266295 # Package OpenOCD separately as well
267296
0 commit comments