cancel
Showing results for 
Search instead for 
Did you mean: 

Reprogramming of System Memory

ryan2399
Associate II
Posted on December 07, 2007 at 12:44

Reprogramming of System Memory

6 REPLIES 6
ryan2399
Associate II
Posted on May 17, 2011 at 12:18

Is it possible to reprogram the System Memory block with your own boot loader?

If it is reprogammable, could ST make available the boot loader source. This would allow us to modify the boot loader according to our requirements... i.e. using a different USART, adding encryption to the communications etc..

Thanks

lanchon
Associate II
Posted on May 17, 2011 at 12:18

take a look here...

http://www.st.com/mcu/forums-cat-5952-23.html

also read here the part regarding AN2557...

http://www.st.com/mcu/forums-cat-5660-23.html

cheers!

[ This message was edited by: lanchon on 03-12-2007 05:52 ]

lspr35
Associate II
Posted on May 17, 2011 at 12:18

The posts in these two links do not answer the question if the code for the Bootloader (in system memory) can be obtained from STM. I am also interested in this because I can not use USART1 for flashing because I want to use TIM1.

So again: is it possible to get the source code of the Bootloder?

Best regards

Squonk

16-32micros
Associate III
Posted on May 17, 2011 at 12:18

Dear all,

The source code of the embedded bootloader will not be available to customers and only STMicroelectronics is able to reprogram this code in STM32 devices and so maintain the versions in future. However, if you would like to create your own bootloader :

1) You can use IAP : ST has released two examples ( one through USB : DFU)

and another one using UART and Windows Hyperterminal.

2) If you you like to customize the bootloader( System-Memory code) using

USART1 at start-up (System Memory Boot mode) and then you can just load

data and new code with your alorithm via USART1 to RAM then jump to it.

for more details refer to AN2606 on web for the ST protocol Definition

and usage.

After that you have just to boot in your flash code and you use TIM1

in our end application without any conflict with USART1 ( which is used only in system Memory mode boot)

Hope this helps you.

[ This message was edited by: STOne-32 on 03-12-2007 19:14 ]

lspr35
Associate II
Posted on May 17, 2011 at 12:18

Sorry for being annoying:

Solution 1:

This will not work with an ''empty'' device (Flash completely erased). I am searching for a solution with which I can program the internal flash under all circumstances. This includes a ''new'' device with an empty flash. Additionally this solution (IAP) requires a quite big program (8k?) residing always in the flash.

Solution 2:

Sorry, I do not understand Your explanation. How do I activate the internal System Memory Boot Mode (BOOT1=0 and BOOT0=1) using USART1 via PB6 and PB7 (and not PA9 and PA10)?

Additional comment:

You mentioned that the source code of the embedded bootloader will not be available to customers. But I think it should be possible to read the binary code from system memory using e.g. the ''Read Memory Command'' of the bootloader. Ofcourse this is not the source code but only the binary. But with some additional work it should be possible to regenerate a commented Assembler file. Right?

Best regards

Squonk

[ This message was edited by: Squonk on 04-12-2007 09:59 ]

bob239955
Associate II
Posted on May 17, 2011 at 12:18

I think its good nobody can change the system boot code, so long as it works and will always conform to the same specification. Otherwise you'd get mongers deleting it to encourage you to buy their slow, expensive and buggy dongleware. Well done ST and thankyou.

However it 'seems' silly not to reveal the source, since we already have a nice specification, and the binary - which we can see. Are ST going to get assertive if someone disassembles the machine code or decompiles it and makes the work public under clear no-warranty/demo terms?