XK-1A link two boards together

Technical questions regarding the XTC tools and programming with XMOS.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

XK-1A link two boards together

Post by cicga »

hi all,

I have two XK-1A boards i plug them and wrote code template:


#include <xs1.h>
#include <platform.h>

on stdcore[0]: out port outLL = XS1_PORT_8A;
on stdcore[0]: out port outRL = XS1_PORT_8B;

on stdcore[1]: out port outRH = XS1_PORT_8A;
on stdcore[1]: out port outLH = XS1_PORT_8B;

void R_L(){

}
void L_L(){

}

void R_H(){

}
void L_H(){

}

int main(void)
{

par{
on stdcore[0] : R_L();
on stdcore[0] : L_L();
on stdcore[1] : R_H();
on stdcore[1] : L_H();
}


}

its compile fine but when I am trying to write it on hardware I have message:
"xrun: Number of cores in binary does not match the device"

like the is no second board connected...but it is.


cicga


User avatar
phalt
Respected Member
Posts: 298
Joined: Thu May 12, 2011 11:14 am

Post by phalt »

Take a look at the dual XC-1A's project, it should give you an idea of how to work with links between the boards, I know it's a different development board but the guide on there is quite detailed and should be easy to adapt.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

What output does "xrun -l" give?
The XK-1 2-board example should work without problems.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

Post by cicga »

Bianco
,
output gives:

"xrun: Number of cores in binary does not match the device"

sorry link to XK-1 2-board example does not work.where did you find it?
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

http://www.xmos.com/xk-1a

Under application software.

I asked you to give the output of "xrun -l" which cannot give some error about your binary.
"xrun -l" lists all devices in the JTAG chain, that sounds like a good starting point for debugging your problem.

What XN file or target did you use to compile it?
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

Post by cicga »

Bianco,
i'v tried that code it give the same message:
xrun: Number of cores in binary does not match the device
:roll:
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

So what does "xrun -l" output? Does it show both cores?
Please answer all my questions otherwise we cannot help you.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

Post by cicga »

sorry Bianco

yes xrun -l show both devices
and in run/debug config tab show L1[ 0..1] device too

now I have new message:

Description Resource Path Location Type
first index of array `stdcore' exceeds its upper bound xk1-concurrent.xc /cc/src line 13 C/XC Problem

now I am using sample code:
#include <platform.h>

#define PERIOD 20000000

on stdcore [0]: out port led0 = XS1_PORT_8B;
on stdcore [1]: out port led1 = XS1_PORT_8B;

void flashLED (out port led, int period);

int main (void) {
par {
on stdcore [0]: flashLED (led0 , PERIOD);
on stdcore [1]: flashLED (led1 , PERIOD);
}
return 0;
}
You do not have the required permissions to view the files attached to this post.
Last edited by cicga on Thu Oct 13, 2011 7:34 pm, edited 1 time in total.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Try this binary.
You should see the LEDs flashing running from one board to the other and back.
You should also see Hello World0! Hello World1! in your command window.
(It is the example from the XMOS site, i confirmed on hardware that this works).
Execute it with "xrun --io dual_xk1.xe"
You do not have the required permissions to view the files attached to this post.
cicga
Active Member
Posts: 51
Joined: Tue Oct 11, 2011 4:48 pm

Post by cicga »

Bianco,

pls take a look on multicore.jpg picture may be this will help...

i cannot run your file - command prompt telling:
"xrun: Invalid option -io"
Last edited by cicga on Thu Oct 13, 2011 8:01 pm, edited 1 time in total.