XS1-G4 program upload problem

Technical questions regarding the XTC tools and programming with XMOS.
homerJ
Member
Posts: 15
Joined: Tue Mar 08, 2011 12:06 pm

XS1-G4 program upload problem

Post by homerJ »

Hi,

I built a prototype using XMOS XS1-G4.
Furthermore I created a simple test code in the XMOS Development Environment (Win7 x64) and I tried to upload the binary (via a XTAG2 device) to the CPU.

After clicking the "Run" button, the program stops after a very short time ("terminated").
After clicking the "Debug" button, I received the following error message:

Code: Select all

connect --adapter-id qIsC1TDT
0x00010000 in _start ()
load
Loading section .text, size 0x35e lma 0x10000
Loading section .init, size 0x5c lma 0x1035e
Loading section .fini, size 0x3a lma 0x103ba
Loading section .globcode, size 0x18 lma 0x103f4
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x1040c
Loading section .gnu.linkonce.t._cleanup_impl, size 0x2 lma 0x1040e
Loading section .rodata, size 0x4 lma 0x10410
Loading section .cp.const4, size 0x14 lma 0x10414
Loading section .ctors, size 0x4 lma 0x10428
Loading section .dtors, size 0x4 lma 0x1042c
Loading section .dp.data, size 0x24 lma 0x10430
Loading section .eh_frame, size 0x4 lma 0x10454
Start address 0x10000, load size 1112
Transfer rate: 135 KB/sec, 92 bytes/write.
Binary not correctly downloaded to target device
What is the problem?? :(

I think the JTAG connection to the CPU works, because the "xrun -l" command outputs:

Code: Select all

Available XMOS Devices
----------------------

  ID    Name                    Adapter ID      Devices
  --    ----                    ----------      -------
  0     XMOS XTAG-2             qIsC1TDT        G4[0]
Anyone have a hint to fix this issue?


homerJ
Member
Posts: 15
Joined: Tue Mar 08, 2011 12:06 pm

Post by homerJ »

addendum:

I followed this instructions:
http://www.xmos.com/discuss/viewtopic.p ... ce81ffa22d

...and I received the same outputs.
So I think the communication between JTAG and XMOS works.

But I cannot run or debug any program and thats very frustrating!!!!
(I use an example code for the XC-2 Board)....
User avatar
XMatt
XCore Addict
Posts: 147
Joined: Tue Feb 23, 2010 6:55 pm

Post by XMatt »

When downloading a binary to the target device the development tools check if the image has been correctly transferred to memory. The error message is stating that this is not the case. This is normally due to issues with the JTAG connection in terms of signal integrity or due to power (or possibly ground) issues with the XCore device on the board which is causing the on chip memory to function incorrectly.

If you reduce the speed of the JTAG interface with the --jtagspeed option do you seen improved results? It would also be worth reducing the device core frequency in the XN file and seeing if it functions correctly at a lower speed.
homerJ
Member
Posts: 15
Joined: Tue Mar 08, 2011 12:06 pm

Post by homerJ »

I changed the core frequency, it works!
but 300 is to low..
User avatar
XMatt
XCore Addict
Posts: 147
Joined: Tue Feb 23, 2010 6:55 pm

Post by XMatt »

I would suggest checking the power supplies on the board are as expected and also that you check the decoupling and ground connection for the Xcore. It does suggest that there is a board issue here.
homerJ
Member
Posts: 15
Joined: Tue Mar 08, 2011 12:06 pm

Post by homerJ »

after soldering some other parts (have nothing to go with the xmos) the cpu runs at 400 MHz without problems and i'am wondering .... :shock:
kfx
New User
Posts: 2
Joined: Mon Jan 09, 2012 11:33 am

Post by kfx »

Hello,

I have a very similar problem with my XC-1.

As soon as I use the "par" statement in my programs they stop working and produce the "Binary not correctly downloaded to target device" error.

Code: Select all

.gdbinit: No such file or directory.

connect --adapter-id 77110048
0x00010000 in _start ()
load
Loading section .text, size 0x35e lma 0x10000
Loading section .init, size 0x5c lma 0x1035e
Loading section .fini, size 0x3a lma 0x103ba
Loading section .globcode, size 0x48 lma 0x103f4
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x1043c
Loading section .gnu.linkonce.t._cleanup_impl, size 0x2 lma 0x1043e
Loading section .rodata, size 0x4 lma 0x10440
Loading section .cp.const4, size 0x14 lma 0x10444
Loading section .ctors, size 0xc lma 0x10458
Loading section .dtors, size 0xc lma 0x10464
Loading section .dp.data, size 0x44 lma 0x10470
Loading section .eh_frame, size 0x4 lma 0x104b4
Start address 0x10000, load size 1208
Transfer rate: 5 KB/sec, 100 bytes/write.
Loading section .text, size 0x27c lma 0x10000
Loading section .init, size 0x5c lma 0x1027c
Loading section .fini, size 0x3a lma 0x102d8
Loading section .globcode, size 0x18 lma 0x10312
Loading section .gnu.linkonce.t.__call_exitprocs_impl, size 0x2 lma 0x1032a
Loading section .gnu.linkonce.t._cleanup_impl, size 0x2 lma 0x1032c
Loading section .rodata, size 0x4 lma 0x10330
Loading section .cp.const4, size 0xc lma 0x10334
Loading section .ctors, size 0x4 lma 0x10340
Loading section .dtors, size 0x4 lma 0x10344
Loading section .dp.data, size 0x18 lma 0x10348
Loading section .eh_frame, size 0x4 lma 0x10360
Start address 0x10000, load size 866
Transfer rate: 4 KB/sec, 72 bytes/write.
Binary not correctly downloaded to target device
Even when I start the unmodified "XC1A-Concurrent-LED-Project" from the tutorials I get the error message.
The programs run on the simulator without problems.
As soon as every parallel execution is removed from the code the programs run fine on the device.

Using the "par" statement and running all on stdcoe[0] (not using any other core) does not work either.

I have reduced the jtagspeed without success.
When I modify the processorMhz and/or the SystemFrequency in the xn file, the file would not load any more (with the error message "No such file or directory." even if the file is there).

Any suggestions?

Best regards
kfx
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Are you using a XC-1A dev board?
In that case do you hold a button while connecting the board to your computer/power supply?
kfx
New User
Posts: 2
Joined: Mon Jan 09, 2012 11:33 am

Post by kfx »

Hello,

I use a XC-1, not the XC-1A, but pressing the button helped. The Program now runs fine.
As the button activates the programming mode, shouldn't the device reject to load the single core program, when not in programming mode? However, thank you very much for helping me out.

Best regards
kfx