I want to read the global variables via the JTAG port, live, when a program is running on the microcontroller. Is it possible?
-
1How are we supposed to help you? You think all microcontrollers and their interfaces are identical? You need to be **much more specific**. Is a JTAG port available? You won't get anything from this device unless it will give it to you, which may require software modification. – Brad Feb 19 '13 at 05:20
-
This is not specific to any microcontroller. My question is in general. Yeah I should have mentioned about the presence of a JTAG port. – joelkaka Feb 19 '13 at 05:30
-
Your question needs to be specific, as it varies from device to device. If you are asking about JTAG debugging, please modify your question to indicate that. – Brad Feb 19 '13 at 05:31
3 Answers
JTAG defines only a physical interface, it does not describe the on-chip debug capabilities of a particular processor which may or may not support access during execution.
Moreover whether it can be done in VB is not really the issue, the important issue is what hardware device and/or I/O port you are using for the JTAG interface, and whether a driver and API to access via .Net is available. That said VB.Net is not the first language I'd choose for that in any case.
A good place to start perhaps is OpenOCD, though it is not .Net specific.

- 88,407
- 13
- 85
- 165
"Almost-Live" is possibly doable, depending on the JTAG implementation. Often JTAG activity which reads memory does so by stealing cycles from the micro (or sometimes even inserting instructions into the pipeline). I'm not sure there's a micro which allows completely transparent access to memory over JTAG.
"All you need to do" is understand the JTAG implementation, know where the variable is located and issue a "memory read" command by wiggling the JTAG pins in the appropriate fashion. This is not a small task, which is why professional engineers are willing to pay (sometimes large amounts of) money for tools which perform this task.
Often the free (limited) toolchains the vendors provide can perform this also.

- 16,395
- 1
- 38
- 56
Yes, I suppose it is possible. But you'll need to drive the JTAG port (that sounds painful!) and know exactly where the data is stored on the chip, and what the formatting is.

- 919
- 5
- 13