I have been working for months with a custom board based on the XUF216-512-TQ128 device and it has suddenly started acting strangely. I've read through many posts with similar problems (some details below), leading me to think I have some kind of hardware problem. But, since the hardware was working fine before, I would like to dig deeper into the issue and I would be very grateful for any advice on how to do so.
Currently, I am having no luck executing a single-task program, the only executable line of which is a printf statement. Nothing appears in the console although it indicates the program is running. I've been able to printf and do many other things successfully on this board up until this point. This small test program runs fine on, for instance, a previous version of the board with no change to the executable - I simply swap the board to which the XTAG connector is connected and re-run.
When I launch this program with the debugger I see in the console the text I pasted at the bottom of this post. There is a line "It stopped with signal SIGTRAP, Trace/breakpoint trap." even though I have no breakpoints set and the debugger consoles indicate the debugger is still running. I am a noob at embedded programming, so am unclear what this might mean and how to proceed with debugging it.
I have been experimenting a good deal with using the flash for persistent data storage and "dual booting", and wonder if I have messed up the flash somehow. For instance, when I execute "xflash --verbose --read-all --target-file MyBoard.xn -o tmp.bin" in a terminal, this command hangs. That is, if I watch the size of tmp.bin it grows to a value much less than the 2MB flash size then stops growing, and the read-all command never completes (within a couple minutes at least). I can sometimes flash the program from xtimecomposer, and sometimes I get this one-line output "xrun: Binary not correctly downloaded to target device", or this multi-line output:
I am using Community_14.3.3 (build 22296, Apr-19-2018) on Ubuntu 16.04.Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
xflash: Warning: F03148 --quad-spi-clock not given, using default 15.62MHz
xflash: Warning: F03149 QE_REGISTER and/or QE_BIT locations not found in XN file for this flash device. Using default quad_spi_qe_location_status_reg_0 and quad_spi_qe_bit_6.
xrun: Binary not correctly downloaded to target device
Error: F03013 Failed to run : 0x7fff1e5af6c0.
Any advice would be greatly appreciated.
.gdbinit: No such file or directory.
connect --adapter-id .lcU0GWI --xscope
0x00040000 in _start ()
Loading section .text, size 0x24a lma 0x40000
Loading section .cp.rodata, size 0x18 lma 0x4024c
Loading section .ctors, size 0x10 lma 0x40264
Loading section .dtors, size 0x10 lma 0x40274
Loading section .dp.data, size 0x1c lma 0x40284
Loading section .dp.rodata.4, size 0x10 lma 0x402a0
Start address 0x40000, load size 686
Transfer rate: 83 KB/sec, 114 bytes/write.
Loading section .text, size 0x40 lma 0x40000
Loading section .cp.rodata, size 0x18 lma 0x40040
Loading section .dp.data, size 0x8 lma 0x40058
Start address 0x40000, load size 96
Transfer rate: 31 KB/sec, 32 bytes/write.
Loading section .crt, size 0xac lma 0x40000
Loading section .init, size 0x1a lma 0x400ac
Loading section .fini, size 0x2e lma 0x400c6
Loading section .text, size 0x11d4 lma 0x400f4
Loading section .cp.rodata, size 0xc lma 0x412c8
Loading section .cp.const4, size 0x24 lma 0x412d4
Loading section .cp.rodata.string, size 0x11 lma 0x412f8
Loading section .cp.rodata.cst4, size 0x10 lma 0x4130c
Loading section .ctors, size 0x14 lma 0x4131c
Loading section .dtors, size 0x10 lma 0x41330
Loading section .dp.data, size 0x30 lma 0x41340
Loading section .dp.data.4, size 0x28 lma 0x41370
Loading section .dp.rodata.4, size 0x10 lma 0x41398
Start address 0x40000, load size 5029
Transfer rate: 140 KB/sec, 386 bytes/write.
Loading section .text, size 0xc lma 0x40000
Loading section .dp.data, size 0x8 lma 0x4000c
Start address 0x40000, load size 20
Transfer rate: 19 KB/sec, 10 bytes/write.
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.