I’m using ST’s COM application under Windows to upload via USART’s standard ST bootloader and the upload appears successful anyway, after uploading the 2.0 bootloader, the board is not responding anymore (no led blinks, no dfu) even resetting it.
Note: uploading back the standard maple mini bootloader instead brings back the board working fine.
Am I missing something?!
Thanks and bye, E.
I think there is a problem with the latest build of the bootloader, but it only seems to effect some people
Unfortunately I have not been able to replicate the issue, and other people who have the problem have not been able to debug why it is not working
If possible can you look in the commits history and try some older versions, and let me know at which commit, the problem started ?
Thanks
Roger
I think there is a problem with the latest build of the bootloader, but it only seems to effect some people
Unfortunately I have not been able to replicate the issue, and other people who have the problem have not been able to debug why it is not working
If possible can you look in the commits history and try some older versions, and let me know at which commit, the problem started ?
Thanks
Roger
i.e newer versions don’t work?
Here the comparison results: https://github.com/edogaldo/STM32duino- … o:mybranch
For what I can see there is only a change that seems strange (and possibly worng) to me, which is in file “STM32F1/usb.c” – row 44:
(-) SET_REG(GPIO_CR(USB_DISC_BANK,USB_DISC),(GET_REG(GPIO_CR(USB_DISC_BANK,USB_DISC)) & crMask(USB_DISC)) | CR_OUTPUT_OD << CR_SHITF(LED_PIN));
(+) SET_REG(GPIO_CR(USB_DISC_BANK,USB_DISC_PIN),(GET_REG(GPIO_CR(USB_DISC_BANK,USB_DISC_PIN)) & crMask(USB_DISC_PIN)) | CR_OUTPUT_OD << CR_SHITF(USB_DISC_PIN));
Best, E.
I vaguely recall someone contacting me about a problem with the Pin number vs the bitmap of the pin.
It looks like that change is from this commit
https://github.com/rogerclarkmelbourne/ … b25aa8e749
However, the change just appears to be the name to signify that its the pin number and not the bit value of the pin
e.g.
- #define USB_DISC 9
+ #define USB_DISC_PIN 9
No, I’m not sure this is the bug, it was just an idea based on following facts:
- current version is not working
- based on Pito’s post, previous version should be working (couldn’t anyway directly check it yet)
- most “particular” change (to me) was the one I highlighted
I’ll perform deeper checks as soon as I can and in case I’ll keep you posted.
[edit] anyway yes, LED_PIN = 1 = ( USB_DISC_PIN – 8 ) so this could be an indicator that, as you supposed, there could be a problem in CR_SHITF..
what about changing it to:
#define CR_SHITF(pin) ((pin & 0x07)<<2)
The checksums of the maple_mini_boot20.bin dated 20.4.2016 I flashed into my MMini on 21.4.2016 (I did not compile it, but downloaded as-is) are:
CRC-32: 7e4a31b6
MD4: 6d8c354fa9620d258b38c505e3dd00f8
MD5: 9dc7cae7c488420192ad3b2441dd1592
SHA-1: 5a2915fb37ebfc023c070740056a98e1bc047680
The checksums of the MMv20.bin dated 20.4.2016 I flashed into my MMini on 21.4. are:
CRC-32: 7e4a31b6
MD4: 6d8c354fa9620d258b38c505e3dd00f8
MD5: 9dc7cae7c488420192ad3b2441dd1592
SHA-1: 5a2915fb37ebfc023c070740056a98e1bc047680The MM_20.bin above works fine with my MMini clone.
I suspect the STM flashing utility is your problem. Try to flash it with stlink (clone).
It seems that the “maple_mini_boot20.bin” available on GitHub is corrupted.
I recompiled it with no changes and the new file is different and working fine!
By the way, I recompiled all the bins and the only file that compiled differently was this one..
My guess is that it got corrupted because in the make_all.bat file there is no “make clean” before the “make maple-mini” like for the other builds; this can lead to file corruption if the compilation folder is not clean (i.e. running “make_all.bat” more than once consecutively).
@Roger: I’d kindly ask you to recompile the file and update GitHub.
ps: about
#define CR_SHITF(pin) ((pin - 8*(pin>7))<<2)
File: maple_mini_boot20.bin
CRC-32: eb11a422
MD4: 17a76aa2fe920162c880d792721897d6
MD5: e43dd145f20152152630ab27a9064d4d
SHA-1: 0dc1a29e5409da3e4144f72516b805e91951671dI will update the make all bat , recompile and upload new binaries.
Actually I think of of the new targets is not in the bat file, as I forgot to add it ( but i compiled it manually)
It would be good if the problem was just as simple as a corrupt binary.
I’ve added a make clean to the start of the batch file and have run it to recompile them all.
Only the maple mini bootloader binary actually changed, which proves what @edogaldo has diagnosed as the problem
I’ve commited the change to male_all.bat and maple_mini20.bin to github
@edogaldo thanks again for your help in tracking this down.
You’re welcome!
Best, E.
That’s one more mystery solved.
PS. I’ve not changed the macro, but I agree your macro is better.

