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.

Target to Host Data Transfer Mechanism

Other Parts Discussed in Thread: TMS320F28335

Hi All,

Could anyone please help me in identifying the best method to print the data into the host PC during the execution of Program in target? I'm using TMS320F28335 experimenter kit.

I have some basic idea on the following methods,
1) Printing the data into the RAM location. Then setting a breakpoint in the code once the RAM memory is full and collecting the data from the Ram using the DS scripts. This will be done in a cyclic manner until the end of execution. In this method, I'm not able to set another breakpoint (abort) to return to the debugger at the end of program. I know there are 2 breakpoints available however I'm facing issue in setting second breakpoint.

2) Using built in File I/O operations (semi hosting) supported by the control card. This is comparatively very slow. It is taking several minutes to transfer data. Suppose if the execution is taking 30 seconds, then file I/O operation is taking additional 3 to 5 minutes to transfer data into the host PC through onboard JTAG adapter.

3) Printing the data into the FLASH memory (through some unlock and lock operations). I have not tried this option. If this is possible, then it would be simple for me to collect the data at the end of execution using DS scripts. Also I can able to store all my print data continuously in FLASH (Because I have more space in FLASH) without interrupting the execution.

4) Printing the data directly into the RS-232 port. I understood some hardware setup needs to be done for this method. I have not tried this option as I'm not familiar with the hardware connections. Any help would be appreciated if this is the best method.

Please advice if you have any other new methods or fine tuning the above said methods.

Thanks in advance.

- Anand

  • Anand,

    I'm not sure what you mean by "printing" the data into the host PC while execution.

    It sounds like you want to store the variables (I guess) in the watch window into a host PC. If yes, I have tried storing the data into my PC. I used the Memory tab in the Debug Session to store the variables. This is not the best way if you want to store number of variables.

    Alternatively, you can try storing with .gel commands.

    Sincerely,

    Jaspreet

     

  • Jaspreet Kaur Bhambra said:
    I'm not sure what you mean by "printing" the data into the host PC while execution.

    I'm using printf statements in my code to print the variable values along with some text. This printf statments uses console I/O during execution (Method# 2). This is a very slow method. Hence I'm planning to use some other efficient method for which I need some help. Please note I'm not using GUI to perform this but DS scripts. Everything is done through command line.

  • Hi Anand,

    For (1) I think you can use a software breakpoint, e.g.

    void bufferReady(void)
    {
        asm(" ESTOP0");
    }

    and then call the function when your print buffer is full.  

  • Devin Cottier said:

    For (1) I think you can use a software breakpoint, e.g.

    void bufferReady(void)
    {
        asm(" ESTOP0");
    }

    and then call the function when your print buffer is full.

    Hi Devin,

    Whether this will keep the target on"HALT" state and pass the control to the debugger? I'm using DS scripts to read the RAM memory. Hence during execution it is not possible to read the RAM memory. So I'm inserting break point to HALT the target and to bring the control to Debugger for collecting data in RAM. After collecting the data I will send Run command via debugger to continue the execution.

  • I think this will work for you.  I have some LabVIEW code that calls java-based DSS to communicate with the MCU.  This code (java below) typically runs until it hits a breakpoint:

    debugSession.target.run();

    And the c code looks like this:

    void end_of_test(void)
    {
        loop_count++;
        asm(" ESTOP0");
    }