Errors without clues -> how to understand?

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Errors without clues -> how to understand?

Postby kster59 » Mon Feb 15, 2010 6:55 am

I spent about an hour debugging some code I wrote in Xc.

Turns out I did this:
out port myUart = PORT_UART_TX;

later in my code,
I did:
out port myOutput = XS1_PORT_1H;

Yes I understand now that the XC-1A has the UART connected to port 1H and this was a problem.

However, the Xc compiler tells me "Errors (1 item): make: *** timingTest.xe Error 1" and that's it.

No other clues. I had to delete every line one by one until I found the subtle error.

I noticed this a lot with the Xc environment that errors are caught by the compiler but nothing is reported back to the "Problems" tabb.

Is there a work around for this? Are errors reported elsewhere?

User avatar
Active Member
Posts: 44
Joined: Fri Dec 11, 2009 10:20 am

Postby trousers » Mon Feb 15, 2010 10:22 am

Not sure what the XDE is doing with your output but compiling the following code on the command line

Code: Select all

#include <platform.h>
out port myUart = PORT_UART_TX;
out port myOutput = XS1_PORT_1H;
int main(){return(0);}

Code: Select all

xcc test.xc -target=XC-1

Code: Select all

elf_a2xpFj: Error: Symbol myUart is a duplicate port declaration.
elf_a2xpFj: Error:   previously declared as myOutput.
Which is a degree more helpful.
Last edited by trousers on Mon Feb 15, 2010 10:55 am, edited 1 time in total.
Best friends with the code fairy.
User avatar
Posts: 19
Joined: Fri Dec 11, 2009 11:21 am

Postby mike » Mon Feb 15, 2010 10:39 am

I can't seem to reproduce this - just tried building the code above in XDE and I get three items in the problems tab.

Who is online

Users browsing this forum: No registered users and 0 guests