I have been playing with the DL40 and have a few things working, one of the key things I wanted to get working is the ability to notify the mainboard of events using the interrupt support, which works as long as I am only dealing with 1 module. As soon as I chain a second module the interrupts stop functioning.
At the moment it is a lot of guess work since I am not able to debug the code, I basically read the code make some changes deploy everything test and repeat. So my question is, is there any info that anyone can provide with regard to using JTAG on the DL40?
I have never used JTAG, so as much detail as possible regarding the specifics of using JTAG with the DL40 would be appreciated, also suggested hardware that I might need etc.
Thanks,
Chris
Hi,
I did not work with it, but perhaps this can be helpful http://ics.nxp.com/lpcxpresso/
@ RoSchmi - Thank you, if I understand correctly this is an evaluation board. I am hoping to do something directly with the DL40. According to the wiki, I believe I should be able to use JTAG with the DL40.
What I am hoping for is that since GHI already build boards with the DL40 they have a good workflow/process for debugging the code etc. and that they could possibly share that development setup and process with us.
The best thing for you is to use the free version of Keil. It is limited to 32k but gutless what, the chip is 32k for JTAG, buy the student edition of jlink $60.
http://www.mouser.com/ProductDetail/Segger-Microcontroller/J-Link-EDU/?qs=sGAEpiMZZMvu8NZDyZ4K0dwf6o9Xeg1V
@ Gus - Excellent, thank you! I am using Keil, but I did not know what hardware I needed. How does this connect to the DL40? Or when I get it will it be obvious?
You will need to connect 4 wires from your DL40 to a 10x2pin 0.1" header to plug in the JTAG cable. The 4 wires are SWDIO and SWCLK then 3.3V(VCC) and GND.
See pins 7 and 9 in this image
@ Gus, This is excellent. I am excited about getting this now. Thank you for all the info!
Do not for get to update the wiki with some pictures when you get it going
I will try to do this on my end if I have extra time, which is not happening lately
I will most definitely share my experience once I get this up and running.
I got a present from the friendly FedEx man today. Spot the J-Link, once I get it up and running I will document the experience on the wiki. And then Ian is going to get his DL40 based Logic Analyzer. And Ian, I have not forgotten about the Signal Generator for the OSHW I have been working on it.
Cool. Let me know how the J-Link works out. I’ve been thinking of moving my tinkering up in that direction.
You will be a hero
Weekend is here and I get to play. Here is a pick of my new toy, the J-Link working with Keil uVision.
A quick video would be cool to help better understand what the capabilities are for those of us who have never used a JTAG debugger. Do you get step-through debugging? Can you only see the register values or can you also see variable values as you step through? Is the disassembly what is generated? Sorry, I’m not familiar enough with JTAG or Keil to know what is doing what…
Think of the JTAG adapter as a “remote debugger”. Just as you’d use a debugger (GDB) on a local program, you use a debugger plus a JTAG adapter (or SWD, if you’re working with an ST) to debug a remote program. Once you’ve got it working, it’s exactly like you’d debug NETMF programs. Breakpoints, watches, stepping, peeking/poking at memory and registers, it’s all exactly the same.
Where GDB normally attaches to a local process, it can also connect to a “remote” target. In this setup, the “remote” target is a “GDB server” that pretends like it’s a program, but is actually a proxy for the actual program running on the microcontroller.
The beauty of the STM discovery kits is that they come with the STLink/V2 that acts as the JTAG adapter built in. That, plus OpenOCD (the free-and-open-source GDB server), plus GDB and Eclipse as the IDE, and it’s just like debugging NETMF programs. More complex to set up, but once it all works, it’s very neat.
The J-Link works with pretty much anything, and is $60 or so for the non-commercial (EDU) version. It’s a very nice tool to have.
@ ianlee74 - I would make a video, but right now all I have is a web cam so my video making capabilities are very limited.
I too knew nothing about j-Tag or SWD until this thread started, and then I only received my J-Link on Monday this week so I am no expert. So far my experience has been exactly as @ godefroi says. I have the J-Link plugged into the USB, the 4 pins that @ Gus told me about earlier in this thread connected to the DL40 SWD interface. From there I use Keil uVision IDE just like I use Visual Studio with .NETMF except that it is with native code. I write code debug and execute, set breakpoints etc. I have one issue at the moment, but I will start a new thread for that.
You will notice that I connected the J-Link to the pins of the DL40, but I only later noticed that GHI was kind enough to expose the SWD pins on the downstream gadgeteer plug so I can connect that through and extender module. Actually a J-TAG/SWD Adapter Gadgeteer module would be nice then I would not have to have the fly leads to connect the SWD.
SWD is available on all the Cortex cores, so I can use that with my ST boards, but since they already have STLink there is no real point. On the Hydra I can use the J-Tag interface on Socket 1, here a J-Tag module would come in nicely.
Thanks for the info. Maybe Santa will bring me a J-Link and I’ll actually do something with these DL40s I’ve been staring at on my desk for so long…