Hello,
i would like to flash the STM32F7 via openocd using J-TAG port.
I just downloaded and installed the latest version from Git repo.
There is some ( errors? ) warnings when scan the J-TAG chain.

Here is the short log of the J-TAG chain scan:

Debug: 306 8 mpsse.c:772 mpsse_set_frequency(): actually 600000 Hz
Debug: 307 8 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 308 8 core.c:1601 adapter_khz_to_speed(): have interface set up
Info : 309 8 core.c:1386 adapter_init(): clock speed 600 kHz
Debug: 310 8 openocd.c:135 handle_init_command(): Debug Adapter init complete Debug: 311 8 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport init Debug: 312 8 command.c:143 script_debug(): command - ocd_transport ocd_transport init
Debug: 314 8 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 315 8 core.c:729 jtag_add_reset(): SRST line released
Debug: 316 8 core.c:753 jtag_add_reset(): TRST line released
Debug: 317 8 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 318 212 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init Debug: 319 212 command.c:143 script_debug(): command - ocd_jtag ocd_jtag arp_init
Debug: 320 212 core.c:1399 jtag_init_inner(): Init JTAG chain
Debug: 321 212 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 322 212 core.c:1060 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 323 212 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Info : 324 213 core.c:959 jtag_examine_chain_display(): JTAG tap: stm32f7x.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5) Info : 325 213 core.c:959 jtag_examine_chain_display(): JTAG tap: stm32f7x.bs tap/device found: 0x06449041 (mfg: 0x020 (STMicroelectronics), part: 0x6449, ver: 0x0) Warn : 326 213 core.c:959 jtag_examine_chain_display(): JTAG tap: stm32f7x.bs UNEXPECTED: 0x06449041 (mfg: 0x020 (STMicroelectronics), part: 0x6449, ver: 0x0) Error: 327 213 core.c:959 jtag_examine_chain_display(): JTAG tap: stm32f7x.bs expected 1 of 1: 0x06449071 (mfg: 0x038 (UTMC), part: 0x6449, ver: 0x0) Error: 328 213 core.c:1444 jtag_init_inner(): Trying to use configured scan chain anyway... Debug: 329 213 core.c:1190 jtag_validate_ircapture(): IR capture validation scan Debug: 330 213 core.c:1248 jtag_validate_ircapture(): stm32f7x.cpu: IR capture 0x01 Debug: 331 214 core.c:1248 jtag_validate_ircapture(): stm32f7x.bs: IR capture 0x01 Warn : 332 214 core.c:1467 jtag_init_inner(): Bypassing JTAG setup events due to errors
Debug: 333 214 openocd.c:148 handle_init_command(): Examining targets...
Debug: 334 214 target.c:1499 target_call_event_callbacks(): target event 21 (examine-start)


But when it tries to flash the application it bails out with the following error:


Debug: 335 214 arm_adi_v5.c:603 dap_dp_init():
Debug: 336 214 arm_adi_v5.c:636 dap_dp_init(): DAP: wait CDBGPWRUPACK
Debug: 337 214 arm_adi_v5.h:428 dap_dp_poll_register(): DAP: poll 4, mask 0x20000000, value 0x20000000
Debug: 338 215 arm_adi_v5.c:643 dap_dp_init(): DAP: wait CSYSPWRUPACK
Debug: 339 215 arm_adi_v5.h:428 dap_dp_poll_register(): DAP: poll 4, mask 0x80000000, value 0x80000000 Debug: 340 217 arm_adi_v5.c:787 dap_find_ap(): Found AHB-AP at AP index: 0 (IDR=0x74770001) Debug: 341 218 arm_adi_v5.c:714 mem_ap_init(): MEM_AP Packed Transfers: enabled Debug: 342 218 arm_adi_v5.c:725 mem_ap_init(): MEM_AP CFG: large data 0, long address 0, big-endian 0 Debug: 343 218 target.c:2224 target_read_u32(): address: 0xe000ed00, value: 0x410fc271 Debug: 344 218 cortex_m.c:1923 cortex_m_examine(): Cortex-M7 r0p1 processor detected Warn : 345 218 cortex_m.c:1929 cortex_m_examine(): Silicon bug: single stepping will enter pending exception handler!
Debug: 346 218 cortex_m.c:1931 cortex_m_examine(): cpuid: 0x410fc271
Debug: 347 218 target.c:2312 target_write_u32(): address: 0xe000edfc, value: 0x01000000 Debug: 348 219 target.c:2224 target_read_u32(): address: 0xe0002000, value: 0x10000081 Debug: 349 219 target.c:2312 target_write_u32(): address: 0xe0002008, value: 0x00000000 Debug: 350 220 target.c:2312 target_write_u32(): address: 0xe000200c, value: 0x00000000 Debug: 351 221 target.c:2312 target_write_u32(): address: 0xe0002010, value: 0x00000000 Debug: 352 221 target.c:2312 target_write_u32(): address: 0xe0002014, value: 0x00000000 Debug: 353 222 target.c:2312 target_write_u32(): address: 0xe0002018, value: 0x00000000 Debug: 354 222 target.c:2312 target_write_u32(): address: 0xe000201c, value: 0x00000000 Debug: 355 223 target.c:2312 target_write_u32(): address: 0xe0002020, value: 0x00000000 Debug: 356 223 target.c:2312 target_write_u32(): address: 0xe0002024, value: 0x00000000 Debug: 357 224 cortex_m.c:2005 cortex_m_examine(): FPB fpcr 0x10000081, numcode 8, numlit 0 Debug: 358 224 target.c:2224 target_read_u32(): address: 0xe0001000, value: 0x40000001 Debug: 359 224 target.c:2312 target_write_u32(): address: 0xe0001028, value: 0x00000000 Debug: 360 225 target.c:2312 target_write_u32(): address: 0xe0001038, value: 0x00000000 Debug: 361 225 target.c:2312 target_write_u32(): address: 0xe0001048, value: 0x00000000 Debug: 362 226 target.c:2312 target_write_u32(): address: 0xe0001058, value: 0x00000000 Debug: 363 226 cortex_m.c:1842 cortex_m_dwt_setup(): DWT dwtcr 0x40000001, comp 4, watch/trigger Info : 364 226 cortex_m.c:2015 cortex_m_examine(): stm32f7x.cpu: hardware has 8 breakpoints, 4 watchpoints Debug: 365 226 target.c:1499 target_call_event_callbacks(): target event 22 (examine-end) Debug: 366 226 target.c:4254 target_handle_event(): target: (0) stm32f7x.cpu (cortex_m) event: 22 (examine-end) action:
    # DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
    mmw 0xE0042004 0x00000007 0

    # Stop watchdog counters during halt
    # DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
    mmw 0xE0042008 0x00001800 0

