Page 1 of 1

Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 11:25 am
by Machdisk
Hello All,

I'm working on a custom board based on the XU224. I have been flashing/running programs happily from xtime composer with the xtag3 programmer what must have been hundreds of times when suddenly (without changing any hardware or code) I can no longer do either and I get this error:

xrun: First stage multi-node boot failed, please check XN file and Xmos link connectivity

And no other feedback. Interestingly the board boots and runs fine on the code which is on the flash chip from before I lost the ability to program the thing.

When I make an attempt, the existing code on the board stops executing, the processor appears to reset and the xtag 3 LEDS will go on (5 blinking or steady green plus one red LED). That continues until something times out in about 20/30 seconds and I get the above error message.

Any ideas?

Re: Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 12:49 pm
by mon2
Are you able to upload fresh code using xrun to your custom board?

The issue may be that is xtag3 board has stopped working. Some others have reported similar quirks in the past and may be esd related.

Re: Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 2:17 pm
by matthew1
If you have spares, could you try this XTAG on a different board, and a fresh XTAG on the current board? Would be good to check if the problem follows the board or the debugger.

Thanks,

Matthew.
XMOS

Re: Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 3:17 pm
by mon2
With a quick review of the XTAG3 schematic there does not appear to be any ESD protection on the USB lines between the USB connector and the XMOS processor.

Suspecting that ESD has nuked the adapter but confirm with another XTAG3 tool or different target board with this tool.

Sad as ESD protection (high speed) for both USB lines is under $ 0.05 USD from Socay or others.

Re: Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 4:51 pm
by Machdisk
Definitely not the XTAG that is at fault actually, It still works on another board and a second XTAG doesn't work on the first board.

Re: Sudden issue programming or flashing

Posted: Wed Aug 01, 2018 5:01 pm
by Machdisk
As to using XRUN, I assume you mean over USB and this board doesn't have a separate USB port unfortunately. It's the XTAG port or bust and I can't really let it be bust. The Xtime IDE still detects the target via the xtag but then can't do anything except for resetting the board. It's got me a bit baffled as if it can detect the target and reset the board that would imply that the debug port on the xmos chip is at least mostly working (and there isn't exactly much to go wrong there). The fact that the chip will happily boot and run off whats on the flash implies that all the boot, power cycling and tile 2 set up pull ups are working which leaves...?

Re: Sudden issue programming or flashing

Posted: Thu Aug 02, 2018 8:49 am
by infiniteimprobability
From the command line, I assume xrun -l completes OK? This queries the JTAG modules on each node.

The loading process is quite complex behind the scene. Yes there is the communication with the JTAG module but If either one of the processors can't run properly (reset, power good, decoupling, clock etc.) then it can prevent loading and give you a message as seen (it first loads a bootloader before the actual binary). Have you made any changes to the HW or even the xn file recently?

Re: Sudden issue programming or flashing

Posted: Thu Aug 02, 2018 10:12 am
by mon2
Try the following trick which is to prevent the external flash from loading and then erase it or reload with fresh code:

http://www.xcore.com/viewtopic.php?t=2820

Please post your results.

Re: Sudden issue programming or flashing

Posted: Thu Aug 02, 2018 11:25 am
by infiniteimprobability
prevent the external flash from loading
Good point..