Trouble setting up GITHub projects in XDE

New to XMOS and XCore? Get started here.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am
Contact:

Post by LyleHaze »

More progress, more questions.. :)

The new tools are working great.
My code is very close, but not quite working yet.

Comments and questions regarding your JTAG tools:

I checked with a magnifying glass, and found that I'm running a c5 version
of the XS1-L2 chip. The xn file shows 500 MHz, so I changed to that xn file and
the new xrunxe command adjusted beautifully.
I expected that I'd have to change the internal delay and bit time calculations
from 100,000,000 to 125,000,000, but that was not needed. Seems odd, as
I assumed that the internal clock was 1/4 of the system clock.

As I troubleshoot my code, I can use your regs command to see when a thread
gets "stuck" away from the usual select statement. My question: Is there somewhere
I can look in XDE for a instruction level disassembly of my code?
By looking into "binary/function table" I can figure out which function it is stuck in, but not
where within that function.

Since I don't have use of a printf() function my troubleshooting tools are a bit limited.
The SDCard module has a test routine that makes extensive use of printf() to generate
troubleshooting data. I have used a flashing LED to determine that I'm stuck with a
FAT error 13 (FR no filesystem).. Today I'll double check all connections, replace all the
SD code with a fresh download, and hopefully get this last bug worked out.

Thanks again for your help, and if you have any suggestions about getting instruction
level address disassembly, or ideas for better debugging tricks, I would love to hear
about them. Today I'll verify all my connections to the SD card and re-import the SD code
before raising another thread on those topics.


Thanks,
LyleHaze


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am
Contact:

Post by segher »

LyleHaze wrote:I checked with a magnifying glass, and found that I'm running a c5 version
of the XS1-L2 chip. The xn file shows 500 MHz, so I changed to that xn file and
the new xrunxe command adjusted beautifully.
I expected that I'd have to change the internal delay and bit time calculations
from 100,000,000 to 125,000,000, but that was not needed. Seems odd, as
I assumed that the internal clock was 1/4 of the system clock.
The reference clock is the system clock divided by something; runxe
programs that "something" (sswitch reg 08 is something-1; default is 3,
for you it should now show 4). runxe gets the value from the XE file
(and the XE file gets it from your XN file).
My question: Is there somewhere I can look in XDE for a instruction
level disassembly of my code?
I have no idea about XDE, but "xobjdump -d" will do it.
Since I don't have use of a printf() function my troubleshooting tools are a bit limited.
I usually do a printf() to a UART. Takes some fiddling for that to work with
"foreign" code (i.e. not mine :-) ), because the printf from libxs1 likes to
get in the way. The easiest way is to call your printf something else instead,
"printx" or whatever.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am
Contact:

Post by LyleHaze »

Nice. Thanks again.

now have "chprintf(streaming channel out, char *format, ...)"

I'm just using the fast_uart_tx() thread to catch it all.
I can't figure out how to get xc happy with a char * argument, but at least
I can use it from c code like the sc_sdcard stuff I'm playing with today.

Perhaps I'll later write a link back through the localbus instead, so the serial
port won't be required.

xobjdump looks like just what I needed.. I'll dig deeper there.

Now if I could just figure out why the sdcard will not open..
But that is another forum thread. Thanks again!

LyleHaze
Post Reply