Ways to program a XMOS chip?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Ways to program a XMOS chip?

Post by MatCat »

I am wanting to work on designing a PCB using an XMOS chip, but I am not sure how programming it would work. I have the StartKIT, could it be used as a programmer of other XMOS devices much like how one can use Arduino's ArduinoISP program to program other AVR's with itself? Or would I have to invest in an XTAG-2 and put the port for it on my PCB?

I assume since the device uses external flash I could just write the program to the flash space too, what exactly are my options?


User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

Digging through datasheets and documents I found mention that xflash has to know how to communicate to the flash chip, where is this detailed so I can learn more about it?

I also noticed that it states the flash image must have 32 bit word with the size of the flash program (size in words, not bytes???), and CRC, now does that mean that the 32 bit size word is first, then program, then the CRC? So I could program by just using any old MCU and writing the program in that format to the SPI Flash device at lowest memory address? (0x0)?
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

BUMP, I am sure someone knows the answers here...
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Your options are to program it using an XTAG2 (recommended), add an FTDI FT3232 USB-Parallel chip to your board that supports JTAG (older XMOS boards use this), program the SPI flash directly.

Sure the startKIT can program an XMOS board. But you will have to develop the support yourself.
You don't need to start from scratch since the XTAG2 firmware is open, but it isn't completely trivial either. There is a chance that it won't work with the XMOS tools so you will have to implement your own host tools
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

Bianco wrote:Your options are to program it using an XTAG2 (recommended), add an FTDI FT3232 USB-Parallel chip to your board that supports JTAG (older XMOS boards use this), program the SPI flash directly.

Sure the startKIT can program an XMOS board. But you will have to develop the support yourself.
You don't need to start from scratch since the XTAG2 firmware is open, but it isn't completely trivial either. There is a chance that it won't work with the XMOS tools so you will have to implement your own host tools
Link to the firmware code for XTAG2?

Also I know I have seen mention of DFU here and there, do you have a link to any good resources on that?

I am basically building a DEV board that can take the U6A or U8A. I did break out the XTAG header on it, I also plan to break out the flash chip pins too.

Another thing I am wondering is about XTAG's support for XMOS Link, I see the port pin out shows XL1_UP0/1, XL1_DN0/1, but I can't find any documentation on how this is connected to the chip itself (What pins are what?).

Thanks for answering my questions!
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

I did find in the datasheet where it tells how to connect the xCONNECT link to xSYS:
XLB1 out (X0D16) to pin 6 of the xSYS header with a 33R series resistor close to the device.

XLB0 out (X0D17) to pin 10 of the xSYS header with a 33R series resistor close to the device.

XLB0 in (X0D18) to pin 14 of the xSYS header.

XLB1 in (X0D19) to pin 18 of the xSYS header.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Sure you can use DFU, if you can get a DFU loader on your chip first.
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

Bianco wrote:Sure you can use DFU, if you can get a DFU loader on your chip first.
Yeah hard to use DFU if you don't have a bootloader :).
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

If you need to ask about the possible ways to run code on
the chips, you really really really want an XSYS header and
an XTAG2.

Also make sure you read and use the (excellent!) checklists
near the end of the datasheets.
User avatar
MatCat
Active Member
Posts: 40
Joined: Wed Dec 18, 2013 11:51 am

Post by MatCat »

segher wrote:If you need to ask about the possible ways to run code on
the chips, you really really really want an XSYS header and
an XTAG2.

Also make sure you read and use the (excellent!) checklists
near the end of the datasheets.
Yeah I do plan to get XTAG2, but I am also going to whip up my own little flash programmer too. I also plan on using DFU if it's working and I can find it.

It will probably be a month before I actually build these little dev boards I am working on, by then I should have it all sorted out.