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.

Error in DM642 example code

Other Parts Discussed in Thread: CCSTUDIO

When I try to run the LED example project that came with the 642 EVM I get the follwing error.

[ledprd.c] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -g -q -fr"C:/CCStudio_v3.3/boards/evmdm642/examples/bsl/ledprd/Debug" -i"." -i"C:/CCStudio_v3.3/boards/evmdm642/include" -i"C:/CCStudio_v3.3/boards/evmdm642/csl/include" -d"_DEBUG" -ml3 -mv6400 -@"Debug.lkf" "ledprd.c"
"C:/CCStudio_v3.3/boards/evmdm642/csl/include/csl_chiphal.h", line 262: fatal error: #error NO CHIP DEFINED (use -dCHIP_XXXX where XXXX is chip number, i.e. 6201)

I added a #define CHIP_DM642

but then I get

<Linking>

undefined                        first referenced
 symbol                              in file
---------                        ----------------
_I2C_outOfReset                  C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_getConfig                   C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_start                       C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_GPIO_open                       C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_open                        C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_CSLDM642_LIB_                   C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_CACHE_enableCaching             C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_xrdy                        C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_bb                          C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_sendStop                    C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_EMIFA_config                    C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
__CSL_init                       C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_writeByte                   C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_I2C_config                      C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_GPIO_pinRead                    C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_GPIO_pinEnable                  C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_GPIO_pinDirection               C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
_GPIO_pinWrite                   C:/CCStudio_v3.3/boards/evmdm642/lib/evmdm642bsl.lib
>>   error: symbol referencing errors -
            'C:/CCStudio_v3.3/boards/evmdm642/examples/bsl/ledprd/Debug/ledprd.out' not built


>> Compilation failure

 

I checked and C:\CCStudio_v3.3\boards\evmdm642\lib\evmdm642bsl.lib exists, so what next?

  • This sounds like your project is not linking in the chip support library (CSL) that the board support library (BSL) is depending on. You likely already have the CSL in your CCS install, you just need to add it to your project, take a look for C:/CCStudio_v3.3/C6000/csl/lib/cslDM642.lib.

  • Most of the examples for DM642 were built with CCS v3.1 (or maybe even v2.21) which used BIOS 4.x. CCS v3.3 uses BIOS v5.x from which the CSL was removed. As a result the CSL is no longer automatically included in BIOS projects and must be added manually.

  • Thanks, I'm working on code for the 6455 now and Get the same error.

    "C:/CCStudio_v3.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)

     

    I added csl_6455.lob and csl_6455e.lib but it did not help.

    I added -d"CHIP_dsk6455" to the build options as well and it did not help.

     

    Looking at csl_chiphal.h I do not see the 6455 listed.

    Is this the issue?

    #define CHIP_SUPPORT(c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24) ( \
      ( c0*CHIP_6201)  | \
      ( c1*CHIP_6202)  | \
      ( c2*CHIP_6203)  | \
      ( c3*CHIP_6204)  | \
      ( c4*CHIP_6205)  | \
      ( c5*CHIP_6211)  | \
      ( c6*CHIP_6701)  | \
      ( c7*CHIP_6711)  | \
      ( c8*CHIP_6712)  | \
      ( c9*CHIP_6713)  | \
      ( c10*CHIP_DA610)| \
      ( c11*CHIP_DM642)| \
      ( c12*CHIP_DM641)| \
      ( c13*CHIP_DM640)| \
      ( c14*CHIP_6412) | \
      ( c15*CHIP_6414) | \
      ( c16*CHIP_6415) | \
      ( c17*CHIP_6416) | \
      ( c18*CHIP_6711C) | \
      ( c19*CHIP_6712C) | \
      ( c20*CHIP_6411) | \
      ( c21*CHIP_6410) | \
      ( c22*CHIP_6413) | \
      ( c23*CHIP_6418) | \
      ( c24*CHIP_NONE)   \
     )

     

    Ringo

     

     

  • You need to download the C6455-specific CSL. The CSL you are looking at is for "legacy" parts.

  • I followed the link and got the file and unzipped it. There is a lot of stuff there. I copied the 2 files mentioned above and pasted them over my files I have now. Is this what I shol dhave done or is there another file I shoul dbe looking for. If so please tell me the name so I can find it.

  • The CSL 2.0 that comes with CCS is not compatible with the C6455, and the C6455 CSL 3.0 is not compatible with other devices. You need to make sure you are not mixing code together here. The API did change between 2.0 and 3.0, so your DM642 CSL-based code would not directly transfer to the C6455 with CSL 3.0.

  • Thanks, I just unzipped all the new stuff and loaded one of the examples in there and it seems to compile so I'll start there.