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.

How to load a file to TMDSEVM6678L having SYSBIOS

Other Parts Discussed in Thread: SYSBIOS

My application requires a file to perform some computation. This file has to be loaded in prior so that when the application starts it can read that file from the file system.

Do I need to change the configuration file to enable the FatFS? I found this document to processors.wiki.ti.com/.../BIOS to do that.

What is the next step?

Could you please give an example project?

Thanks

Dino

  • Hi Dino,

    The FatFS wiki link you shared also has a FatFS SYS/BIOS example. Here's a direct link to it: http://processors.wiki.ti.com/images/e/e1/Fatfs-example.zip

    Can you use this example as reference for getting your project working ? This example creates a RAM disk containing all the files and then converts it into a C array. The C array is then compiled and linked into the final application. Therefore, you just need to load the app (no separate load step required for the filesystem).

    Best,

    Ashish

  • The example given in that file works as mentioned. But If i modify any content in that file ie if I add my own contents  in that array "ramdiskarray", then the  file cannot be opened. Even I tried with all 0 and all 1's still the result was same ..

    How do I modify the array elements. My file to be loaded is a matrix file.

  • Hi Dino,

    In order to add your own files with custom content, you need to create a new ramDiskArray C file. The wiki page briefly explains how to do this but I will explain the steps again in more detail below:

     - Go to the SYS/BIOS installation and open the C:\ti\bios_6_42_02_29\packages\ti\sysbios\fatfs\utils\examples directory. This directory has a script called 'addFiles.sh' that creates a ramdisk image, copies the 2 files 'file1.txt' and 'file2.txt' to the disk image and converts the disk image into a C array.

     - Modify the 'addFiles.sh' script to include your custom file and run the script. The script generates a C file called 'ramdiskWithFiles.c'.

     - Replace the "twoFiles_ramdisk.c" file with the newly generated C file and rebuild your project.

    You should now be able to open the new file you added and access the contents of it.

    Best,

    Ashish

  • Thanks Ashish. It worked.