cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Bootloader on system memory is it possible?

Vishnudev  K
Associate II
Posted on May 23, 2018 at 15:37

Is it possible to change the system memory ?

What other than Dfuse, usart bootloaders , are there in system memory?

Is it possible to program a customer bootloader on system memory.

I need to create bootloader that will read a file from usb and write it to flash.

Please tell me how to do

Iam using STM32F429i disco

#bootloader #flash #custom #system-memory #m4 #stm #stm32f4
10 REPLIES 10
Vishnudev  K
Associate II
Posted on May 23, 2018 at 15:45

is it possible create a program, that can program without any computer

Szymon PANECKI
Senior III
Posted on May 23, 2018 at 16:05

Hello,

System memory in STM32 MCUs is programmed only once (during production) and it stores bootloaders developed by ST and described in ST documentation (UART, I2C, CAN, etc). This memory can't be modified after all, so it can't be used by the user to store his bootloader.

Regards

Szymon 

Posted on May 23, 2018 at 16:36

Considered to be ROM/OTP, unless you're doing $50M in annual business assume you're not going to get your code burned at the factory.

Perhaps you should first start writing and testing your boot loader in FLASH, and master that. Something that reads data from SD or USB would likely take 16-32KB so could use the first two FLASH sectors, allowing you application code to use the rest of FLASH starting at 0x08004000 or 0x08008000

You can obviously partition the memory any way you choose, but tends to be more manageable in the sectors smaller than 128KB

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 23, 2018 at 16:41

It is certainly possible to implement methods using IAP and USB sticks or SD cards.

In production you're going to need to program in some base level functionality, using either SWD/JTAG or the System Loader with USART, USB, CAN, etc.

You could also get your distributor to pre-program devices before you solder them down, and they'll charge you a bunch of money to do that.

Usually the best course of action is to design/build a product you can program in your own facilities, and provides multiple means of recovery from a bricked state. And from a developer perspective one you can debug.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 23, 2018 at 18:32

Sir i have been searching for sometime regarding that. I have seen your forum replies.

I have taken USB HOST Firmware Standalone Upgrade of STMCubemx example files.

Its working .

PROBLEM IS..

Its working after pressing reset button. But not after giving the power supply first..It goes automcatically to bootloader part instead of application. But if i press reset button right after power up, it works fine.

When after power up, when i looked the memory content , its was FFFFFF something. But after pressing reset button, it was 20..... something

Please help..I have seen your post, some linker files. I couldn't understand. Am new to this

Posted on May 23, 2018 at 18:35

That programming is it done on flash memory or system memory. 

My requirement is i should be able to program without any pc.

I know one time i must program using PC. After that i should be able to program by just connecting usb with a button pressed during power up

Posted on May 23, 2018 at 19:19

Yes, so basically IAP or OTA type things.

The F4 and F429 DISCO should have a FW/FIRMWARE Upgrade example as part of the SPL, I would start with those as more clear examples.

With the HAL/CUBE approach you're going to want to instrument things to understand what is happening, and perhaps use a USART to output that information to a terminal.

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-library-expansion/stsw-stm32138.html

 

STM32F429I-Discovery_FW_V1.0.1\Projects\FW_upgrade\src

>> I couldn't understand. Am new to this

And I'm old, and not looking to be the unpaid sherpa that carries everyone up their individual learning curve.

The are many examples, and explanations of techniques and methods involved, find those that fit your learning style and leverage prior experiences.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Akos Pasztor
Associate II
Posted on May 24, 2018 at 11:03

You might as wanna take a look at my demonstration. It's simple, well documented and commented. It's available at GitHub:

https://github.com/akospasztor/stm32-bootloader