[SOLVED] Missing RAM functions from Execution Profile

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Missing RAM functions from Execution Profile

    Hi,

    I am debugging an externally built executable in Embedded Studio, my setup is NXP MIMXRT1060-EVK board + JLink.

    My main purpose is to profile my application, and I found Embedded Studio very good for that.
    it is the only tool I found so far to find hotspots with SWO PC Sampling, since it shows hit counts at instruction level.

    There is a major problem however,
    in the Execution Profile I can only see functions and instructions in flash.
    The code I mostly need to profile is running from SDRAM, at address 0x80000000-0x82000000.

    The Execution Trace view seems to collect RAM PC Samples, it shows addresses and correct symbols,
    but this data seems to be filtered away in the Execution Profile view.

    Am I missing some configuration? Any help would really be appreciated

    Thanks

    The post was edited 1 time, last by ballotz ().

  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Could you provide an example project for reproduction?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    attached you can find the MCUXpresso project used to build the test application and the ES project used.
    I added a couple screen shots of Instruction Trace and Execution Profile taken with the project provided.

    Many thanks,
    Alessio
    Images
    • EP.PNG

      20.98 kB, 804×323, viewed 471 times
    • ET.PNG

      15.57 kB, 819×234, viewed 467 times
    Files
  • Hello,

    I gave the project a try on a generic MIMXRT1060-EVK board with the QSPI Flash selected.
    However the application would not download properly with Embedded Studio.
    Is there anything I have to consider here for the reproduction project?
    How was your eval board set up exactly?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    just in case, I re-tryied the provided project, it downloads correctly and runs as I remember it did.

    The board setup should be the default MIMXRT1060-EVK setup, with QSPI Flash.
    I took a picture so you can check jumpers and switches.
    I connected the JLink through J21, the full 20 pins connector.

    The ES version I'm using is Release 4.50 / Build 2020021311.41397 ad it uses J-Link 6.62b

    I gave a try to the new Ozone 3.20b (uses a different JLink version) and it fails downloading the program.

    With my company we encountered troubles with newer Ozone/JLink versions and RT106x processors,
    leading to a bad state of the flash. I don't know if could be the case, I mentioned it just in case,
    I am going to open a thread about it soon.

    Thanks for the support.
    Alessio
    Images
    • IMG_0993_low.jpg

      879.52 kB, 1,632×1,224, viewed 412 times
  • Hi Alessio,

    Ok I was able to Flash the application now.
    However it gets stuck in the ROM bootloader at 0x00200000 for me.
    I have the same jumper settings like on your board.

    Anything else that might need to be considered?
    If you do a erase of the external e.g. with J-Flash or J-Link Commander and then try to Flash the application you have attached. Does it run for you as expected?

    Regarding the profiling of RAM data via SWO, it is currently not fully supported but we are looking into it.

    Regarding the Ozone issue. Did you make sure your setup lets the ROM bootloader run through?
    Per default Ozone will try to launch the application from the elf base address and not the target specific boot address.
    For more information see here:
    wiki.segger.com/Debug_on_a_Tar…Bootloader#ROM_bootloader

    If I do this Ozone behaves just like Embedded Studio.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello,

    SEGGER - Nino wrote:

    Anything else that might need to be considered?
    I think no, if you try ES 4.50 / Build 2020021311.41397 / J-Link 6.62b does it work?

    SEGGER - Nino wrote:

    If you do a erase of the external e.g. with J-Flash or J-Link Commander and then try to Flash the application you have attached. Does it run for you as expected?
    I tried the following steps:

    - J-Flash 6.62b -> Erase Chip (done successfully) -> Disconnect
    - Open ES project with ES 4.5 -> F5 (download ok)
    ES asks me for the folder location of hello_world.cpp and and then stops at main
    - Quit ES
    then

    - J-Flash 6.62b -> Erase Chip (done successfully) -> Disconnect
    I created an Ozone project, leaving AfterTargetDownload() and AfterTargetReset() empty (but not commented out)
    - Ozone 3.10e -> open project -> F5 (download ok)
    Ozone reported an error

    Timeout while restoring target, core does not stop. (PC = 0x20000010, XPSR = 0x01000000, SP = 0x81DFFFD8)!
    Can not read register 15 (R15) while CPU is runningCan not read register 7 (R7) while CPU is runningCan not read register 6 (R6) while CPU is runningCan not read register 5 (R5) while CPU is runningCan not read register 4 (R4) while CPU is runningCan not read register 3 (R3) while CPU is runningCan not read register 2 (R2) while CPU is runningCan not read register 1 (R1) while CPU is runningCan not read register 0 (R0) while CPU is runningCan not read register 15 (R15) while CPU is runningPC of target system has unexpected value after preparing target. (PC = 0x00000000)!
    ---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------
    PC = 00000000
    Current: R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
    R4 = 00000000, R5 = 00000000, R6 = 00000
    Download failed: error during verification phase

    - then pressed F5 again and this time it stopped at main as expected, stop
    - J-Flash 6.62b -> Erase Chip (done successfully) -> Disconnect
    - Ozone 3.10e -> open project -> F5
    this time it stopped at main without errors the first time

    then I tried with Ozone 3.20b (same project)
    - J-Flash 6.62b -> Erase Chip (done successfully) -> Disconnect
    - Ozone 3.20b -> open project -> F5
    it failed with the following messages:

    Debugger tries to read unknown register with index 88 (0x00000058)
    Debugger tries to read unknown register with index 89 (0x00000059)
    Debugger tries to read unknown register with index 90 (0x0000005A)
    Programming failed @ address 0x60000024 (block verification error)
    Download failed: error during program/erase phase
    Debugger tries to read unknown register with index 88 (0x00000058)
    Debugger tries to read unknown register with index 89 (0x00000059)
    Debugger tries to read unknown register with index 90 (0x0000005A)

    - disassembly window halted at 0x002020B4, stop
    - then pressed F5 again, same error messages


    SEGGER - Nino wrote:

    Regarding the profiling of RAM data via SWO, it is currently not fully supported but we are looking into it.
    Ok, any idea about when there will be full support?

    many thanks,
    Alessio
  • Hello Alessio,

    The unknown register error message is an old Ozone issue and is already fixed in the latest Ozone version.
    Could you update to the latest Ozone and J-Link software version to make sure you do not see any issues appearing that are already fixed?


    ballotz wrote:

    Ok, any idea about when there will be full support?
    It is in our feature tracking system but currently we can't name a fixed timeschedule.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    the "Debugger tries to read unknown register" message is showing in Ozone 3.20b (latest) console.

    I installed JLink 6.80e, updating Ozone 3.20b dll.
    The "Debugger tries to read unknown register" still appears but apart from this,
    everythig now seems to work. The program starts and halt at main().

    Let me know if you succede in running the test project.

    Thank you,
    Alessio
  • Hi Allessio,

    Good to hear that debugging works now for you.
    The unknown register value comes form a faulty svd file that came with older Ozone versions. Make sure to edit your .jdebug file accordingly to use the svd file from V3.20b as well.
    To make this independent of the Ozone version you can use the following line:
    Project.AddSvdFile ("$(InstallDir)/Config/CPU/Cortex-M7F.svd");


    ballotz wrote:

    Let me know if you succede in running the test project.
    No need for that as there are no issues remaining. Regarding the SWO RAMfuncs as said this will be added in future.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.