xromansx / STM32F4x1_HID_Bootloader

STM32F4x1_HID_Bootloader
2 stars 0 forks source link

Investigation on why the upload does not work #1

Open arthurfprecht opened 1 month ago

arthurfprecht commented 1 month ago

Hi @xromansx, I took some time and compared the version of your repo to the Serasidis one, more specific a fork created by Samveen, which has the modifications to make the F401 and F411 work.

By comparing the code, all the changes you implemented are sound. The USB HID configuration works quite well, but I guess there is something wrong when linking the HAL files. The custom HID function that was supposed to handle the data coming from the PC is never called. I took a picture of the working version's call stack, so that might ease your debugging.

(sorry for the potato quality, I just realized later that a screenshot would be much easier to read) image

Sorry for not being able to help with the linking part, I am quite noob with VSCode/PlatformIO. I am using Sloeber to develop here currently. In any case, if you want the project, you can find the code here.

I really like the idea of having a working bootloader for the Black Pills and I've been working towards that goal too. Feel free to contact me about this.

xromansx commented 4 weeks ago

I tried multiple bootloaders on STM32F401CCU6 but non of them had working HID exept WeAct, the code in this project was from Sloeber. Do you have binary that works ?

arthurfprecht commented 3 weeks ago

Hi! So my board has a STM32F401CDU6, the bootloader is confirmed to work. AFAIK it will work flawlessly on the 401CC too. In the case you want to try the binarieds, I am attaching the binaries here in the .zip file (both .bin and .hex file, you can use the one suits you the most).

bootloader_401.zip

I also searched the internet since 2022 (maybe even earlier) and couldn't find any prebuilt binaries that worked. In the end I had to compile from source from this repo to get something to work. Then I tried to build the binaries and make them available, you can find them under the releases in this Github page I created.

I hope it can help. Please let me know if it works or not, and feel free to ask any questions.

xromansx commented 3 weeks ago

I tested your binary it works perfectly, I can now upload code directly Platform IO using HID mode. I'll try to compare your code with mine but if there is already a working version don't see lot of sense. Thank you.

arthurfprecht commented 3 weeks ago

I am very happy to hear that! If you need anything, let me know.