cancel
Showing results for 
Search instead for 
Did you mean: 

bootload from a pc program

orkunkasapoglu
Associate II
Posted on March 07, 2013 at 00:35

Hi all i have to write an interface program for write to the stm32f40x's flash. I did a control system but users want to change some parameters on program but i can't give them the sources. I must write bootloader program and it must go on pc and controller must on read and write protect mode and i want to send go on unprotect mode (just for write) and write to flash and go again write protected mode. Is it possible or not?? I did not find any document about that. I'm looking for something about that but just find flash programming documents and i just know stm32f40x has the own bootloader.  

5 REPLIES 5
Posted on March 07, 2013 at 01:28

Are you looking to rewrite the application or just the parameters/configuration?

You might want to review the app notes related to IAP (In Application Programming).

I'm not totally sold on the write protect aspect, but a protected boot loader, that can update an application firmware, or configuration block are certainly doable.

Have you done anything similar on a micro-controller platform before?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 07, 2013 at 17:26

''users want to change some parameters''

 

That seems perfectly reasonable - have you not provided any means for them to configure parameters?

Rebuilding & downloading the entire application just to adjust parameters sounds like madness!!

orkunkasapoglu
Associate II
Posted on March 08, 2013 at 13:17

I use controller just in student projects before but i understood it i don't need bootloader just i have to write these parameters on a flash address and when they want to update them just send with uart or any communication peripheral and controller update parameters on flash address.

crt2
Associate II
Posted on March 08, 2013 at 13:27

You can change various flash locations using openocd, you can also implement a response-reply API for USART and change parameters via that. Parameters are just variables that can be changed when running program (if I understood you right). Otherwise like some said: flashing to change parameters of program is a mess. Implement some sort of ''Talking system'' with uC (button-led, button-display,button-usart, usart-usart,...) so that you can check parameters and adjust them ''on fly''.

There is some programing bootloader manual somewhere but I have it only for stm32f2...

orkunkasapoglu
Associate II
Posted on March 09, 2013 at 12:55

thank you for all comments. yes crt you understood right just parameter changing when program is running and i will use uart for communication. Thanks to all comments again.