"service" functions in XC. How to?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
data
Active Member
Posts: 43
Joined: Wed Apr 06, 2011 8:02 pm

Post by data »

I apologise for flagrantly digging up an ancient thread once again, but I thought I'd mention that I have just successfully used Richard's code and recommendations to connect two XCore nodes over Xconnect through "noinit" service declarations, with manual link initialisation. I don't know whether GerhardNorkus ever managed it, but I have now done so.

I have an A8 board and a StartKit, and I connected them over a 2-wire link. I then made two projects, one for each board. In the A8 project's XN file, I declared a service for the StartKit, and in the StartKit project, I declared a service for the A8 board. Both services were declared with Flags="noinit". In each project, I used Richard's function to initialise the link going to the other board. On one project, the next step was to periodically send integers to the other board, and on the other project, to receive them and print them. Communication was performed using the XC I/O operator.

I did have quite a time getting to that point. I first tried to write a single project, and boot one board from the other over the Xconnect link, even though the two boards are not in the same JTAG chain. While this may yet be possible, the tools unfortunately do not seem to support this configuration at all. Once I gave up on that, and decided to use two separate projects, and two different XTAG adapters, things went much more smoothly.

I found that Richard's recommendation to use manually configured routing in the XN file is quite important. Hence, a thorough understanding of the way Xconnect routing works is essential. The document xCONNECT Architecture* was most helpful to me. Once you get used to the concepts, you will find that it is actually quite simple to put a network together. (Hint: make sure the remote routing and channel IDs match across the two XN files. It really does matter!)

I was pleasantly surprised at how nicely XDE supports multiple simultaneous debugging sessions. This capability (possibly inherited from Eclipse?) made this process much easier.

So, if you're trying to make this work, don't give up -- it can be done. Richard, thank you for your help!

* https://www.xmos.com/support/silicon?pr ... nent=17349


User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

data wrote:I apologise for flagrantly digging up an ancient thread once again, but I thought I'd mention that I have just successfully used Richard's code and recommendations to connect two XCore nodes over Xconnect through "noinit" service declarations, with manual link initialisation. I don't know whether GerhardNorkus ever managed it, but I have now done so.
Cool, can you post your code on github? I never got it to work properly but sure want to try again!