Hi,

On 20/01/12 08:07, thomas haas wrote:
> I have a kinetis K60 tower also. I have connected the tower with the
> jtagkey compatible hardware and started the debugger with the
> tower-board-configuration. The debugger is starting correctly (ID is
> recognized , watchpoints and breakpoints are correct). But when I try to
> start debugging the system fails.
> A script with flashing the elf-file only  is working, but starting gdb
> the openocd fails. I added the "gdb_memory_map disable". I that case the
> openocd did work, but (of cause) the gdb "load" commando did not work.
> Are there any experience with K60 -tower from Kinetis ? I am also using
> the j-Trace from Segger in parallel  (with the segger gdb-server).
> Segger also seems to have problems with the K60 (the gdb shows
> re-starts), but with newer versions it is working. I would be happy to
> get some helpful hints. Thanks 

I use openocd with J-Link and twr-k60 as well as Kwikstik, and both of
them work for me. The one issue I run into is that the jtag has to be
run at a low speed for gdb to attach correctly, once it is attached, you
can up it (I think the Segger server does something similar); I have
attached my openocd cfg file, in case it is of any use.

Tomas

# global variable MY_FLASH_ENABLED is used to controll whether gdb flashing
# capabilites are enabled; defaults to disabled, to enable run openocd as:
#
#    openocd -c "set MY_FLASH_ENABLED 1" -f openocd.cfg
#
# NB: the set command must preceed the the sourcing of this cfg file
#
# (To flash from gdb the server must supply gdb with a memory map; in order to
# carry out the necessary flash probe to obtain this, the target must be halted
# first).

# set the default value for MY_FLASH_ENABLED
if { ![info exists MY_FLASH_ENABLED] } {
    set MY_FLASH_ENABLED 0
}

# these have to be called before init
if { $MY_FLASH_ENABLED } {
    echo "Enabling GDB memory map and flash program"
    gdb_memory_map enable
    gdb_flash_program enable
} else {
    echo "Disabling GDB memory map and flash program"
    gdb_memory_map disable
    gdb_flash_program disable
}

source [find interface/jlink.cfg]
# 100k seems to be necessary to get things going, we increase it later
adapter_khz 100

source [find board/twr-k60n512.cfg]
#source [find board/kwikstik.cfg]

# handler for the gdb-attach event; halts the target if flashing was enabled
# ups the jtag speed
proc my_gdb_attach_proc { } {
    global MY_FLASH_ENABLED

    if { $MY_FLASH_ENABLED } {
        echo "Reset so we can probe memory map ..."
        reset halt
    } else {
        echo "GDB attached; flash capability disabled."
    }

    echo "Setting jtag speed to 4MHz"
    adapter_khz 4000
}

$_TARGETNAME configure -event gdb-attach my_gdb_attach_proc
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to