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.

Could not open source file "inttypes.h" in linux

I have download from the site this RIDL 2.1. (https://gforge.ti.com/gf/project/ridl_oss/frs/%7C)

 'Makefile' and 'Makefile.gen' have in RIDL Folder.

 tried to 'make' terminal from the Linux. And not making 'ditl.gen' file

give error :

$ make
cl6x -c -mv6400+  -o -pds67 --abi=elfabi -DARM_TARGET -DC60_TARGET  -I. -IDLOAD -IDLOAD_API -IDLWRAPPER -IDLOAD_SYM -IC60_DLOAD_REL -IC60_DLOAD_DYN -ITMS470_DLOAD_REL -ITMS470_DLOAD_DYN  DLOAD/ArrayList.c --output_file C60_LNX/ArrayList.obj
"DLOAD/ArrayList.c", line 62: fatal error: could not open source file "inttypes.h"
1 fatal error detected in the compilation of "DLOAD/ArrayList.c".
Compilation terminated.

>> Compilation failure
make: *** [C60_LNX/ArrayList.obj] Error 1


  • Hello,

    The inttypes.h file is part of the C6000 Code Generation Tools (CGT) installation and will be located in the "include" sub-directory under the directory where you installed the C6000 CGT.

    You will want to add the "include" subdirectory to the include file directory search path:

    %> setenv C6X_C_DIR "/<location where C6000 CGT is installed>/include;/<location where C6000 CGT is installed>/lib"

    You can also add the "include" directory to your include file directory search path by using the "-i" option in the compiler command line:

    %> cl6x <other options> -i /<location where C6000 CGT is installed>/include DLOAD/ArrayList.c --output_file C60_LNX/ArrayList.obj

    I would recommend using the C6X_C_DIR environment variable, as you will likely make use of several standard runtime support header files during the compilation of the dynamic loader sources.

     

    Hope this helps. Please let me know if you have further questions.

    Regards,

    Todd Snider

    Compiler Support Team

    Texas Instruments Incorporated

  • Thanks for your valuable replay

     'Makefile' and 'Makefile.gen' have in RIDL Folder.

     tried to 'make' terminal from the Linux. And succeed  making 'ditl.gen' file and compile the hello.c program successfully created hello.dll file

    i am working on evm 6678 kit.

    how do I use the dltl.gen file on evm 6678 kit?

    how to get ridl prompt?

    what is the use of .gen file? 

  • A couple of wiki articles that you may find useful for a more detailed discussion of the reference implementation of the dynamic loader are these:

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

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

    These wikis were written around the time of the first release of the reference implementation of the loader and are somewhat out of date, but still provide a good general overview of the architecture of the dynamic loader.

    Per your questions:

    - the dlti.gen file is an executable file which when compiled for C6x can be loaded and run on the EVM using Code Composer Studio (CCS). It is the dynamic loader "base image" and will provide some basic RTS services that can be used by DLLs that are linked against it

    - when the dlti.gen file is loaded and started running, a prompt "RIDL>" will appear in the CCS console window. If you type "help" in response to this prompt, the list of available commands will be displayed on the console

    For example, you might create a group of DLLs that depend on other DLLs and are also linked against the "base image", i.e.

    depends.dll needs: dlti.gen, a.dll, b.dll

    a.dll needs: dlti.gen, c.dll, d.dll

    b.dll needs: dlti.gen, a.dll, d.dll

    c.dll needs: dlti.gen

    d.dll needs: dlti.gen

    You might then compile the DLLs as follows (assuming you have already built the dlti.gen):

    %> cl6x -mv6600 --mem_model=far c.c -z --dynamic=lib dlti.gen -o c.dll

    %> cl6x -mv6600 --mem_model=far d.c -z --dynamic=lib dlti.gen -o d.dll

    %> cl6x -mv6600 --mem_model=far a.c -z --dynamic=lib dlti.gen c.dll d.dll -o a.dll

    %> cl6x -mv6600 --mem_model=far b.c -z --dynamic=lib dlti.gen a.dll d.dll -o b.dll

    %> cl6x -mv6600 --mem_model=far drvier.c -z --dynamic=lib -e start dlti.gen a.dll b.dll -o depends.dll

    The depends.dll defines a symbol "start" as its entry point. This is where the dynamic loader will start executing from after depends.dll is loaded.

    From the "RIDL>" prompt in the console, you could then run the following commands to execute the code in depends.dll:

    RIDL> base_image dlti.gen

    RIDL> load depends.dll

    RIDL> exec

    RIDL> exit

    Given a depends.dll with code defined at the "start" location, the above commands will set up the dlti.gen as the "base image" that the loaded DLLs will link against, then depends.dll and all of the DLLs that it depends on will be loaded, and finally the dynamic loader will begin executing code at "start" until control is returned to the dynamic loader's user-interface (the "RIDL>" prompt). The "exit" command will terminate the dynamic loader application.

    Please bear in mind that this is a reference implementation of the dynamic loader. The provided sources are intended to demonstrate how a simple client interface can be implemented around the dynamic loader core. This particular implementation when compiled with the C6000 code generation tools can be loaded and run on a C6000 processor.

    Regards,

    Todd