AN00141 "xrun: Invalid executable file passed" for xCORE-XA Core Module

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
aclassifier
Respected Member
Posts: 360
Joined: Wed Apr 25, 2012 8:52 pm

AN00141 "xrun: Invalid executable file passed" for xCORE-XA Core Module

Postby aclassifier » Tue May 26, 2020 10:22 am

Summary: I am testing the AN00141 [1] and am not able to run the ARM binary. Not that I need to for my project, I would only need to trick xflash not to beg for any ARM binary. But I guess, I'd like both! So I run the whole story:

The background is [2] (I have two xCORE-XA Core Module boards that I found some use for). I am also aware that the processor and the board have been obsoleted and that support is to be removed from xTIMEcomposer.

I run 14.4.1 I get this "xrun: Invalid executable file passed" when I do Run As | ARM Application. I have tested with 14.3.3 but cannot really see any difference in behaviour (even if the 14.3.3. build log does not include the Rebuild lines.)

The build goes like this:

Code: Select all

09:50:57 **** Build of configuration Default for project AN00141 ****
xmake CONFIG=Default all 
Checking build modules
No build modules used.
Building xCORE binary
Rebuild .build/_iflag.rsp
Analyzing AN00141.xc
Rebuild .build/_pca.rsp
Propagating analysis
Creating dependencies for AN00141.xc
Compiling AN00141.xc
Rebuild .build/_obj.rsp
Creating AN00141.xe
Constraint check for tile[0]:
  Cores available:            8,   used:          1 .  OKAY
  Timers available:          10,   used:          1 .  OKAY
  Chanends available:        32,   used:          0 .  OKAY
  Memory available:       65536,   used:       1660 .  OKAY
    (Stack: 340, Code: 1212, Data: 108)
Constraints checks PASSED.
Building ARM binary
Warning: Support for xCORE-XA is to be removed from the next major version of xTIMEcomposer
Rebuild .build__arm/_iflag.rsp
Creating dependencies for AN00141.c
Compiling AN00141.c
Creating AN00141
Build Complete

09:50:58 Build Finished (took 1s.307ms)
I have attached the whole project as a zip.

Analyse Binary gives me:

Code: Select all

An internal error occurred during: "Load /Users/teig/workspace/AN00141/bin/AN00141 Into Binary Analyser".
java.lang.NullPointerException
If I try xflash I get:

Code: Select all

bash-3.2$ xflash /Users/teig/workspace/AN00141/bin/AN00141.xe --arm-binary /Users/teig/workspace/AN00141/bin/AN00141 
Error: F03139 xCORE image is too big for the ARM flash partition
The XCORE code is fine. This blinks the LED on the XCORE-XA Core Module:

Code: Select all

xrun /Users/teig/workspace/AN00141/bin/AN00141.xe
This also works if I just do Debug from the IDE on the .xe file.

But if I test for the ARM I get:

Code: Select all

bash-3.2$ xrun /Users/teig/workspace/AN00141/bin/AN00141
xrun: Invalid executable file passed
I am not going to use the ARM core. I have another project with just TARGET = XCORE-XA-MODULE which debugs and runs ok, but if I try to xflash that code it asks for an ARM binary:

Code: Select all

bash-3.2$ xflash /Users/teig/workspace/_kode24_xcore200_1q2020/bin/_kode24_xcore200_1q2020.xe 
Error: F03122 No Arm Binary supplied, please use option --arm-binary

So if there is any way to trick xflash not to ask for the ARM binary this, it's all I need (even if the toolset (seems to) build the binary as faulty(?))


[1] xCORE-XA - Application Development
[2] Missing xCORE XA Module Board Hardware Manual circuit diagram
You do not have the required permissions to view the files attached to this post.
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
aclassifier
Respected Member
Posts: 360
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Tue May 26, 2020 7:58 pm

In case this is a driver issue and not a tool issue:

I see that in [3] page 239 "35.3 Additional software requirements" that it says that the SEGGER tool must be installed. But this is written five years ago:
The ARM support within xTIMEcomposer has been developed using the SEGGER J-Link series of development adapters. In order for the runtime and debugging tools provided to connect to hardware you need to install the SEGGER GDB J-Link support tools. This will provide the SEGGER developed GDB server functionality that allows connection to the xCORE-XA based hardware device from the development tools.
This additional software is available to download and install from:
http://www.segger.com/jlink-software.html
Going there, there are lots of options for debug, but I assume it's " J-Link GDB Server RTOS plug-in SDK".

The "GDBServer_RTOSPlugin_SDK_V110.zip" is protected with emSecure, which seems to be a Windows application. I use macOS.

I am lost. Is this needed when I am not debugging, just downloading the ARM binary?

[3] xTIMEcomposer User Guide (14.0.x) (2015/10/29)
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
aclassifier
Respected Member
Posts: 360
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Wed May 27, 2020 12:25 pm

I did receive the "GDBServer_RTOSPlugin_SDK_V110.zip" from SEGGER. But that seems like a project to build. I have asked for a runnable file for macOS. IS THIS CORRECT?

If I try to debug (the project, or just the ARM binary), I get this, which to me looks like like there certainly is some driver that's not responding:

Code: Select all

Error: Command: target remote localhost:2331 failed
localhost:2331: Operation timed out.
localhost:2331: Operation timed out.
localhost:2331: Operation timed out.
If I just after this try to debug a project with no ARM code at all it runs just fine:

Code: Select all

.gdbinit: No such file or directory.
connect --adapter-id 37nry56I
0x00010000 in _start ()
load
Loading section .text, size 0x186 lma 0x10000
...
If I select the BOOT MODE JUMPERS both to ARM I get no change in the behaviour listed above. However, then both LEDS blink since the ARM code that comes default with the board does this. ARM=blinks inner LED and XCORE = booted from ARM and blinks outer LED.
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
aclassifier
Respected Member
Posts: 360
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Tue Jun 02, 2020 3:08 pm

I have still not got this one solved.

ANYBODY OUT THERE RUNNING AN xCORE-XA MODULE BOARD?

I think the problem is one of the following:
  1. Wrong build of binary file for ARM
  2. XFLASH has problems reading that binary file (14.4.1, but also 14.3.3). I'd think not...
  3. XFLASH sees no JLinkGDBServer so that it refuses to download because of this
  4. If this is the problem, how do I install JLinkGDBServer so that ./JLinkGDBServer -if SWD makes sense
I now have a note discussing all of this, see [1]. I have also raised a question on the SEGGER forum [2].

If I don't get this solved by some time I would probably raise a new thread here, to kind of, start afresh.

[1] My processor to analogue audio equaliser notes
[2] Missing JLinkGDBServer for obsoleted XMOS board also containing an ARM core
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
aclassifier
Respected Member
Posts: 360
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Sat Jun 20, 2020 1:52 pm

I did start a new thread.

See xCORE-XA with ARM core (not) flashable?
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/

Who is online

Users browsing this forum: No registered users and 2 guests