Regression: Application not get booted for GD32V
Multiplatform USB DFU host utility
Brought to you by:
tormod
The following commit broke ability to boot into the application after downloading for GD32V (GD32VF103) .
https://sourceforge.net/p/dfu-util/dfu-util/ci/87df198c72d7ed6dea4b11a67ab1a447c485a305/
When used with -s 0x08000000:leave it is expected to reboot and run the user application.
Without SET_ADDRESS it will reboot into the bootloader again. Because bootloader code is being remapped on to the region starting at address 0x00000000 .
Anonymous
Thanks for the report. This is following a download, so there have been SET_ADDRESS requests, but the last one probably pointing to the start of the last sector being written. I guess this is the problem. So if the LEAVE request makes it jump to this address, it causes a crash or overrun and it restarts from 0x00000000, still being remapped to ROM (bootloader) if the boot pins are configured that way.
The ST documentation AN3156 says:
So from that I assume if nothing has been downloaded, it would still work fine.
But I guess this applies if there has been a download:
We probably need to SET_ADDRESS the start address, if we have been programming other pages.
Can you please try the attached patch?
I have pushed this to git master now, so you can get it from there. Please test both download, upload, or just
-s :leaveand reopen the ticket if there still is an issue.Thanks! it's fixed now.