[SOLVED] Debugging IAR built code execution in RAM - stepping on C code impossible

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

  • [SOLVED] Debugging IAR built code execution in RAM - stepping on C code impossible


    I'm trying to debug code linked in RAM. The code was built with IAR compiler.
    The code generally works as intennded, but debugging is problematic, because only disassembly view is available for RAM linked code.
    The parts of code being linked in flash on the other hand shows C file content in editor.
    Also function names in call stack, are visible for functions in flash. only

    Example of the sections placed in linker script (only one of many code sections in RAM shown as example):

    define symbol _RAMCODE_START = 0x08002800;
    define symbol _RAMCODE_END = 0x080127FF;
    define region RAMCODE = mem:[from _RAMCODE_START to _RAMCODE_END]; /* 64 KiB */

    define root section RamCodeCanSection_START_SEC
    public _RamCodeCanSection_START:

    define root section RamCodeCanSection_LIMIT_SEC with alignment = 4
    public _RamCodeCanSection_LIMIT:

    define block RamCodeCanSection with fixed order, alignment = 4
    section RamCodeCanSection_START_SEC,
    block RamCodeCanSection_BLOCK { section .RamCodeCanSection },
    section RamCodeCanSection_LIMIT_SEC

    "RAMCODE__RamCodeCanSection": place in RAMCODE
    block RamCodeCanSection

    On the code stack I can see only the RAM addresses, no information about function names.
    Source files are visible in source file list, so definitely paths in elf are correct and code can be opened in editor with double click.

    The image is linked using --debug option so symbolic debugging information should be available.
    I'm pretty sure that I was able to debug similar code (with parts linked in RAM) built using GCC compiler. The debugging would work seamlessly.

    Ozone version used is 3.10j. The core is Cortex M4F.
    Could you give me some piece of advise, on what could be checked?


    The post was edited 2 times, last by Renegad ().

  • Hello Jacek,

    We received your inquiry via our support system in parallel.
    This thread will thus be closed now to avoid duplicate or lost information between the channels.
    For future inquiries please make sure to only use one channel.

    Best regards,
    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.