Showing results for 
Search instead for 
Did you mean: 
Registered: ‎07-03-2019

gprof use causes unnavigable error

Hey all,

I'm trying to use the gprof integrations on a standalone project for a Zynq 7000 SOC to test out some libraries and I can't get anything to launch. I'm only getting a mysterious 'can't read "rc": no such variable' error which doesn't seem to have a distinct cause. I know that it's not the project itself as it runs properly even with the profiling framework turned on, so we're a bit stumped.

I've already identified and corrected an issue which caused a unhandled abort due to attempting to read from the OCM at 0x00000000 by including '-fno-delete-null-pointer-checks' to get rid of a latent 'UDF #0' assembly instruction which only affected:

(profile_cg.c, 157) p->state = GMON_PROF_ON;

This got rid of an unhandled abort and allowed the framework to run normally, but still no dice on getting it to work.

Here's all of my configuration which was changed:

SDK Version: 2018.3

BSP Settings: 

standalone/enable_sw_intrusive_profiling: true

drivers/ps7_cortexa9_0/extra_compiler_flags: -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -g -Wall -Wextra -pg -fno-delete-null-pointer-checks

Project Settings:

Dialect: C++17

C/C++ Build/Settings/ARM v7 g++ compiler/Profiling/Enable Profiling (-pg): true

Run Settings:

System Debugger/Target Setup/Reset Entire System

System Debugger/Target Setup/Program FPGA

System Debugger/Target Setup/Run ps7_init

System Debugger/Target Setup/Run ps7_post_config

Application/Advanced Options/Enable Profiling (gprof): true

Application/Advanced Options/Sampling Frequency: 10000 (Default)

Application/Advanced Options/Scratch Memory Address: 0x0 (Default)

As far as I can tell, this error is agnostic to changes in the project, running just a default project, and completely resetting the workplace and creating everything over again from scratch. It also doesn't seem to matter what values are put in for the sampling frequency and scratch memory address as any value.

Any attempt at running a configutaition with the 'enable profiling' set to true also has the unfortunate side effect of preventing any other debug or runs from occurring until the SDK is restarted; throwing the same 'can't read "rc": no such variable' error reguardless of if it has profiling enabled.

On a side note, me and my team have run into a couple of errors which we can only chock up to being issues with the SDK itself. Is there a dedicated place that we should be reporting this or is the community forums good enough?



Tags (4)
0 Kudos