Created
June 19, 2018 19:48
-
-
Save martinribelotta/ebae77aaa902355379a653fdf21e771e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ftdi | |
ftdi_device_desc "Dual RS232-HS" | |
ftdi_vid_pid 0x0403 0x6010 | |
ftdi_channel 0 | |
ftdi_layout_init 0x0708 0xFFFB | |
ftdi_layout_signal nTRST -data 0x0100 | |
ftdi_layout_signal nSRST -data 0x0200 | |
transport select jtag | |
adapter_khz 2000 | |
set _CHIPNAME lpc4337 | |
set _M4_JTAG_TAPID 0x4ba00477 | |
set _M0_JTAG_TAPID 0x0ba01477 | |
jtag newtap $_CHIPNAME m4 -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_M4_JTAG_TAPID | |
dap create $_CHIPNAME.m4.dap -chain-position $_CHIPNAME.m4 | |
target create $_CHIPNAME.m4 cortex_m -dap $_CHIPNAME.m4.dap | |
jtag newtap $_CHIPNAME m0 -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_M0_JTAG_TAPID | |
dap create $_CHIPNAME.m0.dap -chain-position $_CHIPNAME.m0 | |
target create $_CHIPNAME.m0 cortex_m -dap $_CHIPNAME.m0.dap | |
set _WORKAREASIZE 0x8000 | |
$_CHIPNAME.m4 configure -work-area-phys 0x10000000 -work-area-size $_WORKAREASIZE | |
set _FLASHNAME $_CHIPNAME.flash | |
flash bank $_FLASHNAME lpc2000 0x1a000000 0x80000 0 0 $_CHIPNAME.m4 lpc4300 96000 calc_checksum | |
reset_config none | |
cortex_m reset_config vectreset | |
targets $_CHIPNAME.m4 | |
$_CHIPNAME.m4 configure -event gdb-attach { | |
echo "Reset Halt, due to gdb attached...!" | |
reset halt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment