I receive 16 of the following type error, as soon as I define the second of the two arrays, below.
xmap: Error: Symbol __xccomp_internal_ports128_anon_0 is a duplicate port declaration.
xmap: Error: previously declared as __xccomp_internal_ports64_anon_0.
xmap: Error: Symbol __xccomp_internal_ports128_anon_1 is a duplicate port declaration.
xmap: Error: previously declared as __xccomp_internal_ports64_anon_1.
etc...
Code: Select all
struct pinDescriptors {
port p;
int width;
char name[9];
int pin;
};
struct pinDescriptors ports64[NPINS64] = {
{ XS1_PORT_1A, 1, "PORT_1A", 0 },
{ XS1_PORT_1B, 1, "PORT_1B", 1 },
etc.
struct pinDescriptors ports128[NPINS128] = {
{ XS1_PORT_1A, 1, "PORT_1A", 0 },
{ XS1_PORT_1B, 1, "PORT_1B", 1 },
etc...
The source of the problem is the multiple declaration of a port by using the symbol XS1_PORT_1A more than once in a program. As I understand it, without an 'on' qualifier, these are assumed to be on stdcore[0], and the compiler rejects this. So I need a means to build two, and eventually 3, arrays of appropriately qualified port declarations.
I'm having trouble with syntax (again : nod to m_y who recently helped with a simpler case).
The tutorial 'Connecting Multiple XDKs using XN' contains as part of the LED example the following:
Code: Select all
out port leds[24] = { on stdcore[0] : X0LEDA,
on stdcore[0] : X0LEDB,
etc.
Code: Select all
struct pinDescriptors portsPackage2[NPINS64] = {
{ on stdcore [2] : XS1_PORT_1A, 1, "PORT_1A", 0 },
etc.
I'd appreciate some guidance.
Thanks,
--r.