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.

Is it possible to call "Save Memory" feature in a C/C++ source code?

Other Parts Discussed in Thread: OMAPL138

I have defined a large float type array in my C++ code to save real-time data for post processing purposes in MATLAB. After the array is filled, I suspend the program and use "Save Memory" feature to save the array in a .dat file on my PC.

However, it is not desirable because every time I need to do it manually. So, I was wondering if there is a way to call the "save memory" feature inside my code. For instance, after the array is filled, I would like to call that function and pass the address of the array, its length and the destination path to the function and it saves the data on my PC.

It might not be directly related to this forum, but I was also wondering if there is any standard C/C++ functions that can copy large arrays to PC efficiently.

Here are some details about my setup:
Board: OMAPL138 - ARM9 and C674x Floating point DSP with PRU
Connection: TI XDS100v2 USB Emulator

  • Behrooz Shahsavari said:
    So, I was wondering if there is a way to call the "save memory" feature inside my code. For instance, after the array is filled, I would like to call that function and pass the address of the array, its length and the destination path to the function and it saves the data on my PC.

    If you use the C standard file I/O functions, such as fopen(), fwrite() the running program can write files on the PC.

    This works by CCS setting a CIO breakpoint to transfer the data to the PC. Not sure how efficient this is compared to the "save memory" feature.

    See also Tips for using printf

  • Another possibility is to use breakpoints but set the breakpoint action to read or write data to a file instead of the default action of "halting". This quick tip video shows how to use this feature.

  • I have already tried fwrite() and observed that the transfer rate is several times less than "save memory" feature. For instance, a float32 array with 30'000 elements requires almost 1minute to be logged to my PC, while the save memory feature can save it in less than 3 seconds.