-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# Configuration for build, run and flash scripts | ||
|
||
# For Raspberry Pi: | ||
# source scripts/nrf52-pi/config.sh | ||
|
||
# Select ST-Link v2 as SWD Programmer | ||
swd_device=scripts/nrf52/swd-stlink.ocd | ||
|
||
# Select Raspberry Pi as SWD Programmer | ||
# swd_device=scripts/nrf52-pi/swd-pi.ocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Configuration for build, run and flash scripts on Raspberry Pi | ||
|
||
# Select Raspberry Pi as SWD Programmer | ||
swd_device=scripts/nrf52-pi/swd-pi.ocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# # Erase Flash ROM on nRF52 with Raspberry Pi | ||
|
||
set -e # Exit when any command fails. | ||
set -x # Echo all commands. | ||
|
||
# Configure SWD Programmer | ||
source scripts/config.sh | ||
|
||
# Erase the Flash ROM | ||
openocd/bin/openocd \ | ||
-f $swd_device \ | ||
-f scripts/nrf52/flash-erase.ocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# Flash Mynewt Application to nRF52 with ST-Link on macOS and Linux | ||
# Flash Mynewt Application to nRF52 on macOS, Linux and Raspberry Pi | ||
|
||
set -e # Exit when any command fails. | ||
set -x # Echo all commands. | ||
|
||
# Configure SWD Programmer | ||
source scripts/config.sh | ||
|
||
# Flash the device | ||
openocd/bin/openocd \ | ||
-f scripts/nrf52/swd-stlink.ocd \ | ||
-f $swd_device \ | ||
-f scripts/nrf52/flash-app.ocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# Flash Mynewt Bootloader to nRF52 with ST-Link on macOS and Linux | ||
# Flash Mynewt Bootloader to nRF52 on macOS, Linux and Raspberry Pi | ||
|
||
set -e # Exit when any command fails. | ||
set -x # Echo all commands. | ||
|
||
# Identify SWD programmer. /proc/device-tree/model contains | ||
# Raspberry Pi 4 Model B Rev 1.1 | ||
# Raspberry Pi 3 Model B Plus Rev 1.3 | ||
swd_device=stlink | ||
if [ -e /proc/device-tree/model ]; then | ||
swd_device=pi | ||
fi | ||
# Configure SWD Programmer | ||
source scripts/config.sh | ||
|
||
# Flash the device | ||
openocd/bin/openocd \ | ||
-f scripts/nrf52/swd-$swd_device.ocd \ | ||
-f $swd_device \ | ||
-f scripts/nrf52/flash-boot.ocd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters