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.

CCS4 or CCS3.3

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

I'm trying to use build the demo AC/DC demo program on the AC/DC EVM kit. I use CCS4 to build the code "FBPS". But it seems to report a warning. Can anyone help me on this? Shall I use CCS3.3 or how shall I handle this?

 warning message:  function declared implicitly   ---- FBPS-main.c----line260

line260: MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

Thanks again,

Violet

 

  • This warning message does not have anything to do with the version of CCS.

    Rather this warning message is indicating that the code base has not properly declared the prototype for the MemCopy(...) function call prior to using the function.  Since the definition of this function is clearly not in the FBPS-Main.c file (or at least prior to this function), therefore it needs to be declared.  This can be inside the FBPS-Main.c file at the beginning, or included via a header file.

    I have seen this declared in a device support include file, like <CONTROLSUITE_INSTALL_DIR>\device_support\f2802x\v129\DSP2802x_common\include\DSP2802x_Examples.h for instance.  I don't know if this is the right platform for you, but this should give you an example.

    What is the exact part number of the kit you are using?

  • Hi Brandon,

    Thanks a lot for your quickly reply.  I'm using the C2000 AC/DC Developer's Kit. And my control card is TMDSCNCD2808.

    Could you tell me where to find the declared files?

    Thanks,

    Violet

  • violet han said:

    I'm using the C2000 AC/DC Developer's Kit. And my control card is TMDSCNCD2808.

    Could you tell me where to find the declared files?

     

    On the Product Folder for this kit, TMDSACDCKIT, there are 2 links in the Support Software section.  The first link is likely where you will find the F2808 specific files which would contain the aforementioned function.

  • I already downloaded the two links. one is sprc675.zip (Baseline Software Setup_v1.11) and the other is sprc711.zip(ACDC Setup-V0.1). I'm using CC4 to run the code provided. And it reported that warning. Can I find it elsewhere?

    Thanks,

  • After downloading these myself, the function is part of the SPRC711.zip archive in FBPS-DevInit_F280x.c.  Since there doesn't appear to be an include file that declares this function for FBPS-Main.c, add the following to this file near the beginning (or certainly before the function is used).

    extern void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr) ;

  • sorry, it's still not solved yet:

    I added the commands near the beginning in the main.c.

    and now it reports:

    arguments of tyepe "Uint16 **" is incompatible with parameter of tyep "Uint 16 *".

    for the line:

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

     

    I checked the commands in FBPS_DevInit_F280x.c,

    it's :  

    void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr)

    in main.c,  we have:

    extern Uint16 *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;

    ...

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

    I don't understand why it says Uint 16** not compatiable with Uint 16 *.

    I didn't used Uint16 **.....???

    thanks again,

  • violet han said:

    I added the commands near the beginning in the main.c.

    and now it reports:

    arguments of tyepe "Uint16 **" is incompatible with parameter of tyep "Uint 16 *".

    for the line:

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

     

    I checked the commands in FBPS_DevInit_F280x.c,

    it's :  

    void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr)

    As you mention, the MemCopy() is defined with arguments that should be pointers.  However, in main.c, there is the declaration of the RamfuncsLoadStart as pointers themselves.

     

    violet han said:

    in main.c,  we have:

    extern Uint16 *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;

    The statement above indicates the labels RamfuncsLoadStart, RamfuncsLoadEnd and RamfuncsRunStart are pointers of type Uint16.

     

    violet han said:

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

    I don't understand why it says Uint 16** not compatiable with Uint 16 *.

    But this statement passes a reference to RamfuncsLoadStart, etc, which is a pointer to a pointer of type Uint16, or Uint16**.

    This is a type mismatch as the error indicated.

     

    Change the following:
    extern Uint16 *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;

    to

    extern Uint16 RamfuncsLoadStart, RamfuncsLoadEnd, RamfuncsRunStart;

     

    By the way, to answer your next question about where are these labels defined, that would be in the linker command file.  These labels are defined with the addresses of the named section which is loaded in Flash (ie. RamfuncsLoadStart), the end address in Flash (ie. RamfuncsLoadEnd and the start address in RAM (ie. RamfuncsRunStart.

    The run-time address will be in RamfuncsRunStart.

     

  • ok. Now I understand. Thank you very much for your kindly help!!