Re: TI's Code Composer does not clear bss data

On 28/01/2011 13:39, Simon Clubley wrote:
On 2011-01-28, David Brown<david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I don't know the details in this case (I haven't looked at the low-level
workings of the msp430 jtag interface). But ultimately, jtag is a silly
choice of interface for debugging - it's got a /huge/ overhead if you
want to follow all the rules correctly. Most chips that have a jtag
debugger interface have some sort of non-standard shortcut to put their
jtag interface into "debug" mode rather than testpin mode. Some of
these play well with other jtag devices, others only work well if they
are the only device on the jtag bus. While the best idea is to have a
shortcut technique that works along with other devices on the board,
it's usually only the big chips that bother. When you have an FPGA or a
processor in a 400 pin bga package, it is conceivable that you will also
have a jtag chain for testing pin connections between that package and a
bga package memory device. But I expect it is a negligible proportion
of msp430 users who will want other jtag devices on the same chain.

Interesting and I had not considered this.

[snip other equally interesting comments]

Thank you for spending the time writing a detailed writeup and covering
issues I had not considered.

As I have mentioned in the past, I am a professional programmer, but a
hobbyist when it comes to electronics work, so issues like this are ones
I am not likely to encounter and hence don't consider unless made aware of



A lot of people who are used to microcontrollers think of jtag as just an interface for programming and debugging microcontrollers. But in fact it is designed as a board test interface, and a jtag bus is fundamentally a huge shift register. Different devices such as memory chips, processors, fpgas, etc., are all attached to the bus in serial. Then jtag commands are clocked along the bus. Initially, you use commands that are designed to identify the devices and you have commands to put different devices in active or passive states. Then when you have picked one (or more) devices to communicate with, you clock data into their test registers and read out the results of the last test.

Early jtag-based debug interfaces used precisely this method, with all the relevant debug registers attached in the chain. But if that is, for example, 10 registers with 32 bits each, then you need to clock in 320 (plus more for the command) bits even if you just want to set a single register, and you then need to clock through another 320 (plus command) bits to read the results.

This very quickly gets extremely slow, and you need intelligent debugger interface hardware (rather than a simple USB-to-spi converter, or PC parallel port interface as used to be common). So chip designers started cheating - they added new commands to the jtag interface that are not covered by any standard (though they are allowed and ignored by other devices), to allow more efficient communication.


Relevant Pages

  • Re: Arm7 or Freescale Coldfire?
    ... have a BDM interface for debugging, and a JTAG interface for boundary ... None of the newer ones have separate BDM, all ... Some people do get enough data to make debugging equipment. ...
  • Re: anyone have an ancient SDS tool suite?
    ... Does anyone have an ancient copy and license of the SDS ... The BDM debugger interface for 68k and Coldfire is rather easy, ... that will actually do breakpoint debugging via the JTAG interface. ... The 68332 does not have a JTAG interface, it has a BDM interface (both are synchronous serial "back door" interfaces, but the BDM is designed specifically for debugging). ...
  • Re: Xilinx Platform Cable USB protocol specifications and/or open-source firmware replacement
    ... JTAG is "supposed" to be an open standard ... proprietay closed interface with VERY limited static sequences exported ... Open source is not about "free", is about the ability to preserve the ... Proprietay JTAG interfaces, violates the openness of that standard. ...
  • Re: Arm7 or Freescale Coldfire?
    ... have a BDM interface for debugging, and a JTAG interface for boundary ... Some people do get enough data to make debugging equipment. ... I do see, however, that the MPC55xx line have dropped the BDM, and have JTAG only for boundary scan. ...
  • Re: Programming Digilent Nexys 2 from Linux
    ... nexys 1 and 2 have the same programming interface? ... The script was written specifically for the Nexys 2, ... The JTAG pinout on the FX2 chip ... run the script with a "-v" to enable verbose mode and see ...