Difference between revisions of "DFU"

From PaparazziUAV
Jump to navigation Jump to search
(hopefully now it's correct :))
Line 5: Line 5:


__TOC__
__TOC__
'''sw/tools/dfu/stm32_mem.py will be used to upload code, this wiki article was written in thought dfu-util would be used,however, maybe it's useful...'''
DFU (Device Firmware Upgrade) is the standard method to upload paparazzi code to a stm32fx MCU via usb.<br/>
The native dfu bootloader is already embedded in the ROM of the MCU. The MCU will not go automatically in dfu mode, so either [[Luftboot]] is needed or it is done on hardware side (e.g. stm32f4-discovery).
==Entering dfu mode==
===With extra bootloader===
[[Luftboot]] will enter dfu mode automatically if the board is connected to a pc.<br/>
[[KroozSD#Bootloader|KroozSD]] has also a own dfu bootloader.


===With native dfu bootloader===
DFU (Device Firmware Upgrade) is the standard method to upload paparazzi code to a stm32 MCU via usb.<br/>
This can be used on the stm32f4-discovery board e.g.
There are two different dfu bootloader which require different software:
Provide the board with power and connect the usb cable for dfu upload.<br/>
* custom [[Luftboot]]/KroozSD bootloader which uses stm32_mem.py script
Connect BOOT0 pin with 3V pin(BOOT1 with GND ?), press reset button , disconnect BOOT0 and 3V.
* native (embedded in ROM) dfu bootloader which uses external dfu-util
dfu-util -l


This will list all devices in dfu-mode.
==[[Luftboot]]==
This bootloader must be upload first, so paparazzi center can use stm32_mem.py to upload code to the MCU.<br/>
This bootloader is available for Lisa(m)/Lia ([[Luftboot]]) and Krooz/kroozSD ([[KroozSD#Bootloader|KroozSD]]) boards.


==Airframe configuration==
===airframe configuration===
This will be set as default at the appropriate makefile of the board.<br/>
Set '''Flash_Mode=DFU'''
 
==native dfu bootloader==
This bootloader is already embedded in the ROM of the MCU. <br/>
The MCU will not go automatically in dfu mode. To trigger dfu mode, connect pin BOOT0 with 3V(connect BOOT1 with GND ?), Reset MCU, disconnect BOOT0.
 
===airframe configuration===
This will be set as default at the appropriate makefile of the board.<br/>
Set '''Flash_Mode=DFU''' <br/>
Set '''Flash_Mode=DFU''' <br/>
Maybe it is set by default.
Set '''DFU_UTIL=y''


==Software Tools==
===needed software===
dfu-util is needed and must be installed
dfu-util is needed for this bootloader.<br/>
  sudo apt-get install dfu-util
  sudo apt-get install dfu-util
More information about dfu-util can be found at their Homepage [http://dfu-util.gnumonks.org/ http://dfu-util.gnumonks.org]
More information about dfu-util can be found at their Homepage [http://dfu-util.gnumonks.org/ http://dfu-util.gnumonks.org]

Revision as of 15:16, 17 September 2013

DFU (Device Firmware Upgrade) is the standard method to upload paparazzi code to a stm32 MCU via usb.
There are two different dfu bootloader which require different software:

  • custom Luftboot/KroozSD bootloader which uses stm32_mem.py script
  • native (embedded in ROM) dfu bootloader which uses external dfu-util

Luftboot

This bootloader must be upload first, so paparazzi center can use stm32_mem.py to upload code to the MCU.
This bootloader is available for Lisa(m)/Lia (Luftboot) and Krooz/kroozSD (KroozSD) boards.

airframe configuration

This will be set as default at the appropriate makefile of the board.
Set Flash_Mode=DFU

native dfu bootloader

This bootloader is already embedded in the ROM of the MCU.
The MCU will not go automatically in dfu mode. To trigger dfu mode, connect pin BOOT0 with 3V(connect BOOT1 with GND ?), Reset MCU, disconnect BOOT0.

airframe configuration

This will be set as default at the appropriate makefile of the board.
Set Flash_Mode=DFU
Set 'DFU_UTIL=y

needed software

dfu-util is needed for this bootloader.

sudo apt-get install dfu-util

More information about dfu-util can be found at their Homepage http://dfu-util.gnumonks.org