From: <jia...@by...> - 2018-11-01 04:12:04
|
Good day, I use a daisy chain configuration for 2 STM32 MCUs: J Link(TDI)-->(TDI)stm32f217(TDO)-->(TDI)stm32f302(TDO)-->(TDO)J Link I think I have set up the TAPs correctly, but the "flash write_image" always flash the same MCU, it does not switch target. I use the "targets" command below for switching target before flash program: targets stm32f217.cpu init reset init flash write_image erase unlock "mcu1_pb6_fast.hex" reset run but it failed at switching... What's wrong here? -------------------------- my whole board.cfg file: # interface interface jlink jlink serial 304439649 # board transport select jtag set CHIPNAME stm32f302 source [find target/stm32f3x.cfg] set CHIPNAME stm32f217 source [find target/stm32f2x.cfg] reset_config none targets stm32f217.cpu init reset init flash write_image erase unlock "mcu1_pb6_fast.hex" reset run targets stm32f302.cpu init reset init flash write_image erase unlock "mcu2_pb11_fast.hex" reset run shutdown --------------------------- outputs: Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html adapter speed: 1000 kHz adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 none separate cortex_m reset_config sysresetreq Info : replaced existing 'mrw' usage Info : replaced existing 'mrw' help Info : replaced existing 'mrb' usage Info : replaced existing 'mrb' help Info : replaced existing 'mmw' usage Info : replaced existing 'mmw' help adapter speed: 1000 kHz adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 none separate cortex_m reset_config sysresetreq none separate Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46 Info : Hardware version: 8.00 Info : VTarget = 3.293 V Info : clock speed 1000 kHz Info : JTAG tap: stm32f302.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f302.bs tap/device found: 0x06422041 (mfg: 0x020 (STMicroelectronics), part: 0x6422, ver: 0x0) Info : JTAG tap: stm32f217.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f217.bs tap/device found: 0x06411041 (mfg: 0x020 (STMicroelectronics), part: 0x6411, ver: 0x0) Info : stm32f302.cpu: hardware has 6 breakpoints, 4 watchpoints Info : stm32f217.cpu: hardware has 6 breakpoints, 4 watchpoints adapter speed: 1000 kHz Info : JTAG tap: stm32f302.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f302.bs tap/device found: 0x06422041 (mfg: 0x020 (STMicroelectronics), part: 0x6422, ver: 0x0) Info : JTAG tap: stm32f217.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f217.bs tap/device found: 0x06411041 (mfg: 0x020 (STMicroelectronics), part: 0x6411, ver: 0x0) target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08000cb0 msp: 0x20020000 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08000c60 msp: 0x20004000 adapter speed: 1000 kHz auto erase enabled auto unlock enabled Info : device id = 0x10036422 Info : flash size = 128kbytes wrote 4096 bytes from file mcu1_pb6_fast.hex in 0.543082s (7.365 KiB/s) adapter speed: 1000 kHz Info : JTAG tap: stm32f302.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f302.bs tap/device found: 0x06422041 (mfg: 0x020 (STMicroelectronics), part: 0x6422, ver: 0x0) Info : JTAG tap: stm32f217.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f217.bs tap/device found: 0x06411041 (mfg: 0x020 (STMicroelectronics), part: 0x6411, ver: 0x0) adapter speed: 1000 kHz Info : JTAG tap: stm32f302.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f302.bs tap/device found: 0x06422041 (mfg: 0x020 (STMicroelectronics), part: 0x6422, ver: 0x0) Info : JTAG tap: stm32f217.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f217.bs tap/device found: 0x06411041 (mfg: 0x020 (STMicroelectronics), part: 0x6411, ver: 0x0) target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08000cb0 msp: 0x20020000 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08000c60 msp: 0x20004000 adapter speed: 1000 kHz auto erase enabled auto unlock enabled wrote 4096 bytes from file mcu2_pb11_fast.hex in 0.503070s (7.951 KiB/s) adapter speed: 1000 kHz Info : JTAG tap: stm32f302.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f302.bs tap/device found: 0x06422041 (mfg: 0x020 (STMicroelectronics), part: 0x6422, ver: 0x0) Info : JTAG tap: stm32f217.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) Info : JTAG tap: stm32f217.bs tap/device found: 0x06411041 (mfg: 0x020 (STMicroelectronics), part: 0x6411, ver: 0x0) shutdown command invoked |