Building ethernet code for an XC-2 with XDE or xTimecomposer

Technical questions regarding the XTC tools and programming with XMOS.
androider
Member++
Posts: 24
Joined: Sat Sep 18, 2010 4:05 am

Building ethernet code for an XC-2 with XDE or xTimecomposer

Post by androider »

I am trying to upgrade to XDE 11.11 and/or xTimecomposer. I am trying to include ethernet modules into my project, but I can't get things to compile.

Is there a set of instructions I can file to include ethernet code in my existing project for XC-2. I am going to downgrade until I can figure it out.

Thanks in advance for your help.

Cheers,

Richard


User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

Here are the steps (for xTIMEcomposer 12.0.0beta). This is based on the layer 2 demo but it should be similar for the tcp/ip demos.

First you need to retarget the app to the XC-2.

1) Change the TARGET in the Makefile to XC-2

This will automatically pick up port definitions etc. for the ethernet board support module (this just works for XMOS boards - slicekit, XC-2 etc - for your own boards you will need to replace the ETHERNET_DEFAULT_... initializers with the correct ports for your board).

The XC-2 does not support xscope so you need to:

2) Change the USE_XSCOPE define in the main.xc file to 0
3) Remove the -lxscope (or -fxscope) flags from the XCC_FLAGS in the Makefile

This should now compile.

Dave
androider
Member++
Posts: 24
Joined: Sat Sep 18, 2010 4:05 am

Post by androider »

Thanks - when I try xTimecomposer again, I'll follow these steps. For now, I'm just using the example code for XC-2 to build my project. When I get a couple days, I'll spend more time with xTimecomposer I'll fiddle around with it.


Richard

davelacey wrote:Here are the steps (for xTIMEcomposer 12.0.0beta). This is based on the layer 2 demo but it should be similar for the tcp/ip demos.

First you need to retarget the app to the XC-2.

1) Change the TARGET in the Makefile to XC-2

This will automatically pick up port definitions etc. for the ethernet board support module (this just works for XMOS boards - slicekit, XC-2 etc - for your own boards you will need to replace the ETHERNET_DEFAULT_... initializers with the correct ports for your board).

The XC-2 does not support xscope so you need to:

2) Change the USE_XSCOPE define in the main.xc file to 0
3) Remove the -lxscope (or -fxscope) flags from the XCC_FLAGS in the Makefile

This should now compile.

Dave
androider
Member++
Posts: 24
Joined: Sat Sep 18, 2010 4:05 am

Post by androider »

O.K. this is going to sound ridiculous. But I finally got back around to addressing this. Life, job and all.

I finally figured out that there was an additional step that needed to be done in my case:
I needed to create a new project in xTimeComposer, and modify the Makefile per the instructions that
was generated by xTimeComponser. I was trying to modify my old makefile.

So, my next step is to hook up the XC-2 kit and try to run my application on that kit.

Then, when I get my slice kit I'll try it on there.

I have to admit - the conversion from cores to tiles was a huge leap in my case. I had a lot of code built around cores already, so I had to re-write my project to refer to tiles (new constants/defines and all).

I hope I'm now back on track. It's only been a year.

Anyway .... onward.