[OpenOCD-devel] Support Kinetis KS22

2018-11-01 Thread Chris Fryer
I'm trying to add support for Kinetis KS22 (currently comes back as unsupported SSID 0x22000418). The DIEID (0b01000) doesn't match what the reference manual says it should be (0b10111) and I've asked a question on NXP about that. I've added some code to kinetis.c (see patch below) to recogni

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 12:49, Paul Fertser wrote: Here's a log with 2596 applied with "reset init": It looks fine, and if you didn't have reset init there, you'd be able to call mdm mass_erase I think. If mdm check_security worked (and it did, judging by the message), so should mdm mass_erase too. and wi

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 09:48, Paul Fertser wrote: > On Fri, Mar 13, 2015 at 09:36:35AM +0000, Chris Fryer wrote: >> This is a log of attempting to connect to a secured part: > Is that with 2596 applied? Where does "reset init" come from? I think > it might be one of the reasons md

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 08:30, Paul Fertser wrote: > On Fri, Mar 13, 2015 at 08:24:04AM +0000, Chris Fryer wrote: >> >> I would add that connecting to factory blank K1x devices (whilst in >> their initial COP reset loop) is seriously temperamental and connecting >> to secured K1

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 07:30, Tomas Vanek wrote: > I don't think that robust reset is needed only for PSoC4 and SAM4L. > E.g. Kinetis K2x sometimes needs numerous reset before OpenOCD regains > control. I would add that connecting to factory blank K1x devices (whilst in their initial COP reset loop) is serio

Re: [OpenOCD-devel] New problem connecting to Kinetis MK10DN32

2014-09-25 Thread Chris Fryer
I did inadvertently secure the device because I erased the flash configuration field. I think I need to do some more research/experiments ... Chris On 25/09/14 11:12, Andreas Fritiofson wrote: On Thu, Sep 25, 2014 at 11:34 AM, Chris Fryer <mailto:chrisf1...@gmail.com>> wrote: I

Re: [OpenOCD-devel] New problem connecting to Kinetis MK10DN32

2014-09-25 Thread Chris Fryer
hange set and expect to be able to protect/unprotect devices? or is it likely that I'll break more parts? Regards Chris On 24/09/14 12:45, Chris Fryer wrote: > I've been using openocd for some months now (including auto mass erase > of new ICs) with no issues but today I ran into a

[OpenOCD-devel] New problem connecting to Kinetis MK10DN32

2014-09-24 Thread Chris Fryer
I've been using openocd for some months now (including auto mass erase of new ICs) with no issues but today I ran into a problem that I can't seem to fix. I wanted to erase a part and not reprogramme it so I checked the manual and issued: flash banks flash erase_sector 0 0 last flash erase_chec

[OpenOCD-devel] Option to hold reset for mass erase?

2014-05-07 Thread Chris Fryer
Hi, I've just run across this Kinetis issue whereby, with brand new parts, you have to hold them in reset and perform a mass erase before openocd can connect to them properly. I'm putting together an ATE rig around openocd (CMSIS-DAP) so would l

Re: [OpenOCD-devel] Problems building openocd for cmsis-dap using HIDAPI

2013-12-23 Thread Chris Fryer
On 23/12/13 13:19, Spencer Oliver wrote: > I am assuming you have tweaked your udev rules, as a test run as sudo Sir, you assume way too much!!! Running as sudo solves the issue. Pointers as to how to go about tweaking my udev rules would be appreciated. I can't see any hidraw rules ... ---

Re: [OpenOCD-devel] Problems building openocd for cmsis-dap using HIDAPI

