07-18-2019 08:00 AM - edited 07-22-2019 01:02 AM
Hello,
I am developping several standalone applications on both CPU of a Zynq-7020 (Zedboard) that could received arguments.
How can arguments can be given to both executables ?
If impossible, how can parameters can be givend to execubables for standalone application ?
Regards,
Cyril
07-22-2019 06:57 AM
Hi Cyril (@cenault),
System debugger supports cmdline args only for Linux applications.
07-22-2019 02:37 AM
Hi @cenault,
Could you please give more details about your use case?
07-22-2019 05:36 AM - edited 07-22-2019 05:45 AM
Hello,
Thanks for your repy.
My use case is some baremetal applications running each one on one CPU of Zynq-7020 using each one an instance of hardware IP from PL.
These are test applications for which I would like to pass some arguments (test kind, size of buffer, IP ID to use... ).
I may have two implementation of the IP with 2 differents drivers and I would like to select IP version (and even more IP ID if several IP of same kind implemented). Test initialization is quite similar and I would like not ti duplicate the same code.
I would like to run :
Application on CPU0: <CPU0Appl.elf> <arguments list for CPU0 application>
<arguments list for CPU0 application>: to be retrieve as argv arguments for main
Application on CPU1: <CPU1Appl.elf> <arguments list for CPU1 application>
<arguments list for CPU1 application>: to be retrieve as argv arguments for main
Regards,
Cyril
07-22-2019 06:01 AM
Hi Cyril (@cenault),
Passing parameters to a bare metal application from the beginning does not make much sense as you don't have a way to pass them (i.e. a terminal).
So, if your goal is just to not duplicate code, you can use preprocessor macros/directives and define their value before compilation.
If you don't like to set these values during compilation and you prefer to to pass them during runtime, then the only remaining options are to either implement a kind of command prompt on your code or to run your application using the debugger and modify the values of your variable before continuing execution.
07-22-2019 06:05 AM
Thanks for the reply,
I am using 2017.3. In "Run configuration", there is tab "(x)= Arguments", so I wanted to use it...
Regards,
07-22-2019 06:57 AM
Hi Cyril (@cenault),
System debugger supports cmdline args only for Linux applications.
07-22-2019 07:09 AM
Ok,
Thanks for your response
07-22-2019 07:11 AM
You are welcome!