Closed Lanchon closed 9 years ago
program and erase bugs verified on current master compiled against Qt 5.
I will run some tests. Are you sure your flash option registers are clear ? (flash protection)
Yes, I can program the device fine with st-flash but fails with your code. I tested this repeatedly. I'm using the stlink/v2 embedded in the F3 discovery board, and i have the latest stlink firmware loaded.
EDIT: btw, shouldn't erase clear the protection? (sorry, i'm new to stm32.)
Ok, I will test on my F3 Discovery board. Thanks.
This is the file I'm programming, flashes and runs fine with:
st-flash --reset write stock-demo.bin 0x8000000
It's the stock software preloaded on my F3DISCO (property of ST, license on their site).
stock-demo.zip.txt (remove the '.txt' extension)
Can you try with an older version of QStlink2?
sudo apt-get install qstlink2=1.1.7
Sorry I'm unable to test at this time. Were you not able to reproduce? EDIT: Again, this happens on master branch too.
I can reproduce with 1.2.0, I'm working on a fix.
For some reason if fails with your file, but other projects compiled with GCC are working fine. Only the first flash page is not written.
FYI, this file contains the stock firmware as shipped by ST and downloaded by your own tool (using PPA version 1.2.0). It can be successfully reprogrammed into the device (and then runs fine) with st-flash.
Try flashing some GCC project (works according to you), then download, then reflash. The same might probably happen. The download contains the whole flash (even unused parts). The bug might be related to the bin file being large or equal the size of the flash.
I found the bug, it was trying to delete an extra flash page at the end of the flash area, so it was deleting the first one instead... fixed :)
Thank you! What about erase not erasing, was it the same bug and also fixed?
I will check this one and reopen if needed. Thanks.
I fixed the mass erase as well.
Cool!
platform: linux mint 17 board: stm32f3discovery qstlink2 version: 1.2.0
$ qstlink2 -cwVv ./stock-demo.bin >write.log 2>&1
result: the first 0x800 bytes of flash are erased to 0xFF.$ qstlink2 -cev >erase.log 2>&1
result: flash not erased.see attached logs. write.log.txt erase.log.txt