cancel
Showing results for 
Search instead for 
Did you mean: 

Jump to application - downloaded to internal falsh by UART.

Suthar.Narendra
Associate II
Posted on January 11, 2016 at 10:53

Hi,

As I am working on STM32F429. I am using Keil uVision 4. I have written my custom boot loader to jump to specific application on reset. I am downloading my boot loader code at internal flash address 0x08000000 and application code at 0x08008000 by setting the IROM address in target tag of Keil using J link.

Now I am downloading the new hex file from UART to address 0x08100000. After successful download complete I reset the controller and jump to new downloaded application at address 0x08100000.

I can able to do this if only I build new downloaded hex file by changing the address of IROM to 0x08100000 in Target tab of Keil. But I don't want to do this. I want to jump at new application which was build and downloaded by UART without changing the address in IROM.

Is that possible? if yes, how?

I am also relocating the vector table address before jump on application in boot loader code by NVIC_SetVectorTable function.

Please help me out to resolve this.

Thanks.

#stm-boot-loader
7 REPLIES 7
pkumar1883
Associate II
Posted on January 11, 2016 at 11:14

Hi narendra.suthar,

Put the downloading file to some temporary area. After that copy it to  main application area and run it.

pkumar1883
Associate II
Posted on January 11, 2016 at 11:15

Hi narendra.suthar,

Put the downloading file to some temporary area. After that copy it to  main application area and run it.

Suthar.Narendra
Associate II
Posted on January 11, 2016 at 11:21

Thanks kk,

This is the one solution.

But is there any other way?

gmate1
Associate II
Posted on January 11, 2016 at 13:00

If I understood you correctly, it seems that you are trying to have two application firmware along with your custom bootloader in the main flash memory and you are setting different load addresses for those two application firmware and you don't want to change the load address everytime you build your new application. If this is indeed true then, I suggest you to generate the application binary with same address in Keil and before downloading the new firmware, copy the current application firmware in a different region of flash memory. In this way, you will always run your application from same load address (say, 0x08008000) and hence you don't need to make any modification for the linker through KEIL.  

Suthar.Narendra
Associate II
Posted on January 11, 2016 at 13:59

Thanks sidekick,

You are right.

But I have done this as copying my new firmware at second part of the flash, after receiving the whole new hex file I am coping that at my running APP1 location.

It is working now.

Thanks once again to all.

But just for my curiosity  to know is that possible to jump on second application which was downloaded to second part of my flash(0x08100000) compiled with address of APP1(0x08008000) in IROM in Keil?

Posted on January 11, 2016 at 15:14

At the very least you'd have to modify the absolute addresses in the vector table, not just change the base address.

Another alternative would be to switch the FLASH Banks, so APP1 was at 0x08008000 and APP2 was loaded at 0x08108000 but linked for 0x08008000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
re.wolff9
Senior
Posted on January 12, 2016 at 10:25

Wait!

Most people don't use the MMU that the processor has. But you could!

Link your app for say 0x08800000, and create a memory mapping that maps that to the proper region in your flash memory. I thought for a moment that you were using an F072, where I'm not sure that it has an MMU, but for the F429 I'm pretty sure that it DOES have an MMU. Possibly, while ''receiving'' the application, you might need to adjust the vector table before flashing it. I'm not sure if the ''get a vector from vector table'' goes through the MMU. Not trivial to implement correctly, but doable!