Debug: 367 227 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_mww 0xE0042004 7 Debug: 368 227 command.c:143 script_debug(): command - mww ocd_mww 0xE0042004 7 Error: 369 228 cortex_m.c:504 cortex_m_poll(): stm32f7x.cpu -- clearing lockup after double fault Debug: 370 229 target.c:1499 target_call_event_callbacks(): target event 0 (gdb-halt)


Debug: 3783 3557 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3784 3557 target.c:934 target_run_flash_async_algorithm(): offs 0x0 count 0x20000 wp 0x20000054 rp 0x20000054 Debug: 3785 3557 target.c:2015 target_write_buffer(): writing buffer of 16374 byte at 0x20000054 Info : 3786 3920 adi_v5_jtag.c:481 jtagdp_overrun_check(): DAP transaction stalled (WAIT) - slowing down Debug: 3788 4492 target.c:2312 target_write_u32(): address: 0x2000004c, value: 0x2000404a Debug: 3789 4493 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3790 4493 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054 Debug: 3791 4504 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3792 4504 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054 Debug: 3793 4515 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3794 4515 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054 Debug: 3796 4526 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3797 4526 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054 Debug: 3798 4537 target.c:2224 target_read_u32(): address: 0x20000050, value: 0x20000054 Debug: 3799 4537 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054




ebug: 4802 10098 target.c:934 target_run_flash_async_algorithm(): offs 0x3ff6 count 0x1e005 wp 0x2000404a rp 0x20000054 Error: 4803 10108 target.c:968 target_run_flash_async_algorithm(): timeout waiting for algorithm, a target reset is recommended Error: 4804 10109 stm32f2x.c:596 stm32x_write_block(): error executing stm32x flash write algorithm Error: 4805 10109 stm32f2x.c:604 stm32x_write_block(): flash write failed = 00000040 Debug: 4806 10109 target.c:2312 target_write_u32(): address: 0x40023c0c, value: 0x00000040 Debug: 4807 10110 target.c:1828 target_free_working_area_restore(): freed 16384 bytes of working area at address 0x2000004c Debug: 4808 10110 target.c:1622 print_wa_layout(): * 0x20000000-0x2000004b (76 bytes) Debug: 4809 10110 target.c:1622 print_wa_layout(): 0x2000004c-0x2003ffff (262068 bytes) Debug: 4810 10110 target.c:1828 target_free_working_area_restore(): freed 76 bytes of working area at address 0x20000000 Debug: 4811 10110 target.c:1622 print_wa_layout(): 0x20000000-0x2003ffff (262144 bytes) Error: 4812 10110 core.c:91 flash_driver_write(): error writing to flash at address 0x08000000 at offset 0x00000000 Debug: 4813 10110 command.c:626 run_command(): Command failed with error code -4
User : 4814 10110 command.c:687 command_run_line():


I see the same issue in the mailing list:

https://sourceforge.net/p/openocd/mailman/message/34621407/

Here is the full log:
http://pastebin.com/3ubK6JXs

Thank you in advance for any help/clue/hint you will give me.

Lorenzo







--






*Lorenzo Corti* | Ricerca e Sviluppo


*Eurek s.r.l. *Via Celletta 8/b | 40026 Imola (BO) - Italy | +39 *0542 609120*

[email protected] <mailto:[email protected]> | www.eurek.it <http://www.eurek.it/>


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to