This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320C6747: Displaying the contents of the A4 register

Part Number: TMS320C6747

Tool/software: TI C/C++ Compiler

In my_doAbort I would like to display the contents of the A4 register for debugging in the field.  I am not familiar with c6xx assembly and would appreciate it if I could get help copying the contents of A4 into memory for display on a screen. (I am using DSP/BIOS 5.41.13.42 on a c6747 using CCS 3.3).

void my_doAbort(char *fmt, va_list ap)

{

UInt32 pc = NRP;

UInt32 addr = (get A4 contents some how);

dprintf("\n\nRUNTIME ERROR: WRITE THIS DOWN... PC:%08X Addr:%08X \n", pc, addr);

  • Keep in mind that, due to the register conventions, A4 contains the first argument to a function.  In this case ...

    howy said:
    void my_doAbort(char *fmt, va_list ap)

    ... it will contain fmt (the pointer value, not what it points to).  

    howy said:
    using CCS 3.3

    That's very old.  What's wrong with adding A4 to the watch window, or looking at the contents in the register window?  

    There is no mechanism built in to the compiler which allows you to capture the contents of a specific register.

    Thanks and regards,

    -George

  • You're probably going to need to resort to a little assembly code here. You should write a function to capture the register file into an array. Then you can call this function from your C code and pick out any register you like.
  • I am trying to capture the address of the memory access that triggered a crash. The crash happens once every few weeks so I need to print it to the screen (in a blue screen of death way) so the users in the field can email me the results. Of course the crash never happens here at the shop.  

    I was under the impression that A4 contained the offending address that caused the crash when in the my_Abort function but I was wrong. I guess I need to modify my question to ask "where I can find that address".

  • You need help with debugging techniques from the device experts.  So I am moving this thread to the C67x device forum.

    Thanks and regards,

    -George