Skip to content

Commit

Permalink
[build] Add ITM configuration to OpenOCD
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed May 23, 2019
1 parent 0ac84aa commit f73e606
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/build_script_generator/openocd.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ add_script_search_dir {{ path | modm.windowsify(escape_level=1) }}
source [find {{ file | modm.windowsify(escape_level=1) }}]
%% endfor

proc modm_itm_log { OUTPUT F_CPU {BAUDRATE ""} } {
if {$BAUDRATE eq ""} {
tpiu config internal $OUTPUT uart off $F_CPU
} else {
tpiu config internal $OUTPUT uart off $F_CPU $BAUDRATE
}
}

proc modm_program { SOURCE } {
program $SOURCE verify
reset halt
mww 0xE000EDF0 0xA05F0000
reset run
shutdown
}

Expand All @@ -17,4 +24,3 @@ proc program_{{ profile }} {} {
modm_program {{ path | modm.windowsify(escape_level=1) }}
}
%% endfor

0 comments on commit f73e606

Please sign in to comment.