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?
Thanks.
Errors without clues -> how to understand?
-
- XCore Addict
- Posts: 162
- Joined: Thu Dec 31, 2009 8:51 am
-
- Active Member
- Posts: 44
- Joined: Fri Dec 11, 2009 10:20 am
Not sure what the XDE is doing with your output but compiling the following code on the command linewithsays
Which is a degree more helpful.
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.
Last edited by trousers on Mon Feb 15, 2010 10:55 am, edited 1 time in total.
Best friends with the code fairy.
-
- Member++
- Posts: 19
- Joined: Fri Dec 11, 2009 11:21 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.