OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 1:24 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Using JTAG adapters/breakouts for system software debugging?
PostPosted: Wed Oct 24, 2018 10:22 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
I mentioned this in a recent thread on the OS Dev forum, but I felt this was a general enough question to ask, and felt it might not fit exactly on that forum. I am going to go look on this myself, but I am asking less for general information, and more personal experiences with it - hence why I put this in General Ramblings.

I have heard of using ICEs (yes, I know most of them aren't emulators, but the term is a historical one) for debugging software as well as hardware, including certain JTAG adapter modules. It is my understanding that this is a fairly common practice for both professional embedded systems development and maker-grade development projects. However, I have no experience with such, and I am wondering what the different options for this were.

I know that some JTAG modules are fairly simple, often with two or three part 7S display. Others I have seen connect to a small TFT display, and IIUC, the most expensive models have micro-USB connectors to connect them to a PC workstation, either for SSH or connecting to a (usually proprietary) IDE/Debugging application. Does anyone here know much about this?

I am specifically wondering if the Arduino IDE is connected via JTAG, or if they use a proprietary (or at least Arduino-specific) adapter system. I do mean to look that up myself, though, but if anyone can comment on it, please do.

EDIT: After some quick searches, I did find these, which I will post for anyone who (like myself) isn't really familiar with these topics.

Apparently, Arduinos don't use a JTAG itself for connectin g to the PC, but instead a USB connector on the Arduino device. Duh, I should have guessed that, I suppose.

There seems to be a fair bit about using various Arduinos as JTAG adapters, though, including this article on connecting a non-Arduino board through an Arduino to the Arduino IDE, and this one about a library of JTAG debugging scripts. This also discusses the topic.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Using JTAG adapters/breakouts for system software debugg
PostPosted: Wed Oct 24, 2018 2:06 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
Arduinos come preprogrammed with a bootloader that runs a serial program that connects to the IDE. If the boot loader is overwritten (AFAIK the IDE can do that) the program becomes pretty permanent, at least in the absence of an AVR Dragon or something.

_________________
Carpe diem!


Top
 Profile  
 
 Post subject: Re: Using JTAG adapters/breakouts for system software debugg
PostPosted: Wed Oct 24, 2018 2:48 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
nullplan wrote:
Arduinos come preprogrammed with a bootloader that runs a serial program that connects to the IDE. If the boot loader is overwritten (AFAIK the IDE can do that) the program becomes pretty permanent, at least in the absence of an AVR Dragon or something.


AFAIK when it comes to Arduino you can re-burn the bootloader as many times as you want.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Using JTAG adapters/breakouts for system software debugg
PostPosted: Thu Oct 25, 2018 1:36 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 03, 2008 4:13 am
Posts: 153
Location: Ogre, Latvia, EU
Octacone wrote:
AFAIK when it comes to Arduino you can re-burn the bootloader as many times as you want.

True. But if the current bootloader on the chip is damaged, you have to connect external hardware to Arduino's ISP header, to do it. Might be a problem, if you have none.

The simplest (codenamed "bsd") programmer involves connecting ISP pins to computer's LPT port using few resistors. But LPT ports are a rarity nowadays. Then there are lots of DIY or pre-built programming boards available. I am using self-built USBasp.

You probably need to switch from Arduino IDE to generic AVR tools - like AVRDUDE.

Personally, I've never bothered with Arduino IDE, library or bootloader. Straight Avr-gcc + avr- libc gives you way more control (and makes more sense in OSDev community :D). Sure, you have to consult chip's datasheet from time to time, but I do not see a problem with that.

_________________
If something looks overcomplicated, most likely it is.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 33 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group