Skip to main content
Visitor II
September 11, 2007
Question

redeclared error

  • September 11, 2007
  • 2 replies
  • 830 views
Posted on September 11, 2007 at 06:02

redeclared error

    This topic has been closed for replies.

    2 replies

    wiletiAuthor
    Visitor II
    September 10, 2007
    Posted on September 10, 2007 at 17:02

    Hi all,

    I´m using ST72F63B microcontroller and after compilation the below messages are prompted:

    #error cpst7 io72263.h:7(14+4) redeclared localized PADR

    #error cpst7 io72263.h:9(14+5) redeclared localized PADDR

    #error cpst7 io72263.h:11(14+4) redeclared localized PBDR

    #error cpst7 io72263.h:13(14+5) redeclared localized PBDDR

    and so on...

    In actual fact, I´ve declared these variables once a time in io72263.h file as described below:

    volatile char PADR @0x00; /* Port A Data Register */

    volatile char PADDR @0x01; /* Port A Data Direction */

    volatile char PBDR @0x02; /* Port B Data Register */

    volatile char PBDDR @0x03; /* Port B Data Direction */

    volatile char PCDR @0x04; /* Port C Data Register */

    volatile char PCDDR @0x05; /* Port C Data Direction */

    volatile char PDDR @0x06; /* Port D Data Register */

    volatile char PDDDR @0x07; /* Port D Data Direction */

    and so on...

    Thus, I have no idea for these error messages. Where should I try harder in order to find out the problem?

    Thank you for any help,

    Wilson

    Visitor II
    September 11, 2007
    Posted on September 11, 2007 at 06:02

    the message is quite clear: you declared every var more than once.

    Maybe you include the same file twice, or you include a file with the declarations in a file where the vars are already declared: it should be easy to find out.