cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to clone stm32f103 to new board

Jarrid Graham
Associate II
Posted on February 09, 2017 at 19:33

What I have are two identical boards except for the firmware on one is newer than the other. I thought it should be fairly easy to copy the memory from one to the other . I have a st-link v2 and can copy the firmware (no protection) out and flash it to the other but to does not work after being programmed.

I can get access to the UART1 and boot pins if need be but when I write the memory and compare it, it has been written and checks out , I was just curious what I might be missing.

I will admit that I am not very familiar with the STM32 family of stuff but have worked with other micros over the years

14 REPLIES 14
Jarrid Graham
Associate II
Posted on February 10, 2017 at 15:40

Well after some more looking around I did find a section at 0x0807000 (12 bytes) that are different, I put back the original firmware and it did work, I had forgotten I did this a month ago before I gave up the first time.

I tried flash up that point , before I was over writing it but still no-go, I don't know if it is checksum check or some other type of check so I guess I need to try to disassemble it and see what is going on out there. I wouldn't think a code checksum since it is different on each board so far. changing any of the bytes results in a no-go.

I am guessing disassemble is next step although I am versed enough to understand anything about that, is there a software that I can watch the MCU , I know you can step with the st-link util but it would be nice to do some kind of break point type thing.

Thanks

Jarrid Graham
Associate II
Posted on February 10, 2017 at 17:23

I will look into that, I am thinking it is something to do with the MCU. On there board there is noting that I would think that can uniquely identify the device, but there must be something.

Thanks

Posted on February 10, 2017 at 16:52

Keil's debugger would work.

I find static analysis to be highly effective, using disassemblers that enable that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 10, 2017 at 17:50

The chip has a 96-bit Unique ID, it is described in the Reference Manual for the part.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Jarrid Graham
Associate II
Posted on February 12, 2017 at 17:54

Well in poking around they do look at 0x1FFF F7E8 in one section of code but it doesn't directly relate to what I am seeing. To be honest I am going to tinker with it but it is way above my level of knowledge at this point. 

While in the long run I guess I don't need to know , now I am curious and that normally leads me down a path of learning something new at least.

Thanks