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.
Using JTAG adapters/breakouts for system software debugging?
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Using JTAG adapters/breakouts for system software debugging?
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.
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.
Re: Using JTAG adapters/breakouts for system software debugg
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!
Re: Using JTAG adapters/breakouts for system software debugg
AFAIK when it comes to Arduino you can re-burn the bootloader as many times as you want.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.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: Using JTAG adapters/breakouts for system software debugg
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.Octacone wrote:AFAIK when it comes to Arduino you can re-burn the bootloader as many times as you want.
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 ). 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.