2017-08-22 08:25 AM
Hi,
I am trying to use the STM32 flash loader demonstrator to download a new software on my device.
I am using the version V2.9.0RC4, which I have found on this site
(Cf.
https://community.st.com/0D50X00009XkYFUSA3
).I have written a STMap file for my device (see attached file STM32L0_x7_128K.STmap).
I have started from STM32L0_x3_x2_x1_192K.STmap file and modified the following informations :
PID=0447 (I leave the value unchanged as it was the value given by ST-Link V2)
BID=1FF01FFE (value found in AN2606 )
I have remove all the pages above 128K (as my device has 128Kb of flash memory)
I have leave the [DATA] and [OptionBytes] unchanged
When prompted I choose my file in the demo software (STM32L0_x7_128K), the mapping is correctly displayed in the tool, and I can apparently reprogram the firmware in the device. But in fact if I select the verify option in the gui, the write succeed but the verify failed, and the program does not run. I have confirmed with ST-Link that there is really a difference.
Am I doing something wrong ? I am very surprised that the error occurs at the very end of my program while it is not the end of the flash (Can it be a software problem ?). There is no memory protection, and I can successfully write that memory location either with ST-Link or OpenOCD. Has anybody any idea to make the firmware write and verification complete successfully ?
I have included various screen capture to illustrate the bootloader configuration and error.
- configuration.png : illustrate how my custom STMap file is interpreted by the demo boot loader software
- ErrorMsgBox.png : the message box opened by bootloader demo software
- MemFileComp.png : illustrate the differing bytes in ST-Link utility software
Thanks for your help,
Regards
null2018-10-04 03:01 AM
I am using STM32L072CZ and I have the same problem. The only difference is that verify fails at address 0x8019280 (program size = 103046 bytes). When I load a different program the error happens at address 0x8019800 (program size = 104461 bytes). Always near the end, I think the last page of written memory.
When I load another program the verify does not fail (program size = 104531 bytes).
So I think the problem is not related to a special or particular memory location but I do not understand why a smaller program fail the verify.
Memory segmentation may be the problem in common with your case, but my programs are examples from ST and the linker command file (stm32l072xx_flash.icf) is always the same.
Now, to me, the main problem is get answers from ST.
How can we get help?
Thanks in advance to any help.
Best Regards
Luca
2018-10-04 03:03 AM
I am using the Flash Loader v.2.8.0