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.

Importing C6474 DIO Library into CCSv4

Other Parts Discussed in Thread: CCSTUDIO

 Hi

Thought I'd contribute back to the forum for all the help you guys have given me. Here are the steps for importing the C6474 DIO library:

Some of the steps may not be necessary, but I don't have time to figure out if they weren't. I also apologize if I missed a step. If there is a problem, reply and that may jog my memory into thinking what I missed.

1) Get a clean DIO library image (download it from https://gforge.ti.com/gf/project/sriodirectiolib/)

2) Open the pjt file with CCSv3.3 and then save it.

3) In ccsv4, import the DirectIO_lib.pjt. Use the auto detect for BIOS setting.

4) In CCSV4 delete all the .c files, and then copy the "source" (C:\CCStudio_v3.3\DIOLib_1_0_0\source) file over to the CCSv4 workspace directory created when CCSV4 imported the .pjt.

5) In CCSv4, go to build properties -> macros tab -> project tab and add definitions for these macros: CslDir6474 = C:/CCStudio_v3.3/C6000/csl_c6474 and CslIntDir=C:/CCStudio_v3.3/C6000/csl_c64xplus_intc

6) In the Tool Settings,  move the above two macros ahead of C6000_CSL_CG_ROOT (if you don't do this, you may get the error ""c:/CCSTUD~1.3/C6000/csl/include/csl_chiphal.h", line 267: fatal error: #error NO CHIP DEFINED (use -dCHIP_XXXX where XXXX is chip number, i.e. 6201)
1 fatal error detected in the compilation of "../main.c".
")

7) Because the pjt was imported without BIOS, you have to comment out the following from BRU_systemEnumerators.c and add #undef TRACE_LOG

     #iinclude <std.h>  and the others log.h, sem.h, c64.h, tsk.h, sys.h and gbl.h

8) Change #include "${DirectIODir}/source to "../source) to pickup files in the local lib directory.

9) Remove ${EXT_ROOT_DirectIO_lib/lib/DirectIO_Debug_C6474 from Build Properties _> BuildSettings and replace it with  ../lib/DirectIO_Debug_C6474

10) Change folder where the lib and obj files are output to.

Now if you want to import say testDIO_dbell_master, thats easy! After you import, you just have to do step 6 only! Yeah! But don't forget that its still trying to link to the old library files. I was able to run the dbell test examples without linking to my new DIO library. To change it, just delete is in Eclipse and then re-link it to your new library.

Cheers

 

  • Hi

    Here is something to lookout for when importing any CCSv3 project.

    If you get the migration.log warning below, I would carefully consider using the first option: importing the "Managed Build Macros". What happens when you do this is CCSv4 uses this macro definition for all projects in your workspace. You may not wish to do this.

    Whats confused me is the fact that I could not figure out where CCSv4 was defining macros like CslDir6474. I checked the Build Properties -> C/C++ Build -> Macros (tab) -> Configuration and Project and could not see them defined. But after selecting the "Show parent context macros", I could see them but NOT edit them.

    To edit them, you have to go to the Managed Build macros useing Window>Preferences>C/C++>Make>Managed Build>Macros. 

    Cheers

    Eddie


    !WARNING: Reference to an undefined user-macro detected: 'CslDir6472'.  Please import the 'macro.ini' file after migration completes (File > Import > Managed Build Macros), or define the missing macro manually (Window > Preferences > C/C++ > Managed Build > Macros).

    Special Thanks to Walter Snafu for finding where the managed build macro editor is located.

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/35531.aspx?PageIndex=2

     

     

  • One more method to compile DIO lib in CCSv4 (avoids all the junk you get from importing a CCSv3 project)

    1) Create an empty C6472 project using File -> New -> CCSProject. Make sure you select "Output type" as Static Library (this is on the fourth "NEXT:" button)

    2) Copy the DIO lib source folder into the project folder.

    3) Add the following macros (to wherever you have the csl and xdc installed

    - CslDir6472 : ${ProjDirPath}\..\csl_c6472_03_00_06_03\

    - XdcCgRoot :C:\Program Files\Texas Instruments\xdctools_3_22_01_21

    4) Add the following includes (the order is important)

    - "${CslDir6472}\inc"

    - "${XdcCgRoot}/packages/xdc"

    - "${XdcCgRoot}/packages"

    - "${CG_TOOL_ROOT}/include"

    - "${DirectIODir}/source/dio/include"

    - "${DirectIODir}/source/rio/include"

    - "${DirectIODir}/source/com/include"

    - "${DirectIODir}/source/bru/include"

    5) Add #include <std.h> to the files where the compiler complains about Int8 being undefined.

    6) Add #undef TRACE_LOG to BRU_systemEnumeration.c

    7) Add the following predefined Symbols: _DEBUG, _COM_BENCH, CHIP_C6472

    8) In Runtime Model Options, set Data access model to far

    Good luck!