Bug found in File.Open() based on wiki code

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

    • Bug found in File.Open() based on wiki code

      Relevant wiki URL: wiki.segger.com/Debug_Bootload…ion_in_same_Ozone_project

      This code:

      Source Code

      1. void AfterTargetHalt() {
      2. unsigned int PC;
      3. unsigned int SP;
      4. PC = Target.GetReg("PC");
      5. if (PC == <BOOTLOADER_END_PC>) {
      6. File.Load("mainapplication.elf", 0);
      7. PC = <MAIN_IMAGE_ENTRY_PC>;
      8. SP = <MAIN_IMAGE_ENTRY_SP>;
      9. Target.SetReg("PC", PC);
      10. Target.SetReg("SP", SP);
      11. }
      12. }
      Display All
      Yields the following error at the File.Load() line. Removing the second function parameter fixes the error: File.Load("mainapplication.elf")




      While someone is fixing the wiki page: could you also explain the <BOOTLOADER_END_PC> user variable in a bit more detail?
    • Hello,

      Thank you for your inquiry.
      Indeed the Wiki does not seem to be up to date anymore. We will make sure this is corrected.

      Best regards,
      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      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,

      I just gave this a try and the Wiki is correct. It is just as documented in the Ozone manual and works wtihout any errors.
      Which Ozone version are you using currently?
      Could you give the latest one a try?

      Should that error also appear with the latest version, could you share how you call File.Load exactly?
      Sure these is no typo on your side?

      Best regards,
      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      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.