a Virtual Robotix Network Team

Multipilot 32 Support three kind of bootloader :

  • The  first and simple is Serial Bootloader.
  • Jtag port .
  • USB DFU.

Actualy i'm work on it . My starting point was leaflab bootloader code.


This is the thread in his forum.


This is the code that i'm using :


I'm working on native branch.

So actualy the code is uploading fine on  flash but when the routine check if the stack pointer is in correct position the test failed  :(

So I'm try to understand why ?!


If someone have same idea It's welcome .



Views: 719

Reply to This

Replies to This Discussion

those mcu's have the ability to have the boot code in ram and in flash.

you have to check this.


Hi Robert ,

yes i know , in bootloader code i have the problem after i uploaded all the code in flash ... when i try to restart the problem is that the stack pointer isn't in correct position.

But when i used STM32F103RB instead of VE the code worked fine .. :(

I think that there're an error in memory allocation.


Hello ,

I was looking to the documentation provided in the last Webinar on the different
boot loading protocols available for STM32 proc.

Both are refering to the STM Application Note AN2606 available here :

In the table-2 page 7, the DFU bootloader protocol is available just
for Connectivity Line (i.e. STM32F105xx and STM32F107xx microcontrollers).

It seems that the STM32F103VE of the MP32 will not be able to managed DFU.

By the way, Spy-Cam have a simple method to upload their firmware.

The procedure consists in copying a firmware file with a specific name (ex. MPE32_firm.bin)
in the root of the SD card.

At the next reboot (by pressing reset for ex.), the program updates itself the flash RAM
and reboot with the new code!

My 2 cts !
Best regards,


Hi Spartacus ,

thanks for your support , so i have yet doing some test on bootloader by usb , using a dfu approach and it works , the only problem that i have to solve is after upload the code in ram save in flash in right position the new code ... if you have some link ..about this application note send us the link .. :)

If some could work on usb bootloader ask me the source .. i can upload it on repo ...

For upload the code is possilbe to use dfutil developed by openmoko project used also in other project as leaflabs.






hi roberto,

yes, pls. upload the current bootloader as you have tweaked.

usb support at stm is somewhat conservative.



Hi Robert,

I put online two source that i have check and use on MP32 , I compile it put on the micro with the same procedures used with normal program ...Then with dfutil you can check the availability of dfu devide enumerate on usb.

Check the dfu-util functionality in the help ... you found this program in root of vride.



Main problem that i don't have solved is that after upload the code don't start .. i think that is a problem on map vect interrupt . When you compile the code you don't use jtag configuration for linker but rom. In rom the code is remapped after the bootloader code in the flash.

If you need some support before check the code contac me ..



Dear Robert, @all

check this new code :

I upload a program file by usb on cpu and i see the program start , dont' work properly yet i think that i need to check somethings in vector table or in memory allocation .



I spoke with Giovanni to understand what could be the problem on the code uploaded by usb .

I told me to check the the register in NVIC that is possible to change to set the start of int vect table. And then check the position of the stack. In these day i'm with my kids for the week end i think to check the code in the next day.



ciao roberto,

i looked through the existing usb code and understand who it works.

offest calculation of the user code and setting the stack pointer is clear to me.


will try to generate a simple example.


First download riquire the followimg steps:
*Connect MP32 device to Computer USB port and wait for "NEW HARDWARE FOUND" message
*wait for "Found New Hardware Wizard"
"Can windows connect to Windows Update to search for software?"
Choose "no, no for this time"
*push button --> Next
"What do you want the wizard to do?"
Choose "Install from a list or specific location"
*push button --> Next
* Now select by browser, drivers directory of DFU devices in your VRIDE location
for example:
*push button --> Next
Wait for installation complete
Now device is ready to use

Hi all,


Does anybody have tested with the MP32 the "RapidSTM32 blockset" for Simulink ( 

"RapidSTM32 can convert your Matlab program to a working embedded system in just a few mouse clicks. All you need is standard Matlab tool suite, RapidSTM32 Blockset and FiO evaluation board. You do not need to write a single line of code."


This blockset uses the usb port to download firmware and to communicate with the board via simulink. The pb are :

1 - How to download the firmware to the MP32 via usb ? (I have followed the previous posts, but the hardware is always unrecognized)


2 - The blockset is developped for the FiO Std...which looks like to the MP32.




Hi Cyrille,

I had a look to the website, it's very interesting.
I'll try it as soon as possible. Thanks for your tip.
Best Diego



© 2019   Created by Roberto Navoni.   Powered by

Badges  |  Report an Issue  |  Terms of Service