UART Bootloader / Jumping between two programs

Hello,

we want to enable our devices to perform a firmware update through UART (converted from either RS232 or RS485, which should not matter), but without using the BM pin as we do not want to change the current layout.

So the idea might be like this:

We develop a custom bootloader, which writes incoming UART packages to the Flash as a second program area. After writing, a CRC check will be performed and the programm will jump to the new program. The program itsself will be able to jump back to the bootloader.

Has anybody already successfully developed something like this?

Are there any possible problems I did not recognize yet?

My first steps would be to configure two programs and see how I can jump between different programs with different startup codes.

But I already see a first problem here, as the ARMWSD software doesnt allow programming to custom ROM areas. But Keil gives a tool here to merge my two programs: GENERAL: MERGING TWO APPLICATIONS INTO ONE INTEL HEX FILE 

Has anyone tried this on ADUC7021?

Kind regards,

Christoph

  • 0
    •  Analog Employees 
    on Nov 15, 2016 1:57 PM

    Hi,

    I can't say I have seen this done, but I can't see any reason why it would not work.

    I believe that many compilers have a concept of "position independent" code which would allow you to build normally and relocate as needed.

    You might need to handle the exception table manually. On the ARM7TDMI it is at a fixed location 0x0, but using the REMAP register you can place RAM there and update it before you switch over.

  • 0
    •  Analog Employees 
    on Aug 2, 2018 3:38 PM
    This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin