diff --git a/boards/msba2/Makefile.include b/boards/msba2/Makefile.include index 8c26e275d0..305c09b03d 100644 --- a/boards/msba2/Makefile.include +++ b/boards/msba2/Makefile.include @@ -1,3 +1,4 @@ USEMODULE += boards_common_msba2 include $(RIOTBOARD)/common/msba2/Makefile.include +include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/msba2/dist/openocd.cfg b/boards/msba2/dist/openocd.cfg new file mode 100644 index 0000000000..02c3f1feec --- /dev/null +++ b/boards/msba2/dist/openocd.cfg @@ -0,0 +1,36 @@ +interface ftdi +ftdi_vid_pid 0x0403 0x6010 + +# Every pin set as high impedance except TCK, TDI, TDO and TMS +ftdi_layout_init 0x0008 0x000b + +# nSRST defined on pin CN2-13 of the MiniModule (pin ADBUS5 [AD5] on the FT2232H chip) +# This choice is arbitrary. Use other GPIO pin if desired. +ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020 + +ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010 +transport select jtag + +# ADBUS 0 - 5 are used +# 0 TCK +# 1 TDI +# 2 TDO +# 3 TMS +# 4 nTRST +# 5 nSRST + + +source [find target/lpc2xxx.cfg] +# parameters: +# - core_freq_khz - frequency of core in kHz during flashing, usually equal to connected crystal or internal oscillator, e.g. 12000 +# - adapter_freq_khz - frequency of debug adapter in kHz, should be 8x slower than core_freq_khz, e.g. 1000 + +proc setup_lpc2387 {core_freq_khz adapter_freq_khz} { + # setup_lpc2xxx + setup_lpc2xxx lpc2387 0x4f1f0f0f 0x7d000 lpc2000_v2 0x10000 $core_freq_khz $adapter_freq_khz +} + +proc init_targets {} { + # setup_lpc2387 + setup_lpc2387 4000 500 +}