We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎09-27-2013

petalinux 2017.4 c++ system call not working

I am trying to execute some command line commands from my embedded C code. It looks like the two main ways I have found to do this via Googling around is with the "system" function, as well as the popen/fgets function.


However, neither of these methods are working. It seems to never return from the system function or the fgets function. In addition, it appears the program data is corrupt and afterwards I cannot restart my debugger process without doing a hard reset.


Any ideas or work arounds?



0 Kudos
1 Reply
Registered: ‎04-20-2017

Re: petalinux 2017.4 c++ system call not working

that seems strange, i am using both call methots in 2017.4 without problems.


if you work with sdk...by default in the debug option "attach to children" and "halt at main" is enabled


so when you debug and you call system, you should see a second prcess "sh" come up in the sdk debug window. select it and press the play button to run it.


alternativly disable both mentioned options


please accept solution if it works