tests: extract serials to optional local config
Instead of having committed files containing a single developer's serials, use optional includes to include a local config file for each board. If you have only a single board connected, simply: $ make -f Makefile.<board> clean all flash If you have multiple boards connected, make sure to fill in the appropriate hla_serial in your openocd.<board>.local.cfg file, and then run the same commands.
This commit is contained in:
parent
5738e9515d
commit
84dec14d60
1
tests/gadget-zero/.gitignore
vendored
Normal file
1
tests/gadget-zero/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
openocd.*.local.cfg
|
10
tests/gadget-zero/openocd.common.cfg
Normal file
10
tests/gadget-zero/openocd.common.cfg
Normal file
@ -0,0 +1,10 @@
|
||||
# Shared openocd script helpers
|
||||
|
||||
# put things like "hla_serial 'asdfadfa'" in openocd.<board>.local.cfg to support
|
||||
# multiple simultaneously connected boards.
|
||||
proc optional_local { LOCAL_FILE } {
|
||||
if { [ file exists $LOCAL_FILE ] } {
|
||||
puts "Loading custom local settings from $LOCAL_FILE"
|
||||
source $LOCAL_FILE
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@ source [find interface/stlink-v2.cfg]
|
||||
set WORKAREASIZE 0x4000
|
||||
source [find target/stm32f0x.cfg]
|
||||
|
||||
# serial of my f072 disco board.
|
||||
hla_serial "Q?o\x06PgHW#$\x16?"
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32f072disco.local.cfg"
|
||||
|
||||
# no trace on cm0
|
||||
#tpiu config internal swodump.stm32f4disco.log uart off 168000000
|
||||
|
@ -4,8 +4,8 @@ source [find interface/stlink-v2.cfg]
|
||||
set WORKAREASIZE 0x2000
|
||||
source [find target/stm32f1x.cfg]
|
||||
|
||||
# Serial of my l1 disco used as stlink here.
|
||||
hla_serial "S?l\x06H?WQ%\x10\x18?"
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32f103-generic.local.cfg"
|
||||
|
||||
tpiu config internal swodump.stm32f103-generic.log uart off 72000000
|
||||
|
||||
|
@ -2,8 +2,8 @@ source [find interface/stlink-v2.cfg]
|
||||
set WORKAREASIZE 0x4000
|
||||
source [find target/stm32f4x.cfg]
|
||||
|
||||
# serial of "your" f429i disco board.
|
||||
hla_serial "xxxxxW?k\x06IgHV0H\x10?"
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32f429i-disco.local.cfg"
|
||||
|
||||
tpiu config internal swodump.stm32f429i-disco.log uart off 168000000
|
||||
|
||||
|
@ -2,8 +2,8 @@ source [find interface/stlink-v2.cfg]
|
||||
set WORKAREASIZE 0x4000
|
||||
source [find target/stm32f4x.cfg]
|
||||
|
||||
# serial of my f4 disco board.
|
||||
hla_serial "W?k\x06IgHV0H\x10?"
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32f4disco.local.cfg"
|
||||
|
||||
tpiu config internal swodump.stm32f4disco.log uart off 168000000
|
||||
|
||||
|
@ -2,8 +2,8 @@ source [find interface/stlink-v2-1.cfg]
|
||||
set WORKAREASIZE 0x1000
|
||||
source [find target/stm32l0.cfg]
|
||||
|
||||
# serial of my l053 disco board.
|
||||
hla_serial "0670FF484849785087085514"
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32l053disco.local.cfg"
|
||||
|
||||
# no trace on cm0
|
||||
#tpiu config internal swodump.stm32f4disco.log uart off 168000000
|
||||
|
@ -3,10 +3,8 @@ source [find interface/stlink-v2-1.cfg]
|
||||
set WORKAREASIZE 0x2000
|
||||
source [find target/stm32l1.cfg]
|
||||
|
||||
hla_serial "066DFF495351885087171826" # My l4 disco
|
||||
|
||||
# Serial of my l1 disco used as stlink here.
|
||||
#hla_serial "S?l\x06H?WQ%\x10\x18?" # My l1 disco
|
||||
source openocd.common.cfg
|
||||
optional_local "openocd.stm32l1-generic.local.cfg"
|
||||
|
||||
tpiu config internal swodump.stm32l1-generic.log uart off 32000000
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user