(xsim) error C59076

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
MarcAntigny
Active Member
Posts: 61
Joined: Tue Feb 13, 2018 2:50 pm

(xsim) error C59076

Post by MarcAntigny »

Hi all,
I'm trying to simulate my xC program in xTimeComposer with a plugin. The plugin was compiled from the plugin example (in Program Files (x86)\XMOS\xTIMEcomposer\Community_14.3.2\src\plugins\ExamplePlugin) with the nmake instruction as explained in the readme (using Visual Studio Command Prompt). I'm running Windows 10 so it created a .dll file which I added to the simulator with the simulation tool (Run Configurations>Simulator>External).
However, when I run the program, it says that it didn't find the file.
xsim: error: C59076: problem loading file: : Could not open input file
Did I forget a step in the setup ?
I didn't added argument for the plugin because it seems there were no need (maybe that's the point ?).

Thanks for your replies,

marc


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

MarcAntigny
Active Member
Posts: 61
Joined: Tue Feb 13, 2018 2:50 pm

Post by MarcAntigny »

Yes, I found it too. I tried with the xTimeComposer tool and then with the command line with the same error.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Please post the full details of your command line usage with passed parameters. Also compare the details from the following thread:

https://new.xcore.com/viewtopic.php?f=26&t=3368
MarcAntigny
Active Member
Posts: 61
Joined: Tue Feb 13, 2018 2:50 pm

Post by MarcAntigny »

Here was my command line (.xe and .dll were in the current directory)
xsim --plugin ExamplePlugin.dll Plugin_using.xe
At last, I found that because I didn't pass arguments for the plugins, the command line wasn't complete so xsim could not launch Plugin_using.xe.
So modified it with the args of the answer of /Igor inthe topic :
xsim --plugin ExamplePlugin.dll "0 X0D00 0 X0D01" Plugin_using.xe
And now it works fine..
However even I understand that "0 X0D00 0 X0D01" are the args for the simulation, I have no idea of what it represents (connecting pins ? Ports ?). It didn't find any information except that it is similar to pin names (but for the alone 0 ?).
Thanks Mon for your replies, at least it works.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

See chapter 22 of the xtimecomposer user guide for more details on xsim:

https://www.xmos.com/published/tools-user-guide
xsim --plugin ExamplePlugin.dll "0 X0D00 0 X0D01" Plugin_using.xe
Believe that

0 denotes Tile[0] for the port pin to follow
X0D00 (on Tile[0]) is the port pin for SDA
0 denotes Tile[0] for the port pin to follow
X0D01 (on Tile[0]) is the port pin for SCL

so for example,
xsim --plugin ExamplePlugin.dll "2 X0D00 2 X0D01" Plugin_using.xe
2 denotes Tile[2] for the port pin to follow
X0D00 (on Tile[2]) is the port pin for SDA
2 denotes Tile[2] for the port pin to follow
X0D01 (on Tile[2]) is the port pin for SCL

or
xsim --plugin ExamplePlugin.dll "1 X0D00 2 X0D01" Plugin_using.xe
1 denotes Tile[1] for the port pin to follow
X0D00 (on Tile[1]) is the port pin for SDA
2 denotes Tile[2] for the port pin to follow
X0D01 (on Tile[2]) is the port pin for SCL


these conclusions are from the first code post in the referenced thread:

Code: Select all

  // Stores pin information
  s_instances[s_num_instances].package = argv[0];
  s_instances[s_num_instances].sda = argv[1];
  s_instances[s_num_instances].scl = argv[2];
MarcAntigny
Active Member
Posts: 61
Joined: Tue Feb 13, 2018 2:50 pm

Post by MarcAntigny »

I think you are right. I missed those lines :

Code: Select all

  // Stores pin information
  s_instances[s_num_instances].package = argv[0];
  s_instances[s_num_instances].sda = argv[1];
  s_instances[s_num_instances].scl = argv[2];
So the basic format for using plugin with xsim is :
xsim --plugin [dllFile] pluginArgs [binaryFile]
where pluginArgs is "[FirstTileUsed] [PinUsedOnFirstTile] [SecondTileUsed] [PinUsedOnSecondTile]..."

I now can work on the plugin itself. Thanks again Mon
Post Reply