cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303VB: How to switch from custom boot loader to application?

Prasant J
Associate III
Posted on July 31, 2017 at 15:36

Hi,

I'm using STM32F303VB in my custom hardware that requires boot loading STM32 over CAN. I'm writing a CAN boot loader.

I want to know, how to switch/jump from boot loader to application?

Is there any document or project that I can use as a reference?

Any inputs will be of help!

Regards, Pj

#stm32f303 #bootloader
4 REPLIES 4
Posted on July 31, 2017 at 15:59

It's been a topic covered here a million times, please review similar forum posts.

Review IAP (In-Application Programming) examples.

Branching to other code and subroutines is a basic function of a micro-controller, review that in this context, and C language constructs for function pointers, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 02, 2017 at 16:06

Hi

Turvey.Clive.002

‌,

Thanks for inputs. I'm exploring posts with similar queries.

I have one question:

I want to

offset my application from 0x0800 0000 to 0x0800 7000. I have done 2 changes for this:

1) Modified the Linker file &

2) Updated VTOR offset.

When I program the flash I can see that the flash is programmed only from location 0x0800 7000 as desired &

start of flash region (0x0800 0000 to 0x0800 6FFFF) is 0xFFFF FFFF as expected.

The problem: the application is not running when I reset my hardware.

(Note: I have NO boot loader but only 1 firmware that is offset at 0x7000).

Is this an invalid case?

Can the applications be run only from start of flash?

Any inputs will be of help.

Regards, Pj

Posted on August 02, 2017 at 17:15

>>Is this an invalid case?

It is invalid, you need at least two vector entries for an initial SP and PC at 0x08000000, they can point anywhere.

>>

Can the applications be run only from start of flash?

Correct. Or more technically address zero, where FLASH, RAM or ROM is initially shadowed via the BOOTx pin settings. In the normal case 0x08000000 content is readable at 0x00000000, and SCB->VTOR resets to zero.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 18, 2017 at 08:09

Hi

Turvey.Clive.002

‌,

I was able to get this done.

As you suggestedsimilar posts on the forum was very helpful.

Thanks for your inputs!

Regards, Pj