FreeRTOS tracing in lib project

Sysprogs forums Forums VisualGDB FreeRTOS tracing in lib project

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29870
    dabramson
    Participant

    I’m trying to use the real-time watch to look at my freeRTOS task timings. My situation doesn’t exactly follow that described in the tutorial at https://visualgdb.com/tutorials/profiler/realtime/freertos/. I have a main project that compiles to the .bin. It calls 1 function in main(), that function is defined in a lib project. In fact there are 3 libs in my solution, a BSP layer (where all STM32 and FreeRTOS is built), and two “device logic” libs. The main calls a function in the upper device logic lib which calls a function in the BSP that calls HAL_Init, SystemClock_Config, etc. All freeRTOS tasks are defined and started within the device layers.

    I’ve managed to add the profiling framework into the BSP lib, I’ve changed the profiling timer to one that my code doesn’t use, but I can’t get the program to start and allow me to do real-time watch. If I don’t add the framework to the main application (via dynamic analysis in vgdb settings) the real-watch window says its “not enabled in this session” and “You can enable it via VisualGDB Project Properties->Dynamic Analysis page.” So I did that. But then when I start up I get this….

    VisualGDB version: 5.5.104.3920
    ------------------ System.Exception ------------------
    System.Exception: Could not find the following symbol in MidasMCBApplication:
    _ZN29SysprogsInstrumentingProfiler22ReportFramesToProfilerEPKNS_17InstrumentedFrameEy
    
    Please ensure that your project contains the embedded profiler framework and that you call the InitializeInstrumentingProfiler() function
    at qf.n(String c, String a, o f, String e, e b, m d)
    at ye..ctor(String a, NonInstrumentableFunctionCollection c, EmbeddedDynamicAnalysisSettings b, String d, cx1 e, o i, i h, EmbeddedRTOSProfile f, Dictionary`2 g)
    at f22.m1(Boolean a)
    at f22.z_2(DebugCustomizationSettings a, Boolean b)
    at nd1.t2()
    at df1.i1_2()
    at VisualGDB.GDBDebugEngine.s(gi a, n1 b)
    trace=[qf.n:546, ye..ctor:1477, f22.m1:2260, f22.z_2:24, nd1.t2:9985, df1.i1_2:22, VisualGDB.GDBDebugEngine.s:58]

    I don’t “include and call” in the main function because I do it in the function defined in my lib project that does SystemClock_Config.

    I really hope there is a way that I can use real-time watch having to change the organization of my code.

    #29871
    dabramson
    Participant

    I finally got this working by calling InitializeInstrumentingProfiler (as directed by the error message), I was calling InitializeSamplingProfiler.

     

    #29872
    support
    Keymaster

    Good to know it works. BTW, if you are not using the new Advanced CMake Embedded Project Subsystem, we advise giving it a try. It considerably simplifies the workflow with multiple libraries shared between various executables.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.