Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.thumbv7em-none-eabihf]
runner = "arm-none-eabi-gdb -q -x ../openocd.gdb"
# runner = "gdb-multiarch -q -x ../openocd.gdb"
# runner = "gdb -q -x ../openocd.gdb"
rustflags = [
"-C", "link-arg=-Tlink.x",
]

[build]
target = "thumbv7em-none-eabihf"

5 changes: 0 additions & 5 deletions src/05-led-roulette/.cargo/config

This file was deleted.

8 changes: 8 additions & 0 deletions src/05-led-roulette/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[target.thumbv7em-none-eabihf]
# runner = "arm-none-eabi-gdb -q -x openocd.gdb"
# rustflags = [
# "-C", "link-arg=-Tlink.x",
# ]

[build]
# target = "thumbv7em-none-eabihf"
6 changes: 5 additions & 1 deletion src/06-hello-world/openocd.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ monitor itm port 0 on
# Set a breakpoint at main
break main

# Continue running and we'll hit the main breakpoint
# Continue running and unill we hit the main breakpoint
continue

# Step from the trampoline code in entry into main
step

File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions src/openocd.gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Connect to gdb remote server
target remote :3333

# Load will flash the code
load

# Eanble demangling asm names on disassembly
set print asm-demangle on

# Enable pretty printing
set print pretty on

# Disable style sources as the default colors can be hard to read
set style sources off

# Initialize monitoring so iprintln! macro output
# is sent from the itm port to itm.txt
monitor tpiu config internal itm.txt uart off 8000000

# Turn on the itm port
monitor itm port 0 on

# Set a breakpoint at main, aka entry
break main

# Set a breakpiont at DefaultHandler
break DefaultHandler

# Set a breakpiont at HardFault
break HardFault

# Continue running and unill we hit the main breakpoint
continue

# Step from the trampoline code in entry into main
step