Hello,

I am hitting an issue with OpenOCD and Segger JLink when trying to
program a Kinetis MCU (MK22FX512VLH12). Until Commit 2caa3455ad
everything is fine, starting with Commit 7f260f5009 and up to latest
master d8ac0086f9 initial flashing without using the device's memory map
fails. The error message indicates that increasing the timeout limit
might help. Executing a "set remotetimeout unlimited" does not change
anything about the issue and the message displayed though.

# OpenOCD

```

$ openocd -f interface/jlink.cfg -f myboard.cfg -c 'gdb_memory_map disable'

[...]

** Programming Started **
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive
packet not sent! (1524). Workaround: increase "set remotetimeout" in GDB
** Programming Finished **

[...]

```

Complete output is attached as openocd.log.

In constrast what this part looks like when it is working (e.g. on
2caa3455ad):

```

** Programming Started **
auto erase enabled
wrote 61440 bytes from file myprog.hex in 1.517295s (39.544 KiB/s)
** Programming Finished **

```


# GDB

```

$ arm-none-eabi-gdb -ex 'set confirm off' -ex 'target remote
localhost:3337' -ex 'mon kinetis mdm halt' -ex 'mon reset init' -ex 'mon
program myprog.hex' -ex 'quit'

```

Complete output is attached as gdb.log.


# Board config

```

transport select jtag

gdb_port 3337
set CHIPNAME egs-z-supervisor
source [find target/kx.cfg]
set CHIPNAME egs-z-active
source [find target/kx.cfg]

$_TARGETNAME configure -event reset-init {
    puts "-event reset-init occured"
}

```


I'd be grateful for any help.

Regards,

Jonatan H. Zeidler


-- 
Jonatan Hatakeyama Zeidler | medineering GmbH | Olof-Palme-Str. 1
81829 München | T +49 89 416137243 | F +49 89 416137249
Sitz der Gesellschaft: München
Handelsregister: HRB 212991 | USt-ID-Nr.: DE296021936
Geschäftsführer: Dr.-Ing. Maximilian Krinninger, Dr.-Ing. Stephan Nowatschin

Open On-Chip Debugger 0.10.0+dev-00850-g7f260f5 (2020-05-27-12:33)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : add flash_bank kinetis egs-z-supervisor.pflash
Info : add flash_bank kinetis egs-z-active.pflash
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Oct 22 2019 16:28:15
Info : Hardware version: 10.10
Info : VTarget = 3.328 V
Info : clock speed 1000 kHz
Info : JTAG tap: egs-z-supervisor.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: egs-z-active.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : MDM: Chip is unsecured. Continuing.
Info : egs-z-supervisor.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : MDM: Chip is unsecured. Continuing.
Info : egs-z-active.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3337 for gdb connections
Info : Listening on port 3338 for gdb connections
Info : accepting 'gdb' connection on tcp/3337
Info : New GDB Connection: 1, Target egs-z-supervisor.cpu, state: halted
undefined debug reason 8 - target needs reset
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
Info : JTAG tap: egs-z-supervisor.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: egs-z-active.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : MDM: Chip is unsecured. Continuing.
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000538 msp: 0x20010000
Info : Kinetis MK22FX512xxx12 detected: 2 flash blocks
Info : 1 PFlash banks: 512k total
Info : 1 FlexNVM banks: 128k total, 64k available as data flash, 4096bytes FlexRAM
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
-event reset-init occured
Info : JTAG tap: egs-z-supervisor.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: egs-z-active.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : MDM: Chip is unsecured. Continuing.
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000538 msp: 0x20010000
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
-event reset-init occured
** Programming Started **
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1524). Workaround: increase "set remotetimeout" in GDB
** Programming Finished **
Info : dropped 'gdb' connection
shutdown command invoked
GNU gdb (7.10-1ubuntu3+9) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Remote debugging using localhost:3337
0x2000001e in ?? ()
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
JTAG tap: egs-z-supervisor.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
JTAG tap: egs-z-active.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
MDM: Chip is unsecured. Continuing.
MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000538 msp: 0x20010000
Kinetis MK22FX512xxx12 detected: 2 flash blocks
1 PFlash banks: 512k total
1 FlexNVM banks: 128k total, 64k available as data flash, 4096bytes FlexRAM
Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
WDOG_STCTRLH = 0x01d2
JTAG tap: egs-z-supervisor.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
JTAG tap: egs-z-active.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
MDM: Chip is unsecured. Continuing.
MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000538 msp: 0x20010000
Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
WDOG_STCTRLH = 0x01d2
** Programming Started **
keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1524). Workaround: increase "set remotetimeout" in GDB
** Programming Finished **
Detaching from program: , Remote target
Ending remote debugging.
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to