Hi
I enabled profiling (gcov) in for my embedded code using GCC flags
-fprofile-arcs -ftest-coverage
. In order to route the coverage data I have implemented wrappers of newlib _open, _read, _write etc. The problem is that the
gcov_exit()
function causes HardFault. Even before calling _open for opening output file. On debugging I can see that it happens at different instructions. I have tried putting breaking points at
MemManage_Handler BusFault_Handler BusFault_Handler
But only HardFault_Handler is called.
Other thing that I suspect is that gcov is not thread safe. Although my application does not uses threads but perhaps there is a data corruption due to threads in RTX. Is there any option to run RTX as single thread?
Does RTX community know of any gotchas in RTX+gcov and workarounds to get gcov working. Any such knowledge will be much appreciated.
Thanks Azim