Is there anyone who tries to do code coverage in Automation studio project? I am working on it and at compilation time the .gcno are generated, but on runtime on target system no .gcda data is generated. I am using GCC 6.3.0 with --coverage
flags for C/C++ programs. Does anyone have similar case? Or maybe somebody know how to take the gcda data from target memory?
Asked
Active
Viewed 136 times
2
-
What is your development system, and what is your target system? Does your target system even have a file system? If so, how do you transfer files between this and your development system? – the busybee Apr 15 '20 at 09:18
-
My development system is Automation Studio, target system is PLC. Yes the PLC have file system. I can access PLC also with FTP client, or TCPIP,... – mbvr46 Apr 15 '20 at 10:09
-
and i figured out that libgcov.a from Automation studio gcc is only 13kB size (original gcc libgcov.a is 329kB). This could be the issue, if libgcov.a is not properly implemented. Any idea? – mbvr46 Apr 15 '20 at 10:48
-
Well, it looks as if this little library has just stubs for its functions. You can go ahead and try to compile the full library for your target system yourself, after all GCC is open source. *(Take this, propriatery software!)* However, this could be a bigger task, depending how far you come, and what needs to be adjusted. -- I once wrote my own gcov library for a GCC 3.3, what was not that difficult because of its simple API. But the more modern GCC have changed a lot. – the busybee Apr 15 '20 at 10:54
-
Thanks for comment. But i have no source files of gcc version used in automation studio. So i am not able to compile again whole gcc. Do you have any other idea how to do that? – mbvr46 May 11 '20 at 08:35
-
Ask the provider about the sources or a URL to them. Since GCC is GNU software, they have to provide the sources, AFAIK. – the busybee May 11 '20 at 10:13