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.

RTFS MMCSD Code Compile Problem

Other Parts Discussed in Thread: OMAP-L138

Hi,

Where should the PSP Driver be installed to meet the following path give below ?

#include <ti/pspiom/platforms/evm6748/Mmcsd_evmInit.h>

When I compile the RFTS based MMCSD project, I am getting the following error.

"C:/Texas Instruments/C6000 Code Generation Tools 6.1.9/bin/cl6x" -@"ccsLinker.opt" -o "mmcsd.out"
<Linking>
error: cannot find file
"ti\\pspiom\\blkmedia\\lib\\C6748\\Debug\\ti.pspiom.blkmedia.filesystem.a674
"
error: cannot find file
"ti\\pspiom\\mmcsd\\lib\\C6748\\Debug\\ti.pspiom.mmcsd.a674"
error: cannot find file
"ti\\pspiom\\platforms\\evm6748\\lib\\Debug\\ti.pspiom.platforms.evm6748.evm
Init.a674"
error: cannot find file
"ti\\pspiom\\psc\\lib\\C6748\\Debug\\ti.pspiom.psc.a674"
error: cannot find file
"ti\\pspiom\\gpio\\lib\\C6748\\Debug\\ti.pspiom.gpio.a674"

undefined first referenced
symbol in file
--------- ----------------
_PSP_mmcsdCheckCard ./mmcsdSample.obj
_Psc_ModuleClkCtrl ./mmcsdSample.obj
_commonInit
_configureMmcsd0 ./mmcsdSample.obj
_mmcsdPscInit ./mmcsdSample.obj
_mmcsdStorageDeInit ./mmcsdSample.obj
_mmcsdStorageInit ./mmcsdSample.obj

error: unresolved symbols remain
"./mmcsdSamplecfg.cmd", line 9: error: undefined symbol "_commonInit" used in
expression
error: errors encountered during linking; "mmcsd.out" not built

>> Compilation failure
gmake: *** [mmcsd.out] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project mmcsd

I am using OMAP-L138 EVM with C6748 SOM and following packages:

CCS Version: 4.2.0.10017.

bios_5_41_07_24

edma3_lld_01_11_01_04

xdctools_3_20_03_63

xdais_7_10_00_06

I will appreciate your help.

Thanks.

-Tariq

  • Hi,

    Someone please help me here ?

    Thanks.

  • Hello Tariq,

    I assume you are using psp 01.30.01 version. Could you please confirm?

    Looks like the mmcsd project is unable to find the required libraries. Please check manually if "ti.pspiom.blkmedia.filesystem.a674" is found in - ti\\pspiom\\blkmedia\\lib\\C6748\\Debug\\

    Make sure the environment variables are set appropriately. Refer BIOS PSP Userguide for more details. Check if "BIOS5PSP_INSTALL_DIR" is pointing to the PSP drivers install directory. For Ex - "C:\Program Files\Texas Instruments\pspdrivers_01_30_01\packages"

    Best Regards,

    Raghavendra

  • Raghavendra,

    Thanks for your help. I successfully compiled the project.

    When I run the project, it prints;

    Starting rtfs shell
    Press Return

    What's that supposed to mean ?

    Is write(fptr, writebuf, BYTE_COUNT) the function to write data to SD card ? Where it is defined ? writebuf is defined as char whereas I want to write int data to SD file.

    Thanks for your help.

    -Tariq

  • Can you please reply to my previous post ? 

    -Tariq

  • Tariq,

    If you refer 13.12 section of C6748_BIOSPSP userguide, the mmcsd application will demonstrate the usage of MMCSD in RAW mode(using blkmedia) only. RTFS support is provided for further usage. For write(...) please refer the top level docs folder of the rtfs package. 

    Best Regards,

    Raghavendra

  • Raghavendra,

    I still couldn't locate write function implementation. Can you please locate me to file where it is written ? 

    Thanks.

    -Tariq

  • Hi,

    I referred to the top level document about write, there is not much information except that this function is Posix-compliant. I don't know what's that mean.

    I have a float buffer[4096], simple tell me how can I write this to SD card using the function given below(if it is the correct function).

    ret = write(fptr, writebuf, BYTE_COUNT);

    I will appreciate your help.

    Thanks.

    -Tariq

  • Can you reply to my post ?

    Thanks

  • You there ? I really need to fix this problem ASAP. 

    Thanks.

  • Hello Tariq,

    Sorry for the delayed response.

    The parameters of write function seems right. But you may have to take care of the partitions and file-system. I will try to direct this to someone relevant to RTFS or with better knowledge in these areas to comment on this.

    Thanks and Regards,

    Raghavendra

  • Raghavendra,

    My question is not about file system. RTFS based code implements file system but I am unable to write int data to text file. It just writes char data even after doing casting. 

    Following are the code snippet:

    Int writebuf[BYTE_COUNT];

    ret = write(fptr, (char*)writebuf, BYTE_COUNT);

    I tried to write 512 bytes int data but text file has 512 bytes char written in it. You can see the attached text file.

    8171.indir.txt

    I will appreciate if you or others help me writing int or float buffer to text file.

    Thanks.

    Tariq

  • Hi Tariq,

    I have looked into your attached file, "8171.indir.txt" . It has extended ASCII characters written to it.

    I mean to say, the integer data is been written as ascii characters into the file.

    So, I don't think it will display the integer data when you open up and visualize the file manually.

    I confirmed this by writing a sample code which includes the write() function. (given below).

    you can use the linux command "od" (i.e., "od 8171.indir.txt") to view the octal data of your integer data written for verification.

    I have attached a hex dump of your text file in which you can verify whether you intend to store those integer data.

    4375.hexdump.txt

     

    // sample code for testing the write function with integer data type //

    #include <fcntl.h>

    #include <stdio.h>

    #include <string.h>

    #include <sys/stat.h>

    #include <sys/types.h>

    #include <time.h>

    #include <unistd.h>

     

    int main (int argc, char* argv[])

    {

      char* filename = argv[1];

      int a = 126;

      int *b = &a;

      /* Open the file for writing. If it exists, append to it;

         otherwise, create a new file.  */

      int fd = open (filename, O_WRONLY | O_CREAT | O_APPEND, 0666);

      size_t length = sizeof(a);

      write (fd, b , length);

     

      close (fd);

      return 0;

    }

    /* Build ad run the sample code, when you open the generated text file you will find the corresponding ASCII character for integer value "126".

     

    Regards,

    Shankari.

     

    --------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------