Using XS1.h with XS2 devices

If you have a simple question and just want an answer.
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Using XS1.h with XS2 devices

Post by gerrykurz »

I am moving code from an XS1 platform to an XS2 platform and I am wondering is XS1.h is still ok or is there an updated header file for the XS2 hardware. I noticed that there is a check for a __XS2A__ definition in this file. Do I need to define this for XS2 hardware?

Also, I couldn't get my tile references to work without platform.h being included. I had a look at this header file but it doesn't contain much. What exactly does it do?
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1164
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

I am moving code from an XS1 platform to an XS2 platform and I am wondering is XS1.h is still ok or is there an updated header file for the XS2 hardware. I noticed that there is a check for a __XS2A__ definition in this file. Do I need to define this for XS2 hardware?
No - just continue using xs1.h. Any additional features that XS2 brings (priority cores, extra instructions, dual issue, external clock divide etc. etc.) are automatically brought in.
Also, I couldn't get my tile references to work without platform.h being included. I had a look at this header file but it doesn't contain much. What exactly does it do?
It (platform.h) gets generated from the xn file. It contains boot info, link routing and config, tile/node config (USB PHY), clock settings, and optional port definitions etc. etc.
It's basically a preprocessor friendly version of the xn xml file...the tile references are in the xn so you need platform.h if you are writing multi-tile programs.
User avatar
gerrykurz
XCore Addict
Posts: 204
Joined: Sun Jun 01, 2014 10:25 pm

Post by gerrykurz »

OK thanks