Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: USB debugger
PostPosted: Thu Apr 26, 2012 1:46 pm 
Offline

Joined: Mon Feb 06, 2012 2:57 pm
Posts: 13
Hello,
I'm a new embedded develloper and i use a AT91SAM9x-ek evaluation kit Board. I know it is possible to debug embedded OS via USB or UART using putty ( with the evaluation kit, i used UART). It is also possible with the SAM9G35? where should I configure ? what USB i use ? Host or Device ?
Thanks for your answer.


Top
 Profile  
 
 Post subject: Re: USB debugger
PostPosted: Thu May 10, 2012 10:19 pm 
Offline

Joined: Mon Feb 06, 2012 2:57 pm
Posts: 13
Nobody can't help me ??


Top
 Profile  
 
 Post subject: Re: USB debugger
PostPosted: Fri May 11, 2012 3:03 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 330
Location: USA
merliness wrote:
It is also possible with the SAM9G35?


That depends on your board. Also you question and terminology are vague. Sometimes I use a USB-to-serial adapter and connect a RS232 (UART) port on the target board with a USB port on the host PC. There are even USB-to-serial adapters that can connect directly to a UART at logic levels. So according to your terminology, is this debugging via UART or USB?

USB and UARTs have a few similarities, but are actually two very different things that an engineer or developer should know. USB is a peripheral bus (just like PCI and ISA), whereas UART is a device. When most people talk about USB, they are often referring to somekind of USB device or gadget, rather than the actual USB connection which provides the control and data pathway (plus power).

Does "debugging via UART" mean that you used a RS232 communications link between your target board and the host PC? Are you referring to the UART on your target board or on your host PC?
If you are you referring to the UART on your target board, then you're probably connected to the debug or console port of the board. You have no debugging capabilities while at91bootstrap and U-Boot are executing; once the Linux kernel is running then there is GDB.

If you are you referring to a USB connection on your host PC, then you might be thinking of an ICE, in-circuit emulator. Some USB ICE emulate a serial port to the host, while others are a unique USB device that require its USB device driver for the PC's OS. One of the popular ones is the Segger J-Link, and there's a low-cost version just for Atmel devices, the SAM-ICE. Of course you need to have a JTAG connector on your board for the ICE. An ICE is useful for boot and board startup issues; once the MMU is enabled and virtual memory is employed, the ICE is not as useful.

Sometimes (e.g. multi-threading, inter-processor communications issues) you have to avoid relying on intrusive debugging tools (e.g. breakpoints), and just fall back on printk()s (in the kernel) and printf()s (in user code). I've seen some elaborate schemes using a couple of global data variables to control the runtime output of debug messages. Usually you want to control which sections/functionality of the software is outputting, and also the depth or detail of reporting.

Code:
#if DEBUG
        if (debugfunc == DBFUNC_FOO && debuglevel == DEBUGLEVEL_2) {
               printk("foo: xxx\n");
        }
#endif


Regards


Top
 Profile  
 
 Post subject: Using a JTAG in Linux Bring-up and Kernel Debugging
PostPosted: Sat May 12, 2012 11:23 pm 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 330
Location: USA
Using a JTAG in Linux Bring-up and Kernel Debugging

A PowerPoint presentation on using generic JTAG debuggers with the Linux kernel & drivers (plus overview of the driver kernel interface, DKI):
http://elinux.org/images/4/4e/CELF_JTAG_Anderson.ppt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: