Skip to main content
JDrei.1
Associate
January 18, 2023
Question

How can I convert an ELF file to DFU file? We use WICED to generate an ELF and BIN file. The conversion tool "DFU File Manager" can convert a BIN file, but when I try to download the DFU file with "ST7 DFU Demo" and "DfuSe Demo" I get "not DFU file

  • January 18, 2023
  • 6 replies
  • 6362 views

..

This topic has been closed for replies.

6 replies

Technical Moderator
January 25, 2023

Hello @Community member​,

Could you specify the Wifi module used? and on which STM32 product? you may check Cypress WICED SDK version? For example, it is mentioned in H7B3-Discovery Kit User manual UM2569 that only Cypress WICED SDK 3.5.2 or later supports the hardware module.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
JDrei.1
JDrei.1Author
Associate
January 25, 2023

We are using 43xxx_Wi-Fi, STM32F412ZGT6 and Version: Luna Service Release 2 (4.4.2)

Build id: 20150219-0600.

Are you saying WICED can build a DFU file?

I built an ELF with USB DFU class device using STM32Cube. I cannot get convert the ELF file to DFU that either "ST7 DFU Demo" or "DfuSe Demo". Using "DFU File Manager" to generate DFU...

Tesla DeLorean
Guru
January 25, 2023

I don't recall if the DFU Manager will take .ELF input

You might want to check this

https://github.com/majbthrd/elf2dfuse

I wrote a similar tool years ago, but not sure it dealt with multi-sections .ELF.

Not sure how complex your .ELF is.

DFU File Manager should be able to process a .HEX

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
JDrei.1
JDrei.1Author
Associate
January 25, 2023

I was able to use elf2dfuse to create a DFU file. DfuSe downloaded the file and verified. However when I reboot my board, the firmware was not updated.0693W00000Y9AHQQA3.pngI have attached the ELF and DFU files. Also, I included the STM32Cube project et al that I loaded to handle DFU transfer. It enumerates, but not sure if it's actually programming the flash.

JDrei.1
JDrei.1Author
Associate
January 25, 2023

Operator error on DfuSe Demo verify, so ignore the above picture. Now I get:0693W00000Y9AQdQAN.pngI'm guessing the firmware I have loaded in my board will enumerate as a DFU device, but does not actually program the flash.

Tesla DeLorean
Guru
January 25, 2023

The .ELF look built differently from the project

Assuming you have a loader of some sort, as the primary .ELF starts at 0x0800C000 address, and not 0x08000000

Attached are a couple of .DFU

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
JDrei.1
JDrei.1Author
Associate
January 25, 2023

The ELF from the project includes DFU. I use ST-LINK to download it. The other DFU is my project built with WICED. I'll eventually port the STM32Cube source into my project...if I can get it working.

When I try test1.dfu...0693W00000Y9AgzQAF.pngWhen I try test2.dfu...

0693W00000Y9AhEQAV.pngAfter power cycle, the original STM32 app is still running.