EmbDev.net

Forum: ARM programming with GCC/GNU tools error "causes a section type conflict"


Author: Dustin Sr (dbrazeau)
Posted on:

Rate this post
0 useful
not useful
I'm receiveing the error "error: PBCInterface::sPBCInitTablecauses
causes a section type conflict"

// .hpp file
struct sPBCInitEntry
{
.
.
.
}
class PBCInterface
{
.
.
.
private:
static  const sPBCInitEntry sPBCInitTable[]  TSECT_Data_32;
.
}

//.cpp file
const sPBCInitEntry     PBCInterface::sPBCInitTable[] =
{
    {     0x0000,0x0000  },     // 0x00
    {     0x0001,0x0000  },     // 0x01
    {     0x01a9,0x0000  },     // 0x02
    {     0x01aa,0x0000  },     // 0x03
    {     0x01ab,0x0000  },     // 0x04
    {     0x01ac,0x0000  },     // 0x05
    {     0x01ad,0x0000  },     // 0x06
    {     0x0002,0x023e  },     // 0x07
    {     0x0003,0x8000  },     // 0x08
    {     0x0007,0x8555  },
    {     0x0008,0x0555  },
    {     0x0009,0x5555  },
    {     0x000a,0x00bf  },
    {     0x0199,0x0000  },
    {     0x019b,0x01ff  },
    {     0x019c,0x01ff  },
    {     0x01e8,0x0000  },
    {     0x01e9,0x0000  },

    {     0x01eB,0x0800  },
    {     0x01ec,0x0000  },
    {     0x01ef,0x0000  },
    {     0x01f0,0x0000  },

    {     0x0020,0x0038  },
    {     0x019b,0x01fd  },
    {     0x000e,0x0003  },
    {     0x000f,0x0020  },
    {     0x0199,0x0002  },
    {     0x0002,0x423e  },
    {     0x0002,0x023e  },
    {     0x000d,0x0001  },
    {     0x0000,0x0000  }
};

I'm doing similar stuff in other source that compiles fine, but I can't
figurout why this one doesn't work.  Any help/thoughts?

Thanks,
Dustin

Author: Dustin Sr (dbrazeau)
Posted on:

Rate this post
0 useful
not useful
I'm also getting the error "error: braces around scalar initializer for
type 'const CmdEntry' "
for some other code that is trying to do basicly the same thing.

D

Author: Dustin Sr (dbrazeau)
Posted on:

Rate this post
0 useful
not useful
Dustin Sr wrote:
> I'm also getting the error "error: braces around scalar initializer for
> type 'const CmdEntry' "
> for some other code that is trying to do basicly the same thing.
>
> D

Also If I change TSECT_Data_32 to TSECT_Data_16 then the error goes
away, both are under *(.data) and *(.bss) in Sections{ in my sections
map. Is this a Linker or memory mapping problem?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.