Code debug with JTAG

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,

 

I have a program which hangs. The actual bug is quite interesting, and the bug is somewhere in the intersection of compiler directives, ISRs, FreeRTOS and USB hardware. But for the time being I'm more into finding a good debug method.

 

I have a Atmel JTAGICE mkII available. The code is built from the command line in Cygwin using make and some scripts. I have AVR32studio 2.6 installed but only use it as an editor.

 

Until now I've been able to find most issues by inserting some GPIO toggles viewed on my 'scope or single-letter printout to UART. This time around the bug is harder to find.

 

I hope you can suggest a toolchain which isn't too far from what I've got and which is able to show me where in the code the MCU hangs.

 

 

Thanks,

Borge

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you use Cygwin then you clearly use Windows so why not simply download Atmel Studio 6.2 which undoubtedly will offer the best experience for driving the JTAGICEmkII ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the advice. I'll try to get the project to build on AS6.2 on a clean machine.

 

Cygwin is used because a lot of guys build the same codebase on Linux.

 

I'm basically stuck with a program which doesn't boot up if the USB cable is unplugged at reset. With the USB cable in bootup is just fine. However, I'm able to delay some startup mechanisms and have it behave exactly the opposite way.

 

So for the time being I'm pretty desperate to find out what code hogs the MCU in the two cases, and then try to mend it.

 

 

Børge