Cannot get embedded profiler working

Sysprogs forums Forums VisualGDB Cannot get embedded profiler working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31044
    curtis.hendrix
    Participant

    I’m trying to get the profiler working on a PAC5532 (Cortex M4F).  I followed the instructions here: https://visualgdb.com/tutorials/profiler/embedded/instrumentation/  It looks pretty straight forward.

    I enabled the Fast Semihosting and Embedded Profiler in the VisualGDB project settings and added a call to InitializeInstrumentingProfiler() in the startup code.

    But when I try to run the profiler (Analyze->Analyze Performance with VisualGDB), I get a popup saying the project is missing the embedded profiler.  If I click no to dismiss the message, the firmware is flashed and then a error pops up saying “The debugged program does not contain the sampling profiler”.

    I’ve attached the .map file, which shows it has the profiler in it.

    The project I’m trying to debug uses a bootloader.  Could that be part of the problem?  I have the debug steps to flash the bootloader and everything else the application needs (crc, lengths, etc) before trying to debug the application.

    Attachments:
    You must be logged in to view attached files.
    #31047
    curtis.hendrix
    Participant

    I partially figured out the issue.  I needed to select “Instrument functions to record their time” in the “New Profiling Session”.

    Now I have a new problem.  I can’t profile the application with the bootloader in place.  The bootloader calculates a CRC32 over the entire application image and compares it with a pre-calculated CRC32.  The pre-calculated CRC is generated during the build process and is automatically flashed to the target hardware before the application runs.

    It appears the profiler is changing the firmware after the build process, so the CRCs don’t match and the bootloader does not launch the application.

    #31054
    support
    Keymaster

    Hi,

    Sorry, this is by design. Instrumenting the image for profiling indeed changes its contents based on the exact instrumentation settings selected for a particular debugging session. As a workaround, please consider modifying the bootloader to temporarily suspend CRC checks during debug sessions (you can check whether a debugger is attached to an ARM chip via the debug module registers – see the your device documentation for more details).

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