1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/msba2: Added OpenOCD config

This commit is contained in:
Marian Buschsieweke 2019-08-21 18:00:28 +02:00
parent 83e092e585
commit 0c04e07740
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 37 additions and 0 deletions

View File

@ -1,3 +1,4 @@
USEMODULE += boards_common_msba2
include $(RIOTBOARD)/common/msba2/Makefile.include
include $(RIOTMAKE)/tools/openocd.inc.mk

36
boards/msba2/dist/openocd.cfg vendored Normal file
View File

@ -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 <chip_name> <cputapid> <flash_size> <flash_variant> <workarea_size> <core_freq_khz> <adapter_freq_khz>
setup_lpc2xxx lpc2387 0x4f1f0f0f 0x7d000 lpc2000_v2 0x10000 $core_freq_khz $adapter_freq_khz
}
proc init_targets {} {
# setup_lpc2387 <core_freq_khz> <adapter_freq_khz>
setup_lpc2387 4000 500
}