cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F205 flash self programming

msstaf
Associate
Posted on September 06, 2014 at 22:11

Hello, 

First, sorry for my poor english.

I have a problem with a STM32F205. I am trying to read the content of flash memory , and for some bytes i have a value different with my firmware binary file. But the application is working fine !

What i did :

I create a binary file : xxx.bin

I program my MCU with OpenOcd.

I dump the content of flash with OpenOcd

I checks that the file uploaded and the file downloaded are equal (the only difference is that the dump file have 0xFF at end of file).

Then, I read and print the contains of file with the firmware, and i have some difference.

Binary file :

4000 2001 A469 0800 F651 0800 F653 0800

F655 0800 F657 0800 F659 0800 0000 0000

0000 0000 0000 0000 0000 0000 F65B 0800

F65D 0800 0000 0000 F65F 0800 FFE9 0801

FFAD 0800 FFAD 0800 FFAD 0800 F661 0800

Bytes read on flash by my firmware :

4000 2001 A469 0800 F651 0800 F653 0800

F655 0800 F657 0800 F659 0800 0000 0000

0000 0000 0000 0000 0000 0000 F65B 0800

F65D 0800 0000 0000 F65F 0800 EFE9 0801

A4AD 0800 A4AD 0800 A4AD 0800 F661 0800

Why some byte like FFE9 are read as EFE9, FFAD read as A4AD, etc ... ?

Second test :

I used the objcopy program to generate an hex file. And in the hex file i have the EFE9, A4AD. When i print the content of the equivalent file .bin, i have values FFE9, FFAD !!!

2 REPLIES 2
Posted on September 07, 2014 at 01:06

My gut tells me you have a problem with signed vs unsigned char with whatever tools you are using to dump the .BIN file.

Attach the offending .BIN, .HEX and .ELF files, I have better things to do than try and guess where in the chain of custody you've got stuff broken.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
msstaf
Associate
Posted on September 14, 2014 at 21:19

I have an explication it's a problem with OpenOcd.