2017-02-09 10:33 AM
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
2017-02-10 06:40 AM
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
2017-02-10 08:23 AM
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
2017-02-10 08:52 AM
Keil's debugger would work.
I find static analysis to be highly effective, using disassemblers that enable that.
2017-02-10 09:50 AM
The chip has a 96-bit Unique ID, it is described in the Reference Manual for the part.
2017-02-12 08:54 AM
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