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.

  • Resolved

Compiler/CCSTUDIO-TM4X: Invalid redeclaration error

Expert 2190 points

Replies: 18

Views: 2153

Part Number: CCSTUDIO-TM4X

Tool/software: TI C/C++ Compiler

CCS 7.2.0.00013

TI 16.9.3.LTS

TM4C1290NCPDT target

I am getting an invalid redeclaration of type name error for the following typedef statements below.

What do these mean?

Thanks,

Priya

union bits_flags {
 struct {
  uint32_t LanSet : 1 ;  // 1 = LAN port initial setting mode //
  uint32_t bit_15 : 1 ;
  uint32_t bit_14 : 2 ;
  uint32_t bit_13 : 2 ;
  uint32_t bit_12 : 2 ;
  uint32_t bit_11 : 2 ;
  uint32_t bit_10 : 2 ;
  uint32_t bit_9 : 2 ;
  uint32_t bit_8 : 2 ;

  uint32_t bit_7 : 2 ;
  uint32_t bit_6 : 2 ;
  uint32_t  bit_5   : 2 ;
  uint32_t bit_4 : 2 ;
  uint32_t bit_3 : 2 ;
  uint32_t MAG  : 2 ;  // Mag reader + V-Printer //
  uint32_t FED  : 2 ;  // Feeder //
  uint32_t BRD  : 2 ;  // Board //
 } bits;
 uint32_t dword;
};
typedef union bits_flags ACT_FUNC;

typedef struct
{
 uint16_t us;
 uint16_t  usPadding; //PR_ADDED: 32 byte padding
 uint32_t ul;
} t_Mstyle1;

  • In reply to Anna Youssefi:

    Anna,
    I tried installing 18.1.1.LTS and 16.9.6.LTS. Both versions are giving me the same stream of compile errors, cannot open stdbool.h and stdint.h. Why is this?

    Thanks,
    Priya
  • In reply to Priya Nadathur70:

    Priya Nadathur70

     I did change the include options to the correct ARM compiler. Current console file attached.

    Its not able to find stdint.h and stdbool.h

    The executed commands in that log show that you are using the following option:

    --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.0.LTS"

    It should be:

    --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.0.LTS/include"

  • In reply to Archaeologist:

    5633.console16.9.6.LTS.txt6521.errors.txt

    I still don't have any luck. Now its a swarm of linker errors. I appreciate the help.

    Thank you,

    Priya

  • In reply to Priya Nadathur70:

    I will focus on the first set of linker errors.

    First, I need to clarify some terms.  When using the TI linker, you typically supply a linker command file.  This is a text file with code that specifies details to the linker, such as giving names to ranges of memory, and how to allocate sections to memory ranges.  When using a GCC linker, there is a similar text file.  It is usually called a linker script.  The details of the code are very different between a linker command file and a linker script.  But they serve the same basic purpose.

    I'm pretty sure the file repmfirmware_Debug.ld (and other similarly named files) is a GCC linker script, and not a TI linker command file.  That's why you see so many errors similar to ...

    "../REPMFirmware/Debug/repmfirmware_Debug.ld", line 10: error #10008-D: cannot find file "INCLUDE"

    I'm not sure of the best way to fix this problem.  Perhaps you are supposed to use a completely different set of linker command files.  Or perhaps this project can only be built with a GCC ARM compiler.  Where did you obtain this project?  Whoever that is can certainly help more than I can.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    This is a project being ported from Stellaris code. I have access to another such project

    that is already in production. What files should I be looking for? I will find it from the

    other ported project and contact the engineer as well if needed.

     

    If you can give me some pointers on the file, it will help greatly.

    Thank you,

    Priya

  • In reply to Priya Nadathur:

    Priya Nadathur
    This is a project being ported from Stellaris code.

    My first thought was to ask you to start new thread in the Stellaris device forum.  But it is a read-only forum now.  You can search it, and maybe find something.  The next closest forum that is still active is the TM4C device forum.  You can try there.  Though I don't know how that will go.

    Priya Nadathur
    If you can give me some pointers on the file, it will help greatly.

    Unfortunately, I cannot.  I do not recognize any of the files.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    George,
    While I am waiting to contact the engineer, I was able to match my project settings with the successfully ported project. I deleted the Stellaris linker files. Can you take a look at the current set of errors and explain why there is a linker error?
    e2e.ti.com/.../669839

    Thank you,
    Priya
  • In reply to Priya Nadathur70:

    This entry on the linker invocation ...

    -l"C:/ti/TivaWare_C_Series-2.1.4.178"

    ... is just a directory path.  It should name a file.  Usually a library.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

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.