cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
375 Views
Registered: ‎10-08-2018

Running System Generator 2019.1 in MATLAB 2019a from Command Line

Hi,

I would like to open System Generator 2019.1 from the command line and pass in a string to be executed in MATLAB.

I am using MATLAB 2019a. 

Before, this was possible by doing:

sysgen -r "disp('test string')"

 

However, now I am greeted with a warning and disp() is not executed: 

Warning: Command line argument -r cannot be combined with subsequent -r argument.

 

sysgen -batch "disp('test string')"         also does not work, giving:

Command line argument -r cannot be combined with subsequent -batch argument.
ERROR: MATLAB error Exit Status: 0x00000001

 

I believe this problem is because of something which has changed in MATLAB from 2019a. Also, I would like to leave sysgen.bat as is.

 

Has anyone managed to achieve this in 2019a or does anyone have a solution? 


Many thanks,

Lewis. 

2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
212 Views
Registered: ‎12-14-2017

Re: Running System Generator 2019.1 in MATLAB 2019a from Command Line

Hi,

It seems like Mathworks has changed start up options behavior from R2019a and Sysgen is not inline with those options, it will be a bug in sysgen because if which the following is not working

sysgen -r "disp('test string')"

 

-batch option is used for non interactive runs, can you try the following and see

sysgen -nodesktop -batch "disp('test string')"

 

Regards,

Raju A.

Highlighted
188 Views
Registered: ‎10-08-2018

Re: Running System Generator 2019.1 in MATLAB 2019a from Command Line

Hi Raju,

Thanks for getting back to me.

I tried the line you sent and received:
Command line argument -r cannot be combined with subsequent -batch argument.
ERROR: MATLAB error Exit Status: 0x00000001

I agree with your assessment that Mathworks have changed the startup behavior from 2019a. This makes line 480 in sysgen.bat incompatible with further uses of -r or -batch.

Editing this file to accept more arguments works well for an individual user, however it is not ideal if you would like for scripts you write to be used by other people.

Kind regards,
Lewis.