mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-04-01 17:10:20 +02:00
15 lines
414 B
PowerShell
15 lines
414 B
PowerShell
# store the current location
|
|
$originalLocation = Get-Location
|
|
|
|
try {
|
|
# change the location to the OpenOCD scripts directory
|
|
Set-Location -Path "C:\Program Files\Raspberry Pi\Pico SDK v1.5.0\openocd\scripts"
|
|
|
|
# run OpenOCD
|
|
../openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
|
|
}
|
|
finally {
|
|
# return to the original location
|
|
Set-Location -Path $originalLocation
|
|
}
|