cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Bootloader

michaelmichael9133
Associate
Posted on March 25, 2013 at 16:11

Hi all,

I have tried the USBD DFU project by ST and it works on an STM32F2xx microcontroller. What happens is that the first 3 sectors (3x16KB) are reserved for the bootloader itself and, since the code is less than 4KB long, I have tried to modify it to only make use of the first sector.

For this, I have changed the APP_DEFAULT_ADD constant from 0x0800C000 to 0x08004000 and, apparently that should suffice. However, for some reason, the DFU Demonstrator (only tool I know to flash dfu files into an STM32) still sees the 3 first sectors as Read Only and it doesn't even try to send data before 0x0800C000 address.

I've deeply searched throughout the code and can't find anything that prevents from writing beyond 0x08004000. I guess that it's something to do with the device enumeration (VID/PID/version/config descritptors, etc.) but tried without luck.

I'd really appreciate some light here. Btw, do you guys use DFU demonstrator to flash dfu files or there's something more convenient to do that? If only the source code of it would be available I could try and sort it out myself but things are too opaque when it comes to STM32 DFU imho.

Many thanks

Daniel

#dfu-dfuse-bootloader #dfu-dfuse-bootloader
1 REPLY 1
Posted on July 04, 2013 at 11:49

Hello,

I've got the same limitation, I have changed the APP_DEFAULT_ADD constant from 0x0800C000 to 0x08004000 but the 3 first sectors are in Read only; How can I do for writing at 0x08004000 ? How can I modify this configuration ?

Thanks,

Regards,

Philippe