Creating relocatable image file

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

    • Creating relocatable image file

      New

      Hello-
      We have a project using a bootloader on the STM32F411. Splitting the flash memory section into sections 'A' and 'B' and keeping the bootloader and application as separate projects (yes, there are ways to combine it, but we're not doing that for now) the bootloader running in flash section 'A' correctly receives, writes, and branches to the application in flash section 'B'. As a side note, the application project is compiling with the __VTOR_CONFIG option.

      As an additional level of safety we'd like to have two sections of application flash, 'B' and 'C', so that if the write to one section fails then the application can still be executed from the last successfully loaded memory section. It's not clear what the exact terminology is to be used but we would like to get some kind of relocatable image built so that after compiling the application only one time the bootload process can successfully place and execute the application in either flash section 'B' or 'C'. From reviewing the SES link options it seems like to get this to work the application would have to be compiled twice, once under each different memory map, and the host and device ends of the bootloader would have to decide which image is the one to upload. Is this assessment correct or is there a way to have a single HEX file that will run properly regardless of where in flash you place it?
    • New

      Hello,

      Thank you for your inquiry.

      I am not completely sure whether I understand you correctly. Could you please elaborate what you are trying to do?

      Are the applications in B and C simply mirrored or do they differ in some way?
      Should both applications be flashed at the same time or should only one be updated at a time?
      Is the increased safety related to the boot or the update process?


      In case both applications should be flashed at the same time you may set "Debug > Loader > Additional Load File[..]" to the image of the other application.
      Please note that the project needs to be setup so both applications are built at the same time, so either as build dependency for another project or using a batch build for multiple configurations.

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