Move debug scripts in the build folder

This commit is contained in:
Romain Goyet
2018-02-01 16:38:06 +01:00
committed by EmilieNumworks
parent ad261a79aa
commit 5ef24d304d
5 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
# Let's connect to OpenOCD
target remote localhost:3333
# GDB pagniation is annoying
set pagination off
# Load our executable
load
# Tell OpenOCD to reset and halt
monitor itm ports on
monitor tpiu config internal swo.log.bin uart off 16000000
monitor reset halt
break init
break abort
break __assert
continue

View File

@@ -0,0 +1,19 @@
/data_section_start_ram/ { data_start = $1 }
/data_section_end_ram/ { data_end = $1 }
/bss_section_start_ram/ { bss_start = $1 }
/bss_section_end_ram/ { bss_end = $1 }
/heap_start/ { heap_start = $1 }
/heap_end/ { heap_end = $1 }
/stack_start/ { stack_start = $1 }
/stack_end/ { stack_end = $1 }
function log_section(name, start, end) {
printf("%s: 0x%x - 0x%x (0x%x = %d = %dK)\n", name, start, end, end-start, end-start, (end-start)/1024)
}
END {
log_section("DATA ", data_start, data_end);
log_section("BSS ", bss_start, bss_end);
log_section("HEAP ", heap_start, heap_end);
log_section("STACK", stack_end, stack_start);
}

7
build/device/openocd.cfg Normal file
View File

@@ -0,0 +1,7 @@
source [find interface/stlink-v2.cfg]
transport select hla_swd
source [find target/stm32f4x.cfg]
#reset_config srst_only