SourcePoint AMD Help

Table of Contents


Retrieve the size (in bytes) of the return data that the JTAG message generates when scanned to the target devices.


[result =] msgreturndatasize (msg-handle, data-size-var, device-array)

[result =] msgreturndatasize (msg-handle, data-size-var, device-id)



is a boolean variable that contains the return value of this command. TRUE indicates the command was successful. FALSE indicates an error occurred, such as the JTAG message was not found.


is the name of a previously defined debug variable of type handle.


is an ord4 debug variable that contains the return data size (in bytes). This is a reference parameter and is modified by the msgreturndatasize command.


is the previously defined ord2 array of device ids (so that multiple devices can be scanned simultaneously).


is the device id for a single target system device. This is a boundary scan list device position.


Use the msgreturndatasize command to determine the size (in bytes) of the array to pass in to msgdata. The return-array used in the msgscan and msgdata commands must be at least this large, or an error is returned. The command returns an error if called before the JTAG message has been closed.

Different sets of devices can be used with this command as the number of bytes returned depends on the devices specified in the scan command. An error is returned if the devices in the device-array are not on the same debug port; no other verification of the list is done.


Command input:

// Read JTAG ID from processor
define handle h
define ord2 device = 0
msgir(h, 8, 2)     // 8=ir length, 2=idcode
msgdr(h, 0n32, 2)

msgscan(h, device)
define ord4 count = 0
msgreturndatasize(h, count, device)
define ord1 data[count]
msgdata(h, data)

Related Topics: