Skip to content

Instantly share code, notes, and snippets.

@azlekov
Created June 16, 2020 14:26
Show Gist options
  • Save azlekov/71a00551a32cade10bc6c7893dd8e550 to your computer and use it in GitHub Desktop.
Save azlekov/71a00551a32cade10bc6c7893dd8e550 to your computer and use it in GitHub Desktop.
Adafruit Feather Express nRF52840 PlatformIO configuration for Black Magic Probe debugger
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nrf52840_dk]
platform = nordicnrf52
board = nrf52840_dk
framework = zephyr
debug_tool = blackmagic
debug_port = /dev/cu.usbmodem79A67BCB1
debug_init_cmds =
define pio_reset_halt_target
set language c
set *0xE000ED0C = 0x05FA0004
set $busy = (*0xE000ED0C & 0x4)
while ($busy)
set $busy = (*0xE000ED0C & 0x4)
end
set language auto
end
define pio_reset_run_target
pio_reset_halt_target
end
target extended-remote $DEBUG_PORT
monitor tpwr enable
monitor swdp_scan
attach 1
set mem inaccessible-by-default off
$LOAD_CMDS
$INIT_BREAK
set language c
set *0xE000ED0C = 0x05FA0004
set $busy = (*0xE000ED0C & 0x4)
while ($busy)
set $busy = (*0xE000ED0C & 0x4)
end
set language auto
upload_protocol = blackmagic
upload_port = /dev/cu.usbmodem79A67BCB1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment