From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22024 invoked by alias); 15 Feb 2012 07:59:54 -0000 Received: (qmail 22015 invoked by uid 22791); 15 Feb 2012 07:59:53 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,TW_CF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from r-finger.com (HELO r-finger.com) (178.79.160.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Feb 2012 07:59:39 +0000 Received: from [192.168.0.2] (host86-133-44-19.range86-133.btcentralplus.com [86.133.44.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by r-finger.com (Postfix) with ESMTPSA id 5009199C2 for ; Wed, 15 Feb 2012 07:59:38 +0000 (GMT) Message-ID: <4F3B65E9.3090103@r-finger.com> Date: Wed, 15 Feb 2012 07:59:00 -0000 From: Tomas Frydrych User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Icedove/3.1.13 MIME-Version: 1.0 To: ecos-devel@ecos.sourceware.org Subject: Re: [ECOS] Re: Flash memory not accessible via Redboot on Kinetis TWR_K60N512_KIT References: <4F3A082F.8060003@r-finger.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020107010001020101050503" X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2012-02/txt/msg00004.txt.bz2 This is a multi-part message in MIME format. --------------020107010001020101050503 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 1569 Hi Michael, On 15/02/12 04:40, Michael Bergandi wrote: >>> As of OpenOCD v0.5.0, I see no support and only a quick mention the >>> TODO. However, I did find one posting while Googling, that claimed >>> that OpenOCD had added support...unfortunately, they provided no >>> details. >> >> I use OpenOCD + JLink with the board, but you need to build OpenOCD from >> git, as the support for Kinetis TWR was only added quite recently. > > Does the free Segger JLinkGDBServer not work for you? I works, but it has limited functionality, most noticeably it will not let you load programs into flash, and OpenOCD seems to work just as well once you get it going. (But the JLink command tool that also comes with the free Segger tools is invaluable if you ever screw up the security bytes on the flash; it has a handy command to fix those.) There are a couple issues I run into with OpenOCD: 1. if you are using a newer version of gdb, there is a mismatch between the number of registers OpenOCD reports and gdb expects, and gdb will just exit with an error. Building OpenOCD from source something like this with fix it http://www.mail-archive.com/openocd-development@lists.berlios.de/msg14805.html. But I decided to patch gdb instead to just warn rather then error. 2. JLink has to be started at 100kHz for the initial handshake between the server and gdb, and only then can be speeded up. The Segger server seems to do this automatically, with OpenOCD you have to tweak the config file to achieve the same. (I have attached my cfg file, in case it is of any use). Tomas --------------020107010001020101050503 Content-Type: text/plain; name="openocd.cfg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="openocd.cfg" Content-length: 2026 IyBnbG9iYWwgdmFyaWFibGUgTVlfRkxBU0hfRU5BQkxFRCBpcyB1c2VkIHRv IGNvbnRyb2xsIHdoZXRoZXIgZ2RiIGZsYXNoaW5nCiMgY2FwYWJpbGl0ZXMg YXJlIGVuYWJsZWQ7IGRlZmF1bHRzIHRvIGRpc2FibGVkLCB0byBlbmFibGUg cnVuIG9wZW5vY2QgYXM6CiMKIyAgICBvcGVub2NkIC1jICJzZXQgTVlfRkxB U0hfRU5BQkxFRCAxIiAtZiBvcGVub2NkLmNmZwojCiMgTkI6IHRoZSBzZXQg Y29tbWFuZCBtdXN0IHByZWNlZWQgdGhlIHRoZSBzb3VyY2luZyBvZiB0aGlz IGNmZyBmaWxlCiMKIyAoVG8gZmxhc2ggZnJvbSBnZGIgdGhlIHNlcnZlciBt dXN0IHN1cHBseSBnZGIgd2l0aCBhIG1lbW9yeSBtYXA7IGluIG9yZGVyIHRv CiMgY2Fycnkgb3V0IHRoZSBuZWNlc3NhcnkgZmxhc2ggcHJvYmUgdG8gb2J0 YWluIH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