Ozone debugger - loading multiple ELF files

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

  • Ozone debugger - loading multiple ELF files

    Ozone is generally working very well. However I'm seeing a problem with loading two ELF images into the flash of a Kinetis device. The bootloader resides at 0x0 and the main application at 0x1000. The bootloader ELF loads fine, but Ozone appears to have issues loading the second image. Because Ozone debugging crashes I can't figure out exactly what's wrong. If I load the main image as a binary and specify 0x1000 as the base address, then everything is fine.

    When it crashes, I see this on the console window.


    "Elf.GetBaseAddr();

    Initializing PC and SP.

    Target.ReadU32 (00000000);

    Target.SetReg ("SP", 0x464C457F);

    Target.ReadU32 (00000004);

    Target.SetReg ("PC", 0x10101);"



    It appears that the ELF file is being loaded into flash directly as a binary image, since the SP is loaded with "_ELF"!


    When I reset and reconnect to the target, the entire flash memory (including bootloader) is erased.


    Any ideas on what might cause Ozone to do this?






  • Hi,

    Can you provide your Ozone project file and any commands you entered manually,
    so we can check what might go wrong here?

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

    Another developer at our company figured out what was going wrong and sent through a test file to your email support.

    He determined that Ozone is in-fact attempting to program the ELF header into flash. If the ELF image base address is 0x0000, then there are no issues because the ELF header is [presumably] 'programmed' into the area below 0xffffffff. In my case the second image starts at 0x1000, so the ELF header overwrites my bootloader. Worse still, the Kinetis has a Flash configuration region at 0x400 which, when scrambled with ELF header info, makes the part unusable until a mass erase sequence is performed.

    For anyone else dealing with this issue, a work-around is to allocate an unused area of flash between the bootloader and the second ELF image so that that Ozone does not over-write anything important when it programs the ELF header.

    - JAG
  • Hi,

    The issue has been resolved with the last update V2.20i, which has been released yesterday.

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