cancel
Showing results for 
Search instead for 
Did you mean: 

DFU File Manager: Unable to create image from this file

cvskill
Associate II
Posted on December 02, 2014 at 14:14

0690X00000603IlQAI.jpg

Hello, anyone help me!

Iwant to generate a dfu file for my STM32L053C8-Discovery bord, but whatever I fill in the blanks in the DFU File Manager, when I choose a hex file generrated by my Keil 5, an error occurs as the picture above shows.

#stm32-dfu-file #dfuse-demo-:-download-error
20 REPLIES 20
Posted on December 02, 2014 at 17:29

You think attaching the offending .HEX might help?

What address is the image compiled/linked at? Does the size of the image exceed the memory reported by the device?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
cvskill
Associate II
Posted on December 03, 2014 at 01:39

Thanks for your response.

The pictures below are the settings you mentioned.

0690X00000603IqQAI.jpg0690X00000603IvQAI.jpg

In the Linker Tab, I selected Use Memory Layout from Target Dialog.

In the readme file of the dfu file provided by STM, it says the offset address is 0x08007000. The original description is as the picture shows below.

0690X00000603J0QAI.jpg

Posted on December 03, 2014 at 02:10

The part only has 64KB of flash (0x10000), you can't advance the address without shrinking the size an equal amount.

You'd want 0x08007000 with a size of 0x9000
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
cvskill
Associate II
Posted on December 03, 2014 at 03:41

I have changed the size of flash into 0x9000 or even smaller, but the same error occurs every time.

Now I am considering whether my DFU File Manager(v3.0.4) works correctly. Do you have a hex file that can be loaded in DFU File Manager(v3.0.4) correctly? Could you attach me the file to test if my DFU File Manager works fine on my computer?

Thank you!

Posted on December 03, 2014 at 05:11

I have 3.0.2, loading a different version would be too disruptive

0690X0000060MoAQAU.gif

________________

Attachments :

Project.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I03C&d=%2Fa%2F0X0000000bSk%2F2G5u7Zbw509E_flnZvkGYowuWZTsWV6PZ_SsA.5kOus&asPdf=false
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
cvskill
Associate II
Posted on December 03, 2014 at 06:53

Thank you very much!

My DFU File Manager doesn't work. I downloaded an old version which is 3.0.0, and everything now works fine.

abilger
Associate
Posted on December 12, 2014 at 22:18

I hit this same issue using DFuse 3.0.4. Older versions do not appear to be available online. However, source code is provided with DFuse, so I was able to find and fix the bug.

Assuming you have Visual Studio and can rebuild, use this approach:

- Copy \program files (x86)\stmicroelectronics\software\dfuse v3.0.4\sources to another folder

- Open Dfuse.sln from this new location

- In project STDFUFiles, open source file image.cpp

- In function CImage::LoadHEX(), change variable 'colon' from unsigned long to char

- Rebuild solution (you may need to also download a Microsoft MBCS add-on if you use VS2013)

- The built DfuFileMgr should work correctly

The bug is that they used an uninitialized ULONG to parse characters from the .hex file, and fscanf of ''%1c'' (to attempt to read the colon at start of line) only fills a single byte. This means the high bytes of variable 'colon' are likely non-zero random values, so fail comparison to ':', etc.

Aaron

Amel NASRI
ST Employee
Posted on December 16, 2014 at 16:25

Thanks for reporting this issue & also for the suggested solution.

It will be fixed in next release of the DFuSe.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on December 16, 2014 at 17:13

Older versions do not appear to be available online.

Here's my mirror of

https://drive.google.com/file/d/0B7OY5pub_GfIdTE0N18ycHl2NlE/view?usp=sharing

and

https://drive.google.com/file/d/0B7OY5pub_GfIV2IyV0JQWEdPNTQ/view?usp=sharing

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..