No worries, happy I could help. This UPDATE'S bootloader is a lot more user friendly than my other videos bootloader so it needed to be done. Have fun!
Very useful video, thank you. I solved my bootloader problems with two different STM32 boards within a couple of minutes. Especially the links in description are very useful: all are valid and get the right things I needed. Perfect explanation why and how. Many, many thanks!
I also solved my bootloader problem but what i found out later is that the usb comminication gives trouble with my serial3 connection to my blue tooth module, every time it looses connection with the pc and i have to upload the bootloader again. Do you experiance the same?
Use the PB2 port tied to +3.3V after a RESET. This will kick in the HID Bootloader (even with anything written previously). One also can unplug the USB, tie PB2 to +3.3V, and plug it to the USB port, this also can kick in the HID Bootloader.
Thank you very much for your guidance. Spent 1.5 days to make STA32 working until I saw your video. Now I am good now. Just FYI, I used STM Flash Loader to flash bootloader and in the Arduino's Upload method I used HID Bootloader 2.2
I had tossed 5 blue pill boards in a drawer after wrestling for days to get them to work with Platform.io back in 2018. I recently got interested in using them with DIY Eurorack synth modules. This procedure & the new bootloader did the trick, even with counterfeit CKS32F103C8T6 microcontrollers on the boards! Thanks for the update!
Thanks for this! I already had a pile of these lying around, but I haven't used them due to programming being fiddly. Ordered 10 more and will be flashing the new bootloader on all of them.
@@CalebMarting Hi Great Vids however after 5 attempts I still get the following error when I try and down load a program : > Searching for [1209:BEBA] device.... Error - [1209:BEBA] device not found
@@johnmmcguinness7982 Do you still have this error? If so try flashing the bootloader and uploading any sketch. Before you upload the second time select the boards com port (that would be com 7 for you) in the Arduino IDE and then click upload. It should work this time
The first time I uploaded a bootloader it took about 15 hours to figure out how to do it. That's why I started making these, to save people time. Glad it works!
Nice! I was able to program my Blue Pill a while ago then something happened and I just kept getting errors. This video inspired me to clean up my IDE and set everything up again. By following your instructions I was able to get it all working again. Now I need to see if I can program a little 32F030F4P6 board I got a while ago.
@@CalebMarting Last night I opened up Serial Monitor WHILE uploading a sketch and the Bluepill could no longer be recognized as a usable USB device on ANY computer so I went through the process in this video again and now it works.
It's possible that something got messed up, or a setting wasnt set correctly. apparently you can set the boot and one jumper to the one position and that should force the bootloader to start when you press reset. Then you can see if the USB device is recognized
Worked for me! I've never done any microcontroller work and got a bluepill (against advice of the interent) to get started. This tutorial was easy to follow and I got everything working and the example code prints to the serial monitor. Thanks! I'll subscribe too see what else you do with the blue pill.
Followed this and was able to program the 2.2.2 HID bootloader onto a bluepill. It was attached to my linux box and I was able to program it using arduino as described. I was able to upload the blink sketch and it worked fine. What I noticed was that after programming the bootloader and plugging in the device I saw Feb 19 17:35:17 x1-Carbon kernel: [159760.782737] usb 1-4.3: new full-speed USB device number 62 using xhci_hcd Feb 19 17:35:17 x1-Carbon kernel: [159760.896087] usb 1-4.3: New USB device found, idVendor=1209, idProduct=beba Feb 19 17:35:17 x1-Carbon kernel: [159760.896088] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Feb 19 17:35:17 x1-Carbon kernel: [159760.896089] usb 1-4.3: Product: STM32F HID Bootloader Feb 19 17:35:17 x1-Carbon kernel: [159760.896090] usb 1-4.3: Manufacturer: www.serasidis.gr Feb 19 17:35:17 x1-Carbon kernel: [159760.897242] hid-generic 0003:1209:BEBA.002A: hiddev0,hidraw4: USB HID v1.11 Device [www.serasidis.gr STM32F HID Bootloader] on usb-0000:00:14.0-4.3/input0 Subsequent upload required the tty port to be set to ttyACM0, which I found strange but then I noticed that when attached it showed up as a different device. After uploading the blink program and on every new connection of the device I see. Feb 19 17:35:21 x1-Carbon kernel: [159764.903072] usb 1-4.3: USB disconnect, device number 62 Feb 19 17:35:21 x1-Carbon kernel: [159765.142626] usb 1-4.3: new full-speed USB device number 63 using xhci_hcd Feb 19 17:35:21 x1-Carbon kernel: [159765.256541] usb 1-4.3: New USB device found, idVendor=0483, idProduct=5740 Feb 19 17:35:21 x1-Carbon kernel: [159765.256548] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Feb 19 17:35:21 x1-Carbon kernel: [159765.256553] usb 1-4.3: Product: BLUEPILL_F103CB CDC in FS Mode Feb 19 17:35:21 x1-Carbon kernel: [159765.256556] usb 1-4.3: Manufacturer: STMicroelectronics Feb 19 17:35:21 x1-Carbon kernel: [159765.256559] usb 1-4.3: SerialNumber: 8D9022774848 Feb 19 17:35:21 x1-Carbon kernel: [159765.258827] cdc_acm 1-4.3:1.0: ttyACM0: USB ACM device No issues uploading new sketches that blink or use the Serial.println() function. All works fine, but I thought it was strange that the device idVendor changed from 1209 to 0483 ? Looks like newer version of the STM package (1.9) in arduino overwrote the HID bootloader.
It could also be the fact that when you upload an Arduino sketchwith the settings I describe in the video it creates a serial port. It's possible that's what you're detecting since that isn't initially available when you first upload the bootloader
Amazingly simplified Video ever made , I came across ....You are a real Gem knowledge sharing sole ! Keep doing your good work for the community ! is there any similar video for STM8 boards I can refer ?
I am a starter with micro controllers and your video was a great help. But because time goes by I faced the same problems as many people here: after first successful flash from Arduino all later flashes needed the bootloader pin 1 to set. After many hours of research, try and fail, I finally found the solution! I downgraded the version of STM32 core down from 1.9 to 1.8. STM32 core 1.9 and bootloader 2.2.2 may not be compatible, idk. Now I can upload the same reliable and repeatable way as before with Arduino nano.
//Edit: I was able to update core to 1.90. Maybe the root of my problem was solved by installing a driver for STM32 device. My system recognised the pill as a generic serial device that helps Arduino when searching for it.
Ah so COM ports are not required for uploading code, but Arduino complains when there is one on your system and you don't have one selected. Maybe that was the root of your problem
@@CalebMarting yes, but before Installation of the driver the system was not able to recognize the blue pill at all, every time after first flash from Arduino. To be complete here, the device is now a serial device and the port in Arduino fits to it.
Another common problem for Mac user (I know how you feel), if you have tried everything mentioned in the video and it says something like the COM port is busy, try changing the USB-C port with another one. Sometimes it just works.
Thank you for video! ...the issue is that the new STM32 core package produces larger images than the "old" one... So, might be critical for large applications that utilize almost all flash memory; could happen it would not be enough memory to flash a re-compiled app... Also, you do not need Cube to flash bootloader using STLink. You may use STLink utility (available at ST.com) to do it...
Great video Caleb! build_flags = -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC -D USBCON -D USBD_PID -D USBD_VID=0x0483 -D USB_MANUFACTURER="Unknown" -D USB_PRODUCT="\"BLUEPILL_F103C8\"" -D HAL_PCD_MODULE_ENABLED NOTE: -D USBD_PID was required, if you look at the error it's obvious, but that should work as of me typing this.
Thank you for this tutorial. I could make it work under Linux (XUbunut 18.04) but I have some remarks: $ uname -a Linux mybox 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux - The STM32 Cube Programmer doesn't work here under Linux but I could flash the HID bootloader binary without problems using the st-flash utility via my ST-Link clone. I did this outside of the Arduino IDE, it was as simple as "st-flash write hid_generic_pc13.bin 0x08000000" on a blank Blue Pill - The udev rule configuration for proper detection of the HID bootloader as described on the bootloader github should be in place and active before opening the Arduino IDE. - The created virtual COM port seems to jump back and forth (/dev/ttyACM0 and /dev/ttyACM1) if the reset button is pressed or the cable is reconnected. - Using the virtual COM port works only after the flashing. One cannot open the COM port and flash in parallel, e.q. open the serial monitor later. It may even be necessary to change the COM port. - I get kernel messages and error messages inside the IDE regarding the COM port. [ 6021.100121] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr [ 6021.100124] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending. [ 6021.102143] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr [ 6021.102146] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending. [ 6021.104120] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr [ 6021.104123] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending. - Uploading does not always work. It requires retries due to the described "Couldn't locate :BEBA device"), a lot more than anticipated by the video's description. Kernelside device detection looks like this: [ 6021.575132] usb 1-5.1.4: new full-speed USB device number 35 using xhci_hcd [ 6021.676533] usb 1-5.1.4: New USB device found, idVendor=1209, idProduct=beba [ 6021.676538] usb 1-5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 6021.676540] usb 1-5.1.4: Product: STM32F HID Bootloader [ 6021.676542] usb 1-5.1.4: Manufacturer: www.serasidis.gr [ 6021.678371] hid-generic 0003:1209:BEBA.000E: hiddev3,hidraw6: USB HID v1.11 Device [www.serasidis.gr STM32F HID Bootloader] on usb-0000:00:14.0-5.1.4/input0
Important to be persistent with this, I used the usb SWD programmer, stlink v.2 to flash, simply because it was convenient, and I had to finally erase it three times, and then program twice in succession, to get the new HID 2.2.2 bootloader to enumerate correctly on Window 10. Be sure to use a known good usb cable, and I had to use my older 2.0 version USB connector, not my new USB 3.0 ports I added via a PCI-e expansion card Once you get past the initial flash, it will create a serial port that works perfectly as a CDC serial port (COM44 in this particular case). I also tested the hid_flash (v2.2) from the command line like this ... "hid_flash>hid-flash.exe C:\Users anda\AppData\Loca\Temp\arduino_build_363784/Serial_Test_Arduino.ino.bin COM44" All OK! (As always, don't be shy to connect/reconnect the usb cable to power cycle, and/or press the reset button if something appears to hang)
Even though I had uninstalled all smt32-related stuff from the UI, I still had in the `C:\Users\MyUser`Documents\Arduino\Hardware` some folder called Arduino_SMT32-master that I surely put there some day in the past from some other method. That's also the reason why my UI in "Tools" looked different than the one showed by Caleb. Once I deleted the folder, my UI started looking normal again and I was able to select all the right options that he showed. Finally, I had to manually select the right COM port at the time of my second upload and that was it now my Blackpill f103C8T6 works perfectly as the Bluepill shown in the video.
Do any devices show up in the device manager when you plug it in? That's very interesting. Try moving the boot one jumper to the one position and seeing what happens
@@CalebMarting Sorry I edited my comment to make it more concise after I found my mistake, I think you answered to the original one. However... now I tried uploading my own sketch instead of a simple led+Serial and I've lost the COM port that had appeared and I'm unable to program the Blackpill again (the "1209:BEBA" error).
@@CalebMarting I found why my sketch did that: "Wire.setClock(400000L)". Apparently that's the cause. When I don't have it, my bootloader continues working for another round.
If anyone follows this tutorial on MacOS and having the error: hid-flash permission denied, you need to open terminal and add the execution permission to hid-flash file. After that, you can upload the code as in the video.
I have problems !, I get this comment:"Timeout error occured while waiting for acknowledgement. Timeout error occured while waiting for acknowledgement. Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... "
Do you still have this error? If you do I can walk you through a fix. If you join the discord (link is in the description) it would make it a lot easier to show you how to fix it.
EDIT: Okay, I found out how to fix that! In my case it was bad, cheap chineese clone of programator PL2303. If you have one of these, you need to find drivers from 2008 (3.3.2.105). They will work on Windows 10. The new ones just block the chineese versions from working. Aside from that, check all the cables if they stick, and don't forget to choose the correct port, in Cube32Programmer in UART configuration, check if other COM ports appear :)
"Timeout error occured while waiting for acknowledgement. Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again..." how to overcome this problem?
There's a couple possibilities. What causes that error is that your set up for serial upload is wrong. For instance If you don't have the boot zero jumper in the one position and press reset, etc. If you are sure that is all correct, try another blue pill if you have it, sometimes boards just don't work cause defective products still make them money
It seems to still require a port even in HID 2.2 bootloader. Ill try downgrading arduino IDE. Otherwise everything else I followed and it worked. Maybe usb cable.
Hi Your video on STM32F103 is brilliant, it helps a lot. Both programming and native are combined into 1 port after installing the HID bootloader. Appreciate your video. Do you also have a video that guide us on STM32F407 board?
It should be almost exactly the same process, just using the f407 bootloaders instead. I've never used one of those boards though. What are you confused on?
Please, do a vid for latest Black Pill (weact studio v3) with STM32F411CE...find it very hard to even get arduino blinky to work properly, but ST-link/v2 say it uplosded uploaded code..
Very cool, Im more curiouse to know how a bootloader works what it does and why hasnt stm32 done this for convenience? On the otherhand im flashing fine on my stm32 clone(ch32) through its usb port without an additional bootloader although i have to use their tool for flashing. But after all that i found the stlink actually more convenient since i dont have to unplug and reset jumpers everytime like i have to with usb. Its a miracle i havent lost the jumpers the amount of time its popped out on its own while trying to take it out, its not a matter of if, but when...
Im getting “data read fail”, “GetID command not acknowledged” and “read protection” errors on the stm32cube software on all my 5 blue pills, despite it reading the chip information just fine. Any clues as to what may be happening? Great video regardless.
I was stuck with the 'Error - [1209:BEBA] device is not found' issue as well and finally could resolve it by setting the "Tools->Port" in the Arduino IDE to the virtual COM port the bootloader had opened. Regardless the fact that the upload does not need the COM port, Arduino IDE seems to do.
I might not have been as clear as I wanted to be, for whatever reason Arduino needs comport selected, Even when the upload protocol doesn't actually need it
Am i the only one who cannot communicate with bluepill over uart? No matter what i tried, it didnt work. I checked A9 and A10 if they are connected to stm chip with multimeter and yes they are. When it is not bootlader mode it just blinks, when it gets bootloading state no respond at all.
What happens when I am going to use more than 1 blue pill? I have 2 blue pill. 1 is working good but 2 is not recognized by the PC. I did not miss any of the steps mentioned above.
For first upload, I don’t need to select com port. For subsequent uploads, I must select the port or else it will fail to upload. For some weird reasons my led blink program is not working properly. I changed the delay time for “high” to 1200 ms and “low” for 200ms. The blink is working the other way around and seems high on 200ms and low on 1200ms.
I forget, some boards have inverted LEDs just because of the way they were wired. It's possible that's what you got. And yes the com port thing is just a side effect of how the Arduino framework upload is written
You can move the boot1 jumper (the one that isn't touched during install of the bootloader) to the 1 position and reset the board. It should make the boot loader start working again and you can upload code. Make sure that you have USB support turned on when you upload code though or else you will have to keep moving the jumper
I'm running into a weird issue with PlatformIO! I can upload the code to the BluePill but only once than the laptop says "USB device not recognized", if I re-flash the bootloader then I can upload the code again but right after that get the "USB device not recognized" error. To get to upload from PlatformIO all I had to do was add "upload_protocol = hid" in the .ini file.
There's a lot of options that aren't checked when you use platform IO because there's no gui. Go to 8:30 in the video and I have a config that works czcams.com/video/Myon8H111PQ/video.html
I tried the steps till 6:05, but windows did not recognize my bluepill when I plugged it in via usb. Not sure why, wondering if anyone is facing this issue.
After you flash the bootloader you need to hook it back up to the TTL converter and select the COM port and then try uploading in arduino IDE. It then begins to flash something else and it will finally work.
Is there an update to this video? Perhaps a an updated link to proper files? Have tried (and tried) using updated links below But no luck. Boot loader uploads fine. But when I go to program vis USB (HID 2.2), sez it can't find the board. Thx ...
So, yeah, 2k for a bootloader sounds much better. Now just show it in Linux. You might want to note the OS in the vid/title as well. The issue I have had with PlatformI/O is it's slow speed on my old laptop. I'm building a better dual boot machine with W10 atm, but still cringe every time I use windoze. BTW, I have a STM32 playlist (references to other people's stuff, like this vid). One thing I recall seeing/saving is an upload someone did showing how to unlock the full 128k of memory on the 64k limited parts. I haven't tried it, but that looks interesting. Apparently all part numbers within a family of STM32 chips have the same die. I've heard, in the past, the part numbers were used for graded chips, separating them according to what worked/didn't work during production. As the yields have gotten much better they are using fully functional chips to fill orders for lower grade part numbers and just limiting the integrated peripherals in the internal registers, but this can be reversed :-) -Jake
I've looked into doing the 64 to 128 conversion. Haven't ever gotten it working yet though. This should theoretically work with Linux and Mac as well because I believe the STM32 cube prog and hid bootloader work on those systems too. The process should be almost exactly the same. If you ever try it out let me know how it works.
I suppose that was interesting but it was a bit fast for me and I need to look at some lower level stuff first. I thought I saw somewhere that the blue pill had been replaced by a black pill but like I said I need some lower level stuff first.
This should work with black and blue pill boards, I just happen to have blue pills. Thank you for the feedback Edit: to anyone reading this, I was informed that black pills actually refer to F401/f411 boards which this is not compatible with. I am releasing a new tutorial for that
I have tried this and ran into a brick wall when I could not get a CONNECT when clicking on the green button in the STM32CubeProgrammer. I am using a ST-Link32/V2 clone which had been working fine until today. I didn't change anything, but I can no longer program my blue pill with it. I am on W10 and it recognizes the dongle as does STM32CubeProgrammer, which does read the serial number of the dongle. Does anyone have any ideas of how to get this bootloader onto my blue pill? Thanks!
Pls for love of god can you split your links in description to half bc Yt max for links (before changing the link into some crap) is 40 character. All links from the description which have ... at the end are non-copyable without redirection. Even copying the link with the right mouse button and "copy link address" copies the redirect and not the link that is needed.
Hello. Thank you very much for the video. This is excellent. My question is: how do I activate the serial 2 and serial 3? I put it in the ide but it does not compile (it gives me an error)
You are talking about hardware serial right? There is a HardwareSerial constructor so you can do something like HardwareSerial ( rx, tx) Serial2; or something and use it as normal. (Serial2.begin(9600))
@@CalebMarting Thank you very much for your answer, I comment for example: ///////////////////////// void setup () { Serial.begin (9600); Serial1.begin (9600); Serial2.begin (9600); delay (3000); } void loop () {
} ////////////////////////////// error by serial2, according to the pinout this chip has up to serial3 right?
i cant find my st link dongle and i dont have a serial adaptor, i do have a lot of nanos' megas and wemos bits and even something labeled usb asp.......
I haven't quite figured out how to use another mcu as a serial adapter to program, but if you can find a sketch that lets you do it, please let me know! It certainly seems possible but I don't know the speeds
Thank you for this video. My question is whether, after I install this bootloader using the method you describe, will I be able to then compile and upload a sketch that requires the dan brown board manager? What do you think?
static.leaflabs.com/pub/leaflabs/maple-docs/0.0.12/bootloader.html This page says you need to tie pin 2 to ground (boot 0) and in the process would be the same. Although I believe the maple mini comes with a bootloader, and you may want to use their official bootloaders as well
No, The HID bootloader is essentially a sketch that can store more sketches alongside of it. it will run the hid bootloader to start and then it'll start running your uploaded code. because that hid boot loader is always running you won't ever need to move boot zero
Caleb Marting, First thanks for you nice video's. I am a NOOB and have used your guide with Win10, STM32F401, I am using the ST-Link V2 with the latest firmware. My question, is the HID method with the STM32F401 board is not listed under the Binaries I downloaded, it has the STMF103 and the STMF407 but not the F401's. Is there a binary file you can point me to for the correct HID files, I have versions 2.2.2 from the github. I have not been able to get the board to function, When I started, the on board led was blinking and the red led was on, now after trying the STM Cube Programmer to load the binary F407, it just showing the red power light now. I have moved the boot switch to the correct position and after STM cube indicated a download complete, I move the boot switch back to its original position. any pointers appreciated Thanks.
Caleb Marting asked you which library for RSA encryption you recommend me to be compatible with a PHP code and the arduinoST I have tried some but they are for AVR and do not work well with the ST, thank you very much
If you want it to work no matter what platform, you could use a C/C++ library. That way there is no hardware dependency. Something like this maybe: github.com/andrewkiluk/RSA-Library Let me know if that works
// This method did not work for me, I was able to finish the process and load the "Blink" example, but after loading my own code, the PC did not recognize the blue pill board. I have resorted to your previous video (2018), and the previous method has worked for me wonderfully.
Try again but with 1.8 of core and not 1.9. This worked for me. //Edit: I was able to update core to 1.90. Maybe the root of my problem was solved by installing a driver for STM32 device. My system recognizes the pill as a generic serial device that helps Arduino when searching for it.
I possibly had the same problem: My Bluepill could send messages via serial over ttyACM0 but it was not possible to flash it a second time. The bootloader was not active anymore (no fast blinking), but the slow blinking occurred according to the example I had programmed. The Solution was to reset the board (or power it up) while the BOOT1-jumper was set to 1. The other jumper! Then the fast blinking reoccurred and I was able to flash it with HID Bootloader method. After resetting I could set the Jumper back to 0. Thus after reprogramming the board the USB-Serial automatically re-activated. Perhaps this should be added to the instructions. Now I'm very happy with the solution: Small bootloader and defined switching to programming via jumper. No STLink or USBtoSerial adapter needed anymore. Many Thanks Caleb.
I think It uploads fine The first time without a com port selected for me, but then I have to have it selected too. I think the reason is Arduino has an old check that makes sure there's a com port selected when uploading because It was designed for the AVR chips that upload over com
I ask him what is the size of the Bootloader 20Kb? I do a blank satisfaction and it turns out like this void setup () { } void loop () { } Sketch uses 19116 bytes (29%) of program storage space. The maximum is 65536 bytes. Global variables use 3784 bytes (18%) of dynamic memory, leaving 16696 bytes for local variables. The maximum is 20,480 bytes
Unfortunately Arduino just takes up a lot of space by itself, there is stuff in the background to run the loop and setup, as well as other functions etc. That's the price of abstraction with Arduino. The bootloader itself only takes up a tiny little space of that. you'll find this on most chips for instance if you compile for an Arduino Uno, but not necessarily to this extent. If you look at the actual binary files for the bootloader, hid_generic_pc13.bin, it is only 2KB.
Tried 3 times to download the cube software, gave my info then verified through email, it looked like it was doing something but it returned me to original webpage, I have java 8.0 installed on my computer, win 10.
After a full day of trying to get my ST32 to work, you came in clutch. Thank you so much!
How ironic that you uploaded this UPDATE on the very day I was researching how to do this. Thanks for making an UPDATE!
No worries, happy I could help. This UPDATE'S bootloader is a lot more user friendly than my other videos bootloader so it needed to be done. Have fun!
Very useful video, thank you. I solved my bootloader problems with two different STM32 boards within a couple of minutes. Especially the links in description are very useful: all are valid and get the right things I needed. Perfect explanation why and how. Many, many thanks!
I also solved my bootloader problem but what i found out later is that the usb comminication gives trouble with my serial3 connection to my blue tooth module, every time it looses connection with the pc and i have to upload the bootloader again. Do you experiance the same?
Use the PB2 port tied to +3.3V after a RESET. This will kick in the HID Bootloader (even with anything written previously). One also can unplug the USB, tie PB2 to +3.3V, and plug it to the USB port, this also can kick in the HID Bootloader.
wow ,looks like the folks over at STM finally got it together and realized Arduino is here to stay. THANKS
Agreed, if windows doesn't recognize the bluepill just unplug it from power and plug it again several times, it will work.
this video is amazing on so many levels , liked and subbed.
Thank you very much for your guidance. Spent 1.5 days to make STA32 working until I saw your video. Now I am good now. Just FYI, I used STM Flash Loader to flash bootloader and in the Arduino's Upload method I used HID Bootloader 2.2
This is one of the best videos for this, I appreciate the clean look and sound of the video as well.
Thank you! Glad you enjoyed
I had tossed 5 blue pill boards in a drawer after wrestling for days to get them to work with Platform.io back in 2018. I recently got interested in using them with DIY Eurorack synth modules. This procedure & the new bootloader did the trick, even with counterfeit CKS32F103C8T6 microcontrollers on the boards! Thanks for the update!
Thank you! I have a couple of CKS ones as well and they worked fine as well with this. I wonder what doesn't work though lol
Thanks for this! I already had a pile of these lying around, but I haven't used them due to programming being fiddly. Ordered 10 more and will be flashing the new bootloader on all of them.
Sounds awesome! I am amazed at how well this bootloader works so happy to spread the news. Best of luck!
Thanks for such a clear and concise video. First time I've got a blue pill bootloader to work!
Glad it helped!
Thank you, just saw this on reddit, the day after i got the board. Subscribed!
Good timing then. Thank you!
@@CalebMarting Hi Great Vids however after 5 attempts I still get the following error when I try and down load a program : > Searching for [1209:BEBA] device.... Error - [1209:BEBA] device not found
Further to my last Windows device manager reports device on Comm 7 but bootloader is checking comm 5.
@@johnmmcguinness7982 Do you still have this error? If so try flashing the bootloader and uploading any sketch. Before you upload the second time select the boards com port (that would be com 7 for you) in the Arduino IDE and then click upload. It should work this time
You just saved me about 15 hours work! thanks Sooo much man.... works first time, exactly as you have described.... cheeeers!
The first time I uploaded a bootloader it took about 15 hours to figure out how to do it. That's why I started making these, to save people time. Glad it works!
This is fantastic. Thank you so much!! I have updated the boot-loader on all my STM32 boards!
Awesome! Glad you found it useful
Great video! Explained a lot of the basics that other videos skipped over.
thank you for your video, now my 'Blue Pill' work well with Arduino, and serial output it's great to help to display info or debug.
Great job.
Really loved the way you included more or less subtle references to things in the previous video. Like the tweezers thing. :D
"subtle" may be the wrong word for it :p
@@CalebMarting "more or less" :)
":)"
Thank you very much. Worked like a charm!
tHANK YOU VERY VERY SO MUCH!! yOU ARE THE ONE!! Including Serasidis of course (The Greek One)!!!
Thank you!
Nice! I was able to program my Blue Pill a while ago then something happened and I just kept getting errors. This video inspired me to clean up my IDE and set everything up again.
By following your instructions I was able to get it all working again.
Now I need to see if I can program a little 32F030F4P6 board I got a while ago.
Good luck! Glad it worked
@@CalebMarting Last night I opened up Serial Monitor WHILE uploading a sketch and the Bluepill could no longer be recognized as a usable USB device on ANY computer so I went through the process in this video again and now it works.
It's possible that something got messed up, or a setting wasnt set correctly. apparently you can set the boot and one jumper to the one position and that should force the bootloader to start when you press reset. Then you can see if the USB device is recognized
@@CalebMarting OK. If it happens again I'll set both jumpers and reset to see if it works.
Re-flashing the bootloader isn't difficult anyway.
When adding board i get the "depreciated please use new package index stm32 cores"
Worked for me! I've never done any microcontroller work and got a bluepill (against advice of the interent) to get started. This tutorial was easy to follow and I got everything working and the example code prints to the serial monitor. Thanks! I'll subscribe too see what else you do with the blue pill.
Followed this and was able to program the 2.2.2 HID bootloader onto a bluepill. It was attached to my linux box and I was able to program it using arduino as described. I was able to upload the blink sketch and it worked fine.
What I noticed was that after programming the bootloader and plugging in the device I saw
Feb 19 17:35:17 x1-Carbon kernel: [159760.782737] usb 1-4.3: new full-speed USB device number 62 using xhci_hcd
Feb 19 17:35:17 x1-Carbon kernel: [159760.896087] usb 1-4.3: New USB device found, idVendor=1209, idProduct=beba
Feb 19 17:35:17 x1-Carbon kernel: [159760.896088] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 19 17:35:17 x1-Carbon kernel: [159760.896089] usb 1-4.3: Product: STM32F HID Bootloader
Feb 19 17:35:17 x1-Carbon kernel: [159760.896090] usb 1-4.3: Manufacturer: www.serasidis.gr
Feb 19 17:35:17 x1-Carbon kernel: [159760.897242] hid-generic 0003:1209:BEBA.002A: hiddev0,hidraw4: USB HID v1.11 Device [www.serasidis.gr STM32F HID Bootloader] on usb-0000:00:14.0-4.3/input0
Subsequent upload required the tty port to be set to ttyACM0, which I found strange but then I noticed that when attached it showed up as a different device. After uploading the blink program and on every new connection of the device I see.
Feb 19 17:35:21 x1-Carbon kernel: [159764.903072] usb 1-4.3: USB disconnect, device number 62
Feb 19 17:35:21 x1-Carbon kernel: [159765.142626] usb 1-4.3: new full-speed USB device number 63 using xhci_hcd
Feb 19 17:35:21 x1-Carbon kernel: [159765.256541] usb 1-4.3: New USB device found, idVendor=0483, idProduct=5740
Feb 19 17:35:21 x1-Carbon kernel: [159765.256548] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 19 17:35:21 x1-Carbon kernel: [159765.256553] usb 1-4.3: Product: BLUEPILL_F103CB CDC in FS Mode
Feb 19 17:35:21 x1-Carbon kernel: [159765.256556] usb 1-4.3: Manufacturer: STMicroelectronics
Feb 19 17:35:21 x1-Carbon kernel: [159765.256559] usb 1-4.3: SerialNumber: 8D9022774848
Feb 19 17:35:21 x1-Carbon kernel: [159765.258827] cdc_acm 1-4.3:1.0: ttyACM0: USB ACM device
No issues uploading new sketches that blink or use the Serial.println() function. All works fine, but I thought it was strange that the device idVendor changed from 1209 to 0483 ? Looks like newer version of the STM package (1.9) in arduino overwrote the HID bootloader.
It could also be the fact that when you upload an Arduino sketchwith the settings I describe in the video it creates a serial port. It's possible that's what you're detecting since that isn't initially available when you first upload the bootloader
Thank you very much very good your tutorial worked perfect you unless my stm32 do not go to the trash
Amazingly simplified Video ever made , I came across ....You are a real Gem knowledge sharing sole ! Keep doing your good work for the community !
is there any similar video for STM8 boards I can refer ?
I haven't used any STM 8 boards so I'm not sure, if you need any help though I'm sure the process is similar
I am a starter with micro controllers and your video was a great help.
But because time goes by I faced the same problems as many people here: after first successful flash from Arduino all later flashes needed the bootloader pin 1 to set.
After many hours of research, try and fail, I finally found the solution!
I downgraded the version of STM32 core down from 1.9 to 1.8.
STM32 core 1.9 and bootloader 2.2.2 may not be compatible, idk.
Now I can upload the same reliable and repeatable way as before with Arduino nano.
//Edit: I was able to update core to 1.90. Maybe the root of my problem was solved by installing a driver for STM32 device. My system recognised the pill as a generic serial device that helps Arduino when searching for it.
Ah so COM ports are not required for uploading code, but Arduino complains when there is one on your system and you don't have one selected.
Maybe that was the root of your problem
@@CalebMarting yes, but before Installation of the driver the system was not able to recognize the blue pill at all, every time after first flash from Arduino. To be complete here, the device is now a serial device and the port in Arduino fits to it.
Another common problem for Mac user (I know how you feel), if you have tried everything mentioned in the video and it says something like the COM port is busy, try changing the USB-C port with another one. Sometimes it just works.
Thanks a lot. I got my first stm32 project.
Thank you for video! ...the issue is that the new STM32 core package produces larger images than the "old" one... So, might be critical for large applications that utilize almost all flash memory; could happen it would not be enough memory to flash a re-compiled app...
Also, you do not need Cube to flash bootloader using STLink. You may use STLink utility (available at ST.com) to do it...
Great video Caleb!
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
-D USBD_PID
-D USBD_VID=0x0483
-D USB_MANUFACTURER="Unknown"
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
-D HAL_PCD_MODULE_ENABLED
NOTE: -D USBD_PID
was required, if you look at the error it's obvious, but that should work as of me typing this.
very cool, i had so much trouble with this in the past
Thank you for this tutorial.
I could make it work under Linux (XUbunut 18.04) but I have some remarks:
$ uname -a
Linux mybox 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
- The STM32 Cube Programmer doesn't work here under Linux but I could flash the HID bootloader binary without problems using the st-flash utility via my ST-Link clone. I did this outside of the Arduino IDE, it was as simple as "st-flash write hid_generic_pc13.bin 0x08000000" on a blank Blue Pill
- The udev rule configuration for proper detection of the HID bootloader as described on the bootloader github should be in place and active before opening the Arduino IDE.
- The created virtual COM port seems to jump back and forth (/dev/ttyACM0 and /dev/ttyACM1) if the reset button is pressed or the cable is reconnected.
- Using the virtual COM port works only after the flashing. One cannot open the COM port and flash in parallel, e.q. open the serial monitor later. It may even be necessary to change the COM port.
- I get kernel messages and error messages inside the IDE regarding the COM port.
[ 6021.100121] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[ 6021.100124] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
[ 6021.102143] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[ 6021.102146] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
[ 6021.104120] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[ 6021.104123] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
- Uploading does not always work. It requires retries due to the described "Couldn't locate :BEBA device"), a lot more than anticipated by the video's description.
Kernelside device detection looks like this:
[ 6021.575132] usb 1-5.1.4: new full-speed USB device number 35 using xhci_hcd
[ 6021.676533] usb 1-5.1.4: New USB device found, idVendor=1209, idProduct=beba
[ 6021.676538] usb 1-5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6021.676540] usb 1-5.1.4: Product: STM32F HID Bootloader
[ 6021.676542] usb 1-5.1.4: Manufacturer: www.serasidis.gr
[ 6021.678371] hid-generic 0003:1209:BEBA.000E: hiddev3,hidraw6: USB HID v1.11 Device [www.serasidis.gr STM32F HID Bootloader] on usb-0000:00:14.0-5.1.4/input0
this was awesome :) works with mac too after installing stm32cubeprog for mac
That's why I love the HID bootloader so much more. No drivers and it just (usually) works
Important to be persistent with this, I used the usb SWD programmer, stlink v.2 to flash, simply because it was convenient, and I had to finally erase it three times, and then program twice in succession, to get the new HID 2.2.2 bootloader to enumerate correctly on Window 10.
Be sure to use a known good usb cable, and I had to use my older 2.0 version USB connector, not my new USB 3.0 ports I added via a PCI-e expansion card
Once you get past the initial flash, it will create a serial port that works perfectly as a CDC serial port (COM44 in this particular case).
I also tested the hid_flash (v2.2) from the command line like this ...
"hid_flash>hid-flash.exe C:\Users
anda\AppData\Loca\Temp\arduino_build_363784/Serial_Test_Arduino.ino.bin COM44"
All OK!
(As always, don't be shy to connect/reconnect the usb cable to power cycle, and/or press the reset button if something appears to hang)
Even though I had uninstalled all smt32-related stuff from the UI, I still had in the `C:\Users\MyUser`Documents\Arduino\Hardware` some folder called Arduino_SMT32-master that I surely put there some day in the past from some other method. That's also the reason why my UI in "Tools" looked different than the one showed by Caleb. Once I deleted the folder, my UI started looking normal again and I was able to select all the right options that he showed. Finally, I had to manually select the right COM port at the time of my second upload and that was it now my Blackpill f103C8T6 works perfectly as the Bluepill shown in the video.
Do any devices show up in the device manager when you plug it in? That's very interesting. Try moving the boot one jumper to the one position and seeing what happens
@@CalebMarting Sorry I edited my comment to make it more concise after I found my mistake, I think you answered to the original one.
However... now I tried uploading my own sketch instead of a simple led+Serial and I've lost the COM port that had appeared and I'm unable to program the Blackpill again (the "1209:BEBA" error).
@@CalebMarting I found why my sketch did that: "Wire.setClock(400000L)". Apparently that's the cause. When I don't have it, my bootloader continues working for another round.
The way you address the comments section is hilarious!
Fabulous video, i am a fan of the blue pill.
Great job! Thanks You a lot. Finally easy un following story to do it properly! Thumbs up from me!
Yeah I tried to cover the edge cases and compress it a decent amount. Glad you found it useful!
The PIO instructions need another build flag for me: -D USB_PID=0x0100 was needed. Thanks
If anyone follows this tutorial on MacOS and having the error: hid-flash permission denied, you need to open terminal and add the execution permission to hid-flash file. After that, you can upload the code as in the video.
That would be a good thing to make an issue for in the GitHub repo. Thanks for bringing that up!
I have problems !, I get this comment:"Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
"
Do you still have this error? If you do I can walk you through a fix. If you join the discord (link is in the description) it would make it a lot easier to show you how to fix it.
Just click the reset button and retry... you have to listen carefully the explanations in the video before posting !
EDIT: Okay, I found out how to fix that! In my case it was bad, cheap chineese clone of programator PL2303. If you have one of these, you need to find drivers from 2008 (3.3.2.105). They will work on Windows 10. The new ones just block the chineese versions from working. Aside from that, check all the cables if they stick, and don't forget to choose the correct port, in Cube32Programmer in UART configuration, check if other COM ports appear :)
Muito obrigado. Realmente funcionou dessa forma.
Thanks for the useful video BTW
"Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again..." how to overcome this problem?
There's a couple possibilities. What causes that error is that your set up for serial upload is wrong. For instance If you don't have the boot zero jumper in the one position and press reset, etc. If you are sure that is all correct, try another blue pill if you have it, sometimes boards just don't work cause defective products still make them money
DUDE - Thank you so much!!!
It seems to still require a port even in HID 2.2 bootloader. Ill try downgrading arduino IDE. Otherwise everything else I followed and it worked. Maybe usb cable.
Bro you are the king
Muito obrigado pelo excelente tutorial.
you're the best! thank you
Thank you from Brazil bro!
Np bro 😂
Hi
Your video on STM32F103 is brilliant, it helps a lot. Both programming and native are combined into 1 port after installing the HID bootloader. Appreciate your video.
Do you also have a video that guide us on STM32F407 board?
It should be almost exactly the same process, just using the f407 bootloaders instead. I've never used one of those boards though. What are you confused on?
Please, do a vid for latest Black Pill (weact studio v3) with STM32F411CE...find it very hard to even get arduino blinky to work properly, but ST-link/v2 say it uplosded uploaded code..
Thank you for your great video! Can I use the same STM32 HID Bootloader 2.2.2 for an STM32F405RGT6?
Hello im arduino uno comanication to stM32f103 ,after cod uplord come erro is compling for stm32 series
Very cool, Im more curiouse to know how a bootloader works what it does and why hasnt stm32 done this for convenience? On the otherhand im flashing fine on my stm32 clone(ch32) through its usb port without an additional bootloader although i have to use their tool for flashing. But after all that i found the stlink actually more convenient since i dont have to unplug and reset jumpers everytime like i have to with usb. Its a miracle i havent lost the jumpers the amount of time its popped out on its own while trying to take it out, its not a matter of if, but when...
Im getting “data read fail”, “GetID command not acknowledged” and “read protection” errors on the stm32cube software on all my 5 blue pills, despite it reading the chip information just fine. Any clues as to what may be happening? Great video regardless.
I was stuck with the 'Error - [1209:BEBA] device is not found' issue as well and finally could resolve it by setting the "Tools->Port" in the Arduino IDE to the virtual COM port the bootloader had opened. Regardless the fact that the upload does not need the COM port, Arduino IDE seems to do.
I might not have been as clear as I wanted to be, for whatever reason Arduino needs comport selected, Even when the upload protocol doesn't actually need it
If I upload a bootloader in stm 32. After uploading does I still need a programme or st link to program the board. I new with mcu's. So please clear
Am i the only one who cannot communicate with bluepill over uart? No matter what i tried, it didnt work. I checked A9 and A10 if they are connected to stm chip with multimeter and yes they are. When it is not bootlader mode it just blinks, when it gets bootloading state no respond at all.
Do you have another blue pill you can test with? Sometimes there are defective blue pills, the chips on them especially
hi, the cube programmer log says ST-LINK error (DEV_CONNECT_ERR) when i try to connect my st link, what do i do for it to connect successfully?
thank you very much...!!!
The Github link in the description is broken and not valid anymore.
What happens when I am going to use more than 1 blue pill? I have 2 blue pill. 1 is working good but 2 is not recognized by the PC. I did not miss any of the steps mentioned above.
For first upload, I don’t need to select com port. For subsequent uploads, I must select the port or else it will fail to upload. For some weird reasons my led blink program is not working properly. I changed the delay time for “high” to 1200 ms and “low” for 200ms. The blink is working the other way around and seems high on 200ms and low on 1200ms.
I forget, some boards have inverted LEDs just because of the way they were wired. It's possible that's what you got. And yes the com port thing is just a side effect of how the Arduino framework upload is written
Thanks.
Btw, I try loading another sketch and it doesn’t recognize the com port anymore. I redo the bootloader and never get back to work.
You can move the boot1 jumper (the one that isn't touched during install of the bootloader) to the 1 position and reset the board. It should make the boot loader start working again and you can upload code. Make sure that you have USB support turned on when you upload code though or else you will have to keep moving the jumper
Caleb Marting thanks. I redo the flashing via cube programmer and it works again. Now uploaded more than ten times without issues. Thanks.
I'm running into a weird issue with PlatformIO! I can upload the code to the BluePill but only once than the laptop says "USB device not recognized", if I re-flash the bootloader then I can upload the code again but right after that get the "USB device not recognized" error.
To get to upload from PlatformIO all I had to do was add "upload_protocol = hid" in the .ini file.
There's a lot of options that aren't checked when you use platform IO because there's no gui. Go to 8:30 in the video and I have a config that works
czcams.com/video/Myon8H111PQ/video.html
I tried the steps till 6:05, but windows did not recognize my bluepill when I plugged it in via usb. Not sure why, wondering if anyone is facing this issue.
Does it not recognize the pill, or does it even know a device is plugged in? Maybe try another USB cable, some don't have data lines
device not found... i geneuenly despise this, it was working before, the data sent is good, the data read is good.
NOT WORKING!!! My Arduino IDE throws an error saying "Failed uploading: no upload port provided". I used ST-Link V2
After you flash the bootloader you need to hook it back up to the TTL converter and select the COM port and then try uploading in arduino IDE. It then begins to flash something else and it will finally work.
Is there an update to this video? Perhaps a an updated link to proper files? Have tried (and tried) using updated links below But no luck. Boot loader uploads fine. But when I go to program vis USB (HID 2.2), sez it can't find the board. Thx ...
Can you update your guide for ver 2.01 Arduino IDE, please, Thanks
The "Additional Board Manager URL" link is broken
So, yeah, 2k for a bootloader sounds much better. Now just show it in Linux. You might want to note the OS in the vid/title as well.
The issue I have had with PlatformI/O is it's slow speed on my old laptop. I'm building a better dual boot machine with W10 atm, but still cringe every time I use windoze.
BTW, I have a STM32 playlist (references to other people's stuff, like this vid). One thing I recall seeing/saving is an upload someone did showing how to unlock the full 128k of memory on the 64k limited parts. I haven't tried it, but that looks interesting. Apparently all part numbers within a family of STM32 chips have the same die. I've heard, in the past, the part numbers were used for graded chips, separating them according to what worked/didn't work during production. As the yields have gotten much better they are using fully functional chips to fill orders for lower grade part numbers and just limiting the integrated peripherals in the internal registers, but this can be reversed :-)
-Jake
I've looked into doing the 64 to 128 conversion. Haven't ever gotten it working yet though. This should theoretically work with Linux and Mac as well because I believe the STM32 cube prog and hid bootloader work on those systems too. The process should be almost exactly the same. If you ever try it out let me know how it works.
For STlink V2, which position should the jumper set during loading the hid library file?
I suppose that was interesting but it was a bit fast for me and I need to look at some lower level stuff first. I thought I saw somewhere that the blue pill had been replaced by a black pill but like I said I need some lower level stuff first.
This should work with black and blue pill boards, I just happen to have blue pills. Thank you for the feedback
Edit: to anyone reading this, I was informed that black pills actually refer to F401/f411 boards which this is not compatible with. I am releasing a new tutorial for that
Is this tutorial to use stm with Arduino IDE, or to use it with stm cube and cube programmer via usb?
it work well...thank you
Here is transcript of platformio.ini:
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = hid
;upload_port = COM17
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
-D USB_VID=0x0483
-D USB_MANUFACTURER="Unknown"
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
-D HAL_PCD_MODULE_ENABLED
It works without upload_port defined for me.
Is this bootloader version still the most current for STM32?
I have tried this and ran into a brick wall when I could not get a CONNECT when clicking on the green button in the STM32CubeProgrammer. I am using a ST-Link32/V2 clone which had been working fine until today. I didn't change anything, but I can no longer program my blue pill with it. I am on W10 and it recognizes the dongle as does STM32CubeProgrammer, which does read the serial number of the dongle. Does anyone have any ideas of how to get this bootloader onto my blue pill? Thanks!
Maybe the clock and data lines were reversed? Otherwise maybe try upgrading the firmware or plugging in the USB and ommiting the 3.3 line
Great video man. I have a question. will this also work with cube programmer? I mean can I flash .bin files with cube programmer using the USB?
Unfortunately it will not. It won't recognize anything but the default bootloaders on the chip, the ones in ROM
I love you! Thanks!
and I love you too random citizen! -Metro Man, 2010
Pls for love of god can you split your links in description to half bc Yt max for links (before changing the link into some crap) is 40 character. All links from the description which have ... at the end are non-copyable without redirection. Even copying the link with the right mouse button and "copy link address" copies the redirect and not the link that is needed.
Hi, the forum link are 404.
Thanks 😊
Hello. Thank you very much for the video. This is excellent. My question is: how do I activate the serial 2 and serial 3?
I put it in the ide but it does not compile (it gives me an error)
You are talking about hardware serial right? There is a HardwareSerial constructor so you can do something like HardwareSerial ( rx, tx) Serial2; or something and use it as normal. (Serial2.begin(9600))
@@CalebMarting Thank you very much for your answer, I comment for example:
/////////////////////////
void setup ()
{
Serial.begin (9600);
Serial1.begin (9600);
Serial2.begin (9600);
delay (3000);
}
void loop () {
}
//////////////////////////////
error by serial2, according to the pinout this chip has up to serial3 right?
@@CalebMarting
HardwareSerial Serial2( PA3, PA2) ;
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
Serial2.begin(9600);
delay(3000);
}
void loop() {
}
i cant find my st link dongle and i dont have a serial adaptor, i do have a lot of nanos' megas and wemos bits and even something labeled usb asp.......
I haven't quite figured out how to use another mcu as a serial adapter to program, but if you can find a sketch that lets you do it, please let me know! It certainly seems possible but I don't know the speeds
Thank you for this video. My question is whether, after I install this bootloader using the method you describe, will I be able to then compile and upload a sketch that requires the dan brown board manager? What do you think?
I believe you can use the HID bootloader with the dan brown core but have not tried
Hi, Great Tutorial. How can we do the same thing to Maple mini which does have any jumpers ?
static.leaflabs.com/pub/leaflabs/maple-docs/0.0.12/bootloader.html
This page says you need to tie pin 2 to ground (boot 0) and in the process would be the same. Although I believe the maple mini comes with a bootloader, and you may want to use their official bootloaders as well
@@CalebMarting YES that worked, Thanks
I had to use STLink utility to flash the bootloader. STProgrammer just doesn't work. It's well known that most ST's software is plain crap.
Thanks for the video. One question, with HID bootloader, do you still need to move the boot0 jumper each time when uploading the sketch?
No, The HID bootloader is essentially a sketch that can store more sketches alongside of it. it will run the hid bootloader to start and then it'll start running your uploaded code. because that hid boot loader is always running you won't ever need to move boot zero
Caleb Marting, First thanks for you nice video's. I am a NOOB and have used your guide with Win10, STM32F401, I am using the ST-Link V2 with the latest firmware. My question, is the HID method with the STM32F401 board is not listed under the Binaries I downloaded, it has the STMF103 and the STMF407 but not the F401's. Is there a binary file you can point me to for the correct HID files, I have versions 2.2.2 from the github. I have not been able to get the board to function, When I started, the on board led was blinking and the red led was on, now after trying the STM Cube Programmer to load the binary F407, it just showing the red power light now. I have moved the boot switch to the correct position and after STM cube indicated a download complete, I move the boot switch back to its original position.
any pointers appreciated Thanks.
czcams.com/video/b1123kz_3MM/video.html I have a guide specifically for that chip
Caleb Marting asked you which library for RSA encryption you recommend me to be compatible with a PHP code and the arduinoST I have tried some but they are for AVR and do not work well with the ST, thank you very much
If you want it to work no matter what platform, you could use a C/C++ library. That way there is no hardware dependency. Something like this maybe: github.com/andrewkiluk/RSA-Library
Let me know if that works
// This method did not work for me, I was able to finish the process and load the "Blink" example, but after loading my own code, the PC did not recognize the blue pill board. I have resorted to your previous video (2018), and the previous method has worked for me wonderfully.
Try again but with 1.8 of core and not 1.9. This worked for me.
//Edit: I was able to update core to 1.90. Maybe the root of my problem was solved by installing a driver for STM32 device. My system recognizes the pill as a generic serial device that helps Arduino when searching for it.
I possibly had the same problem: My Bluepill could send messages via serial over ttyACM0 but it was not possible to flash it a second time. The bootloader was not active anymore (no fast blinking), but the slow blinking occurred according to the example I had programmed. The Solution was to reset the board (or power it up) while the BOOT1-jumper was set to 1. The other jumper! Then the fast blinking reoccurred and I was able to flash it with HID Bootloader method. After resetting I could set the Jumper back to 0. Thus after reprogramming the board the USB-Serial automatically re-activated. Perhaps this should be added to the instructions.
Now I'm very happy with the solution: Small bootloader and defined switching to programming via jumper. No STLink or USBtoSerial adapter needed anymore. Many Thanks Caleb.
@@raulkompass2773 Thanks dude : )
In my case, I have to choose a COM port in order for the uploading process to be successful. Do you know why that is?
I think It uploads fine The first time without a com port selected for me, but then I have to have it selected too. I think the reason is Arduino has an old check that makes sure there's a com port selected when uploading because It was designed for the AVR chips that upload over com
I ask him what is the size of the Bootloader 20Kb?
I do a blank satisfaction and it turns out like this
void setup () {
}
void loop () {
}
Sketch uses 19116 bytes (29%) of program storage space. The maximum is 65536 bytes.
Global variables use 3784 bytes (18%) of dynamic memory, leaving 16696 bytes for local variables. The maximum is 20,480 bytes
Unfortunately Arduino just takes up a lot of space by itself, there is stuff in the background to run the loop and setup, as well as other functions etc. That's the price of abstraction with Arduino. The bootloader itself only takes up a tiny little space of that. you'll find this on most chips for instance if you compile for an Arduino Uno, but not necessarily to this extent.
If you look at the actual binary files for the bootloader, hid_generic_pc13.bin, it is only 2KB.
thank you
Definitely an update !
Tried 3 times to download the cube software, gave my info then verified through email, it looked like it was doing something but it returned me to original webpage, I have java 8.0 installed on my computer, win 10.
seems like stm website bugged, however i got the software when i signed up and logged in