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.

Using TM6467 Hard Disk, DMA Using.

Hello,

I'm using CCS4 and TM6467 EVM board with JTAG Emulation.

In my program, i have a file opened using fopen from my PC.
If i understand correctly, this file transferred in chunks to the .stack or .data sections that i defined in cmd.
please correct me if i'm wrong.

I would like to make this process "faster", how could i make, in the begging of my program, a copy from the PC to the board hard disk? so every operation with this file will be when he is already on the board hard disk?

Also, should i work with DMA? how could it help me?
Basically, i know that DMA can help me save a lot of time if i need to read a lot of chunks from my DDR, but how do i implement it?

Thanks a lot, Stas.
(I'm a beginner in the embedded area).

  • Stas,

    If you intend to load a file for debugging purposes only, then you can either use the fopen you mentioned or even pre-populate the board memory using the file save and load capabilities of the tool. Check the short clip Save/Load memory from file of the Quick tips page below:

    http://processors.wiki.ti.com/index.php/Quick_Tips

    You can also automate this process by including a call to GEL_MemoryLoad() in your GEL initialization script. Search for this function name in the CCSv4 Help for additional details.

    These processes are entirely done via emulator and therefore do not involve any of the device's peripherals (like DMA). Also, the data transferred is entirely raw binary - an important detail to consider especially if you intend to load data to a hard disk which is already formatted with a filesystem (FAT, ext2, etc.).

    I don't recall which process is the fastest, but surely the fopen will be the slower due to the constraints you mentioned.

    Additional methods of transferring data from the host PC to the target board without using an emulator would forcefully require a firmware running on the board that properly initializes a communications peripheral (Ethernet, PCI, HPI. USB, etc.). In this case the DMA is useful to transfer data from the peripheral to the device's memory. 

    I suggest you asking DMA questions on the device forum, as you will get better insights there.

    Hope this helps,

    Rafael

     

  • Thanks a lot desouza!

    I will try the GEL method, it seem suitable for me right now.

    As you said, later i will need a method that transfer data without emulator, so a appropriate question will be posted in the device forum.

    Stas.