2013-12-23 Thread Chris Fryer
On 23/12/13 13:11, Spencer Oliver wrote: > x86-64 is 64bit. ... :-[ > > openocd -d3 ... > chris:~$ openocd -d3 Open On-Chip Debugger 0.8.0-dev-00283-g8994597 (2013-12-20-15:28) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html User : 13 3 com

Re: [OpenOCD-devel] Problems building openocd for cmsis-dap using HIDAPI

2013-12-23 Thread Chris Fryer
On 23/12/13 12:38, Spencer Oliver wrote: > see if the lib is available with ldconfig -p | grep hid chris:~$ ldconfig -p | grep hid libhidapi-libusb.so.0 (libc6,x86-64) => /usr/local/lib/libhidapi-libusb.so.0 libhidapi-libusb.so (libc6,x86-64) => /usr/local/lib/libhidapi-libusb.so l

Re: [OpenOCD-devel] Problems building openocd for cmsis-dap using HIDAPI

2013-12-23 Thread Chris Fryer
On 23/12/13 10:29, Spencer Oliver wrote: > Just a thought did you run ldconfig after installing hidapi ? Cheers Spen I hadn't done that. I just ran sudo ldconfig (is there more to it than that?). That completed with no reports but it's made no difference. I get the same reports from ./configure

[OpenOCD-devel] Problems building openocd for cmsis-dap using HIDAPI

2013-12-23 Thread Chris Fryer
I'm having problems getting the latest development version of oocd with cmsis-dap support to find the HIDAPI library files. I've built and installed HIDAPI and can see the following files in /usr/local/lib: libhidapi-hidraw.a libhidapi-libusb.la libhidapi-hidraw.lalibhidapi-libus

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-24 Thread Chris Fryer
On 20/09/13 14:53, Thomas Schmid wrote: > > The binary I sent above still bricks my oocd connections. I am not > 100% sure why, but I believe that it reconfigures the reset GPIO line > to be a regular output pin and pulls it low. > I managed to get my device into a similar state to the one that T

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-20 Thread Chris Fryer
On 20/09/13 08:44, Chris Fryer wrote: I'll try to find a more controlled way to break my uC to see if I can bring it back without manual reset intervention. I can now send my device to DEEPSLEEP (Kinetis VLLS0) and connect properly using oocd without any manual intervention. Thanks as

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-20 Thread Chris Fryer
I can confirm that (using the patch and correct reset_config) I /do/ now see a pulse on the resetb line (two in fact) during oocd attach (using the right channel on the scope helps :-[ ). I'll try to find a more controlled way to break my uC to see if I can bring it back without manual reset i

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 15:55, Thomas Schmid wrote: Yes, very quick: 1. disconnect your board, press reset button and hold it while plugging board back in. 2. Drop this bootloader on the BOOTLOADER drive: https://mbed.org/media/uploads/samux/mbed_if_v2.0_frdm_kl25z.s19 3. Unplug, plug back in. 4. Drop th

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 17:27, Spencer Oliver wrote: > I also switched to the mbed dap driver, just to make sure that this is not > the problem. > > The application I am trying to flash is this one: > > https://community.freescale.com/servlet/JiveServlet/download/312559-255229/test-frdm-kl25z.tar.gz > > Binar

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 16:33, Spencer Oliver wrote: > That cmd is not correct, try: > reset_config srst_only srst_nogate > the cmd you tried is for setting the core reset, it is confusing i know. > > Just done a quick test and it seems to be working here. Hmmm ... something funny going on. Maybe I'm a patch s

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 16:12, Thomas Schmid wrote: > Should work on Linux and Mac, depending on your bootloader version. At > least on my Ubuntu 13.04, the BOOTLOADER drive shows up. I'm on Ubuntu 13.04 and the BOOTLOADER drive shows up but IIRC dropping an S19 file on it had no effect. I could only reflash

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 15:53, Spencer Oliver wrote: > Another option is to press and release the reset button while OpenOCD > is trying to connect. It may take a few attempts but usually works, > the object is to connect before any code is executed. Cheers Spen No luck with any of the reset_config options

Re: [OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
On 19/09/13 15:29, Thomas Schmid wrote: You can unstuck your device by reprogramming it using the mbed.org tools. At least, that's what worked for me. Thanks for the suggestion. I haven't used mbed at all and from a quick look, it's not obvious how to access these 'tools'. Is

[OpenOCD-devel] cmsis-dap reset problem

2013-09-19 Thread Chris Fryer
I've managed to break my (openocd-FRDM-KL46z-cmsis-dap-K10) system by putting the uC to sleep immediately on power up with no wakeup mechanism and now can't connect using openocd to reflash it. I can't see any activity on the reset line during attempted connection. Should there be? Reset restar

Re: [OpenOCD-devel] Issues with kinetis.c

2013-09-05 Thread Chris Fryer
Spen, Thanks for all your help with this. I've reviewed your patches on gerrit and am just about to start using my eclipse/gdb/openocd/cmsis-dap setup in anger so will report back how I get on. All seems usable at this point - flashing, BPs, stepping over/in/out, variables, registers (not tried

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-29 Thread Chris Fryer
On 28/08/13 23:50, Chris Kilgour wrote: >> On the part that I'm using, bits 8:7 of SDID are '11' pointing to 4kb sector >> sizes. > The code was developed primarily for Kinetis 'K' series parts. I > exhaustively looked at every K-series data sheet to make the table, but did > not look into the

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Chris Fryer
On 27/08/13 10:14, Chris Fryer wrote: > The first problem was that when 'flash info 0' was run, the code would > quit with an assert(bank->num_sectors > 0); > This turned out to be a simple fix: size and count reversed when > calling target_read_memory to get config

[OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Chris Fryer
I've been trying to use the new cmsis-dap implementation (from http://openocd.zylin.com/1542) to work with a Freescale FRDM-KL46Z board (comes with a MKL46Z256VLL4 uc) and have found a couple of issues with the kinetis.c flash code. The first problem was that when 'flash info 0' was run, the c