XBurn - proper use

Technical questions regarding the XTC tools and programming with XMOS.
GerhardNorkus
Active Member
Posts: 55
Joined: Wed Jan 05, 2011 2:15 pm

XBurn - proper use

Post by GerhardNorkus »

Hi All,

Sorry to be a bother. I am trying to write my own bootloader for an 8 bit flash device. Having problem with xburn. I create the simple flashing led sample program named temptemp and compile it. Then I try to burn it to a sacrificial chip (the altar of education). The temp xn was obtained by doing a xobjdump split and renaming the xn file it spat out. Here's what I did:

Xburn --make-exec tempburn.xe --target-file temp.xn temp.xe
Xburn: error: multiple load segments overlapping

The same thing happens if I omit the make exec and try the chip directly.

Can someone illuminate for me the error of my ways?


richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

GerhardNorkus wrote:Hi All,

Sorry to be a bother. I am trying to write my own bootloader for an 8 bit flash device. Having problem with xburn. I create the simple flashing led sample program named temptemp and compile it. Then I try to burn it to a sacrificial chip (the altar of education). The temp xn was obtained by doing a xobjdump split and renaming the xn file it spat out. Here's what I did:

Xburn --make-exec tempburn.xe --target-file temp.xn temp.xe
Xburn: error: multiple load segments overlapping
This is a confusing error message, sorry - it will be improved in the next tools release. The problem is that xburn does not support writing executables that require network setup to the OTP. Since there is no bootloader that runs before the code written OTP the application won't work correctly if it expects the network to have been setup.

If you want to write a bootloader to the OTP you could compile it for a single-tile target and than target should have no links in the .xn (in particular it should not have an xscope link) - this should get rid of the xburn error.
GerhardNorkus
Active Member
Posts: 55
Joined: Wed Jan 05, 2011 2:15 pm

Post by GerhardNorkus »

Hi Richard (and others),

Henk Muller gave me the clue I needed....

My xn file (for SU1 processor) had extra nodes in it. This was causing extra initialization code to be generated whether or not I used -nostdlib in the XCC_MAP_FLAGS section. I can now burn at will.

I found out a neat little detail, not mentioned in the documentation. If I keep my program burn size to less than 2k, each time I use xburn, it causes the previous sector to no longer be usable. It loads the most recently burned OTP bits. I presume this has to do with the security bits being set properly by xburn.