This is an automated email from Gerrit. Adrian M Negreanu ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5916
-- gerrit commit 942d803a483b33e7eb2b240e8b40792b6405d43e Author: Adrian Negreanu <[email protected]> Date: Mon Nov 2 22:32:58 2020 +0200 [WIP] tcl/target: add imxrt1170_cm7 Change-Id: I3cddb9e794ba6e9be239d67a9a6fdcf395354b62 Signed-off-by: Adrian Negreanu <[email protected]> diff --git a/tcl/target/imxrt1170_cm7.cfg b/tcl/target/imxrt1170_cm7.cfg new file mode 100644 index 0000000..392c902 --- /dev/null +++ b/tcl/target/imxrt1170_cm7.cfg @@ -0,0 +1,43 @@ +# +# i.mxRT1170 devices support both JTAG and SWD transports. +# +source [find target/swj-dp.tcl] +source [find mem_helper.tcl] + +# parameters: +# - chip_name - name of the chip, e.g. lpc2103 +# - cputapid - TAP ID of the core +# - flash_size - size of on-chip flash (available for code, not including the bootloader) in bytes, e.g. 0x8000 +# - flash_variant - "type" of LPC2xxx device, lpc2000_v1 (LPC22xx and older LPC21xx) or lpc2000_v2 (LPC213x, LPC214x, LPC210[123], LPC23xx and LPC24xx) +# - workarea_size - size of work-area in RAM for flashing procedures, must not exceed the size of RAM available at 0x40000000, e.g. 0x2000 +# - 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_imxrt1170 {chip_name cputapid flash_size flash_variant workarea_size core_freq_khz adapter_freq_khz} { + global _TARGETNAME + set _TARGETNAME $chip_name.cm7 + + reset_config none + + adapter speed $adapter_freq_khz + + swj_newdap $chip_name cpu -irlen 4 -ircapture 0x1 -irmask 0xF -expected-id $cputapid + dap create $chip_name.dap -chain-position $chip_name.cpu + + target create $chip_name.cm7 cortex_m -dap $chip_name.dap -endian little -ap-num 0 -coreid 0 + target create $chip_name.axi mem_ap -dap $chip_name.dap -endian little -ap-num 0 + + cti create $chip_name.cti.sys -dap $chip_name.dap -ap-num 0 -baseaddr 0xe0044000 + cti create $chip_name.cti.cm7 -dap $chip_name.dap -ap-num 0 -baseaddr 0xe0042000 + + # tap core APID ROM Table + # AP0: 6BA02477 M7 0x84770001 0xE00FD003 + # AP1: 6BA02477 M4 0x24770011 0xE00FF003 + # AP2: 6BA02477 APB-AP 0x54770002 0x???????? + + $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $workarea_size -work-area-backup 0 +} + +proc init_targets {} { + # <chip_name> <cputapid> <flash_size> <flash_variant> <workarea_size> <core_freq_khz> <adapter_freq_khz> + setup_imxrt1170 imxrt1170 0x6BA02477 0x8000 lpc2000_v2 0x8000 96000 12000 +} -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
