Services in non-volatile memory

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Hooligan
Member++
Posts: 16
Joined: Mon May 02, 2011 12:39 pm

Services in non-volatile memory

Post by Hooligan »

From Programming XC on XMOS Devices Section 3.7:
Another use of services is for interfacing with functions pre-programmed into the
non-volatile memory of an XCore by a third-party manufacturer. Typically, the
manufacturer provides an XN file that contains all service declarations, which are
available in the file <platform.h>.
Has anyone seen an example of this? It's unclear what is meant by non-volatile
memory. OTP? ROM?

Examples or pointers to other documentation would be most helpful. Wild speculation
would be entertaining.

Thanks.


User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm

Post by Berni »

Well the only non-volatile memory inside it is the OTP that normally contains a SPI boot loader. You can burn your whole program in to there if you want to (the XTAG2 has it done like that)
User avatar
Hooligan
Member++
Posts: 16
Joined: Mon May 02, 2011 12:39 pm

Post by Hooligan »

Berni wrote:Well the only non-volatile memory inside it is the OTP that normally contains a SPI boot loader. You can burn your whole program in to there if you want to (the XTAG2 has it done like that)
There is also a boot ROM (which I assume to be masked ROM) who's contents are executed to check the OTP security bit and the boot mode pins before launching the appropriate boot mode. If that's where these "services" are programmed then you would need to be a chip foundry building with XMOS IP to take advantage. If that's the case, then the paragraph calling them out is completely useless to the vast majority of developers.

If these services are nothing more than a generic thread watching a channel endpoint, then why put the paragraph in with a section on linking to external hardware?
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

Probably not the most confused programmer anymore on the XCORE forum.
User avatar
Hooligan
Member++
Posts: 16
Joined: Mon May 02, 2011 12:39 pm

Post by Hooligan »

I realize that my initial post was less than clear. I understand the available memory devices available on the XMOS devices and how to program them. My interest lies with the method of implementing a service in non-volatile memory. The documentation mentions services in several places but I've been unable to find a working example or even an example XN file.
  • Here is what I believe XMOS intends:
  • I design a board with a multi-core XMOS device and some specialized hardware hanging off the I/O pins of one core.
  • I program the OTP of that core with the I/O interface to my hardware and some "service" code that monitors one or more channels and provide an API for my hardware.
  • I create an XN file with entries that define what channels are used to access my service.
  • Then end user programs the other core(s) and, using the <platform.h> file generated from my XN file, accesses my service through the defined channels.
So, what do the XN entries look like? There is no mention of service elements in the documentation.
Do I need to provide code to the end user that uses the pre-defined channels or does the end user interface directly to them?

The text of Programming XC on XMOS Devices implies that this feature is implemented but no mention of it is made in any other documentation that I can find.