[ABANDONED] Debugging Position Independent Code

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

  • [ABANDONED] Debugging Position Independent Code

    Hello Everyone,

    I'm trying to debug a bare-metal Cortex A5, an Atmel SAMA5D27 to be precise, with a J-Link Pro. The program code, built with ARM Clang, is running from DDR and debugs (from DDR) just fine.

    The problem that I have relates a small portion of Position Independent Code that is on-demand relocated from the DDR to IRAM1. The relocated code tests the DDR so cannot run from it.

    The linking, sections, L2 Cache disable, stack relocation, code relocation is working and I can jump into the Position Independent code in the IRAM.

    The problems that I have is that Ozone doesn't know where the source code is and I don't know how to inform it about the relocation.

    Currently I'm debugging via assembler, which is not so efficient!

    Regards,

    Mark.
  • Hi Mark,

    Thank you for your inquiry.
    Are you really using position independent code here, or are these RAMCode routines that are copied during startup?
    If the latter the information where the code is in IRAM1 should be in the elf file.
    Could you provide the elf file you are using for this for reference?

    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.