Questions tagged [jtag]

JTAG is a common interface used for programming and debugging microprocessors and other types of embedded devices.

Joint Test Action Group (JTAG) is the common name for what was later standardized as the IEEE 1149.1 Standard Test Access Port and Boundary-Scan Architecture.

It was initially devised for testing printed circuit boards using boundary scan and is still widely used for this application. Today JTAG is also widely used for microprocessor debug ports.

With appropriate development tools and software, a developer can use JTAG to perform debugging operations like single-stepping, setting breakpoints, etc.

200 questions
73
votes
5 answers

How to use the GDB (Gnu Debugger) and OpenOCD for microcontroller debugging - from the terminal?

The standard (low-cost) way to program ARM microcontrollers is using Eclipse with a complex toolchain plugged into it. Eclipse has definitely its merits, but I'd like to feel independent from this IDE. I'd like to discover what happens behind the…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
14
votes
3 answers

How to get ARM code unto an actual device, JTAG? Possible to make Impromptu JTAG with Arduino?

Ok, I am a little confused about programming for ARM processors. Barrage of questions time: How does one get the compiled binary into an ARM processor? Is JTAG the normal method (I think that is what my research has indicated ...)? Is it the only…
zec
  • 243
  • 1
  • 2
  • 5
14
votes
3 answers

How is a JTAG used as a debugger?

I understand how JTAG used to be used as boundary scanner (very clean explanation at http://www.fpga4fun.com/JTAG1.html). However I can't see how JTAG these days is used as a hardware level debugger (Somewhat similar to in-circuit emulators). 1. Can…
tinkerbeast
  • 1,707
  • 1
  • 20
  • 42
10
votes
3 answers

How does a debugger like gdb work to set a breakpoint through JTAG?

i'm working on debugging with gdb. i wanted to know how gdb works internally to set a brekpoint on an embedded processor through JTAG.
jenje
  • 101
  • 1
  • 3
8
votes
5 answers

Schrödinger bug disappearing when breakpoint is set

I have a strange bug in my code which disappears when I try to debug it. In my timer interrupt (always running system ticker) I have something like this: if (a && lot && of && conditions) { some_global_flag = 1; //…
vsz
  • 4,811
  • 7
  • 41
  • 78
8
votes
2 answers

How to ping a chip (detect if a chip is connected) with OpenOCD

1. The problem explained I'm trying to use OpenOCD for something uncommon. Instead of connecting to the chip, I'd like to merely detect the chip. The procedure I have in mind would look like this: Start OpenOCD with the probe config file (eg.…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
5
votes
4 answers

Can I use JTAG to debug my program on top of embedded Linux?

I am using an at91sam9260 for my developments. There is a Linux kernel running in it and I start my own software on top of it. I was wondering if I could use a JTAG debugger to debug the software I am working on without seeing to much of what is…
nomoney29
  • 116
  • 1
  • 1
  • 5
5
votes
2 answers

Using debugger swo on stm32

As the title suggest I would like to use swo for debugging on an stm32F1 device without the use of st-link utils.I think I have flashed the code to send messages via swo on my chip but I can not establish a connection with the correct port as some…
Spyros Mourelatos
  • 484
  • 1
  • 8
  • 19
5
votes
2 answers

Hardware breakpoints vs Software breakpoints in embedded systems

My understanding is that inserting software breakpoints involves replacing the next instruction in code to be executed by a software interrupt instruction which will cause the CPU to halt when it reaches that instruction. Hardware breakpoints…
Engineer999
  • 3,683
  • 6
  • 33
  • 71
5
votes
1 answer

how JTAG debugger halts the core of ARM based device?

I am trying to understand the process that happens behind JTAG debugging. From what i understood, devices that supports JTAG debugging has a special component in the device that is called DOC(Debug On Chip). The core of this component is TAP…
user1010822
  • 111
  • 2
  • 7
5
votes
2 answers

Opinions on Bus Pirate device programmer?

I'm looking to do some hobby firmware development at home and need a device programmer. Hoping to keep to Open Source solutions, I found the OpenOCD project and also the Bus Pirate. For $30 it seems like a no-brainer, especially since it supports…
Ryan
  • 185
  • 11
4
votes
1 answer

Low level JTAG Interface programming

What I have is direct access to the four JTAG Interface pins on an Atmel CPU. What I need is low-level C code to wiggle those pins and implement two functions: ReadMemoryWord(address) WriteMemoryWord(address, word) Anyone done this before? Or can…
Tergiver
  • 14,171
  • 3
  • 41
  • 68
4
votes
2 answers

How are breakpoints working on an embedded device?

This is just a question for personal intrest. I know that my JTAG is able to read the register values of the uController. But I have no clue how the JTAG device knows when to stop the uController. I thought that maybe some code is added calling an…
Schafwolle
  • 501
  • 3
  • 15
4
votes
4 answers

Output debug via printf on a Cortex-M3 CPU, stalls at BKPT instruction + confusion about JTAG and sw ports

I have a Keil ULINK2 USB emulator box attached to the JTAG connector on my board, which is working fine with the Cortex-M3 CPU onboard (TI/Stellaris/LuminaryMicro LM3S series). It seems that both a JTAG and a SWJ-DP port share the same pins (and…
Warren P
  • 65,725
  • 40
  • 181
  • 316
4
votes
1 answer

Software interrupt exception or undefined instruction exception?

I am running a program on a bare-metal ARM (v5TE-compliant) with a JTAG connector and gdb. The program runs from some SDRAM in supervisor mode, and uses only arm instructions. At some point an exception occurs. Stopping gdb with ctrl+C I can see…
Étienne
  • 4,773
  • 2
  • 33
  • 58
1
2 3
13 14