How to boot second Core from first Core?

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
tonyshao
Junior Member
Posts: 6
Joined: Fri Jan 08, 2010 6:13 am

How to boot second Core from first Core?

Postby tonyshao » Mon Jan 18, 2010 3:43 am

Our application have three part, image A,B,C. We called image A as bootloader, image B and C as application, Image A run on first Core and boot from external SPI flash, and first Core boot Image A or B to second core depends on a external signal, for example, first core receive a commnad from Host through USB interface or first core read external I/O status.

SPI flash Image:
|first sector | second sector | third sector |
| image A | image B | image C |

How to write the bootloader, anybody can help me?
User avatar
trousers
Active Member
Posts: 44
Joined: Fri Dec 11, 2009 10:20 am

Postby trousers » Tue Jan 19, 2010 10:19 am

The easiest way to do this would be to boot the first system from SPI as if it was the only one then, when you've got a signal from USB, boot the other over an xlink using an image stored in flash. The boot ROM allows a boot-from-link start for both L1 and G4; libflash gives you easy access to the flash.

The disadvantage of this is that you'd have configure the xlink manually, and manually set up any channels you want to use between the two cores after the second core has booted. This is unlikely to be pretty.

xobjdump is able to extract a bootable image that can be sent over a link. It would need only a length word and a CRC adding during transmission.

An alternative would be to boot their pair of them from a single flash (the tools support this). The initial program on the second core would then be able to dynamicaly load and execute code sent to it over a link. This has the advantage that the xmos tools will handle xlink initialisation and channel instantiation but requires some very with setting up the machine context during dynamic code loading.

Which is best would depend on your application, particularly what kind of communiction they'll be between the two cores once booted.
Best friends with the code fairy.
tonyshao
Junior Member
Posts: 6
Joined: Fri Jan 08, 2010 6:13 am

Postby tonyshao » Thu Jan 21, 2010 4:28 am

Thanks Awesome_pants.

Who is online

Users browsing this forum: No registered users and 3 guests