Wasted most of an evening trying to get this working, so, a couple of tips. 1) If you can't connect, this could be because the SWD pins are not configured as debug. To connect, set the ST-LINK utility to 'Connect Under Reset" in Target>Settings. Press and hold the Blue Pill reset button. Select Target>Connect. Release the reset button and it should connect. 2) To stop this happening, in STM32Cube, set PA13 and PA14 to SWDIO and SWCLK respectivley, and in the System Core>SYS settings set Debug to Serial Wire.
Great video and a real life saver. My ST-LINK v2 clone came with a pin out printed on the case with 2 - SWDIO, 4 - GND, 6 - SWCLK, 8 - 3.3V but it turns out having watched your video that the board inside matches your programmer. Having spent several hours chasing rabbits down holes it all just magically started working when wired up the way you have it. Thanks!
when i first watched this video a couple of months ago i had no idea what was going on however now that i read a bit about how old computers worked (the terminal & computer communication), now i understand that you have a computer (the STM32 blue pill board) which is communicating to a terminal (the FTDI hooked up to your PC) cool stuff! i'm learning how to write an operating system and i hope to be able to use it a bit like bash and have an SD card as the "hard drive"
I still use it. A friend of mine wrote one for the STM205/405 family that can be found by searching Space-Time Productions Forth STM205. It is a fig Forth so all the old stuff is (mostly) valid. Some new stuff has been added. All in 16K of Flash. Also one for the LPC1114/1115 family.
Forth is extendable so you make up words as you go along. This makes everybody's Forth different. The Mecrisp word-set has all the code needed to build any program. : ms 0 ?do #1000 0 do nop loop loop ; : seconds #1000 * ms ; : beep 07 emit ; If you're a beginner to Forth you should have a look at the Scamp board which has all the support words needed already coded onboard. Check out some of my recent videos.
I get this: Can not connect to target pleas select "connect under reset" mode from target-> settings menu and ty again. if you re trying to connect to a low freq app pls select lower SWD freq. mode from target->menu settings. There are no such options
@@0033mer dude your freaking fast. but it was not that (the st-link did not work), the programmer hat an old firmware that was not supported. You can flash it, but only if you re-plug it in and hit connect to device in the firmware flasher at the same instance
I am using STlink V2 programmer and Arduino IDE to program the Blue Pill board. Even after uploading the code the LED is not blinking. Can you please help me resolve this issue?
I am new to this. I am trying to install the bootloader for a adafruit feather. Everything was fine untill the address box did not have what yours did so the target memory was not full. I changed it to yours and it filled the box. The size box would not let me copy yours! I hit the program and verify as you did, got the next box and told it the file to install. Next a box came up saying programming error 0x00000000. in the box under the code- No onchip verification function found/ Error occured during program operation!/Programming error @: 0x00000000. Any help? Do you think you can tell me what I have wrong? Thanks for the video.
Hey, i have the problem with my rc transmitter that after the usb port broke of and i repaired it, that it wont connect anymore to pc it just show up a second and says connection failed or so. Know i have ssen that i have on the mainboard some extra solderpads (gnd, 5v, 3.3, dio and clk) so would it be possible to connect it with the dongle and look inside the chip if something failed there and maybe erase and reflash it would help? Would be grea if you could answer :) cheers
Hi, I have used nucleo boards before. with this blue pill, i have few basic queries. 1. Shall i use STM32 IDE to write my programs & flash using it? 2. I went through lot of tutorials & used stmduino with FTDI chip to flash maple boot loader into blue pill. will i be still able to use STM V2 dongle to program further? 3. I dont want to use arduino IDE for flashing/writing programs. I want to use STM way of programming [as in peripherals examples provided by STM] any help would be much appreciated! Thanks in advance. BR, Anantha R
If you are serious about getting familiar with STM microcontrollers use STM32 Cube for programming and STM32 Cube programmer for programming. The Nucleo board has the ST Link programmer onboard so you don't have to buy a dongle.
Hi, I've got the same blue-pill, faulty possibly. Because, the SWD is connected while the RESET button is being pressed down. Otherwise, no connection of SWD. Any idea with that ? Something wrong the hardware
@@0033mer oh, yes, that is what i did yesterday. I used pure vodka to brush the chip. For now it works. It responds 128k flash. Actually, it was stm32f103cb, it was not stm32f103c8. It cost $2. That is why the chip was not cleaned by spirits / chemicals to remove the soldering dusts. Thanks for your support
SWD was done via st-utility on windows 10. file.bin programmed with OK. But, in Ubuntu, via cmd line as st-flash write me.bin 0x08000000 did not work. I wonder why ! st-info --probe was OK that says it has 128k flash 20k ram. Any idea with that ?
No .. SWD is a two wire interface used for programming and debugging. It is basically an alternative JTAG. If you want to use the SWD for debugging check out the Black Magic Probe.
It's been a while since I watched a tech video on RUclips that made something much clearer. RUclips is flooded with children who are playing with micro controllers and have very little understanding of what they are doing. I am really grateful to your clear presentation, and thoughtful choice of what to highlight. A question. How do you compile code and can you step through your code (hardware debug) on the blue pill?
Thanks for the feedback! I program in Forth which has a built in debugger. In Forth you compile small chunks of code called words. These words are tested and then used as building blocks to make up your program. The onboard Forth contains the compiler, interpreter and assembler running on the blue pill. To debug, all words can be run independently on the command line and tested thoroughly. All my videos that involve microcontrollers and coding are written in Forth.
Excellet explanation. I have st-link and ftdi board, so could I use my st-Vlink as ftdi to make the same as described on video or not? Why did you use ftdi if you have programmed bluepii to be used through its usb?
The ST dongle is used to program a hex file into flash memory using ST-link. The FTDI was used to test out the software I uploaded ( Forth compiler ). The FTDI is not used for programming.
0033mer thanks to answer me :) So, why are they using ftdi with arduino (e.g pro mini) to upload their sketchs? St -link means upload just a .hex file direct to chip, instead ftdi with compile inside arduino's ide?
The Arduino UNO and Nano have an onboard FTDI and the Pro Mini does not so you need to supply your own. ST-link is for STMicroelectronics ARM micros and the Arduino IDE is for Atmel AVR micros. The Arduino has an onboard bootloader and loads the sketches via the FTDI. STM32 micros use ST-link to load hex files to the Arm micro.
0033mer I got this board on video and I would like to know if I can upload any .hex to it, with st-link adapter, even if it comes with factory or arduino' bootloader. Of course I have a ftdi adapter, but someone has uploaded a.hex using st-link adapter, instead ftdi and I don't know how bootloader it has.
If you have a Bluepill module you can upload a hex file using the ST dongle via SWD or you can upload a hex file through the serial port using a FTDI. Pick the one that is easiest for you. ruclips.net/video/8qevASRjjEs/видео.html
Thanks for doing this video, Bloody Ebay ST Link pinouts were labelled wrong and I wasted half an hour before finding your video. Swapped the wires around and worked perfectly.
Your video is very informative sir. But which software your using for programming sir. Keil or arduino.?one more doubt. It's possible to use stm32 controller without using cube mx software sir?
The software can't connect to the st-link. I got it off the usual suspects over at aliexpress, so it's probably real fake. Any suggestions other than paying out the nose for the real thing?
If you get no response at all from your computer when you plug in the dongle, it has failed. I have seen dongles that have been mislabeled or the wrong driver has been installed. You can use a Discovery board as a programmer or use the serial bootloader. ruclips.net/video/8qevASRjjEs/видео.html
Hi, I like your presentation style and that’s why I am writing to you. I’m an old novice with some experience in microprocessors (Motorola 6800) back in the 70’s. I would like to start learning again as I have a couple of water pumps I need to control. Two questions:- would this “pill device” be suitable and where can I get the resources to learn to write a simple program and load the device? I have programmed in machine code previously.
The Arduino UNO/Nano and the STM32 ARM Blue-pill are the best cost effective platforms to start with. The Arduino would have the smaller learning curve as compared to the ARM Blue-pill. Once you grasp the Arduino IDE you can also use it to program the Blue-Pill. I also have done a lot of assembler/machine coding on the 6805 and many other micros of the 70's. The programming language I use in all my videos is Forth which was popular in the 70's. Arduino or the Blue-pill would be suitable for your project and there is lot of free software and tutorials online.
Great video , very good explanation , by the way , can you provide me with the link that you used to buy your Stm32 bluepill module ? I have ordered 4 modules till now but they all came with a flash size of 128kbytes , but i need the 64kbyte version of this module . I am finding a hard time to find the right one , so if I would appreciate it a lot if you can help me .
The STM32F103C8 has 64K while the STM32F103CB has 128K Flash. To keep the manufacturing cost effective STMicroelectronics uses the same die for both parts so all STM32F103C8 devices have 128K but the upper half 64K is not tested and not guaranteed, and labelled as STM32F103C8. Manufacturing of Bluepill devices is slowing down so you might want to look into the Blackpill STM32f411. Here is a link where I got my Bluepills: www.banggood.com/STM32F103C8T6-System-Board-Imported-SCM-Core-Board-STM32-ARM-Development-Board-p-1825857.html?cur_warehouse=CN&rmmds=search
Use ST-LINK utility to erase the flash memory to bring it to factory settings. Mecrisp is a programming language (Forth) and an operating system that runs onboard the microcontroller. sourceforge.net/projects/mecrisp/files/
I downloaded en.stsw-link004.zip and unzipped it. I ran the install STM32 ST-LINK Utility v4.5.0.exe and all I got were PDF files for the utility. No software installed. Is there some other way to load a serial loader program on a Blue-pill?
hi, i use stm32f103c8t6 and i loaded bootloader this microcontroller succesfully.Now i can program with Arduino IDE and i use Usb cable.But i want to back former state it and i want to program with st-link. I read many articles ,i didn't fix this.How can i fix it?
Very nice and thank you, i have not written in forth in a long time and it is nice to see it still lives :-) ----------- What about ALGOL and FORTRAN ------------ Guess most of viewer have never heard of them, Oh god i am really that old and boring :-)
0033mer , I can do complex (I developed on msp430 for a long time). But I'd rather not. Which is why I'd like to use the Arduino libraries. Debugging the same would be nice.
All the tools needed to program a STM Nucleo board are included in the Cube IDE. The bluepill can also be programmed using Cube IDE with Keil. Check out this video: ruclips.net/video/KVtom8IzV_Q/видео.html
@@0033mer Thank you very much for returning. I managed to flash using Keil, but using Cube IDE I always get this error: Open On-Chip Debugger 0.10.0+dev-01193-g5ce997d (2020-02-20-10:57) Licensed under GNU GPL v2 For bug reports, read openocd.org/doc/doxygen/bugs.html none separate Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 8000 kHz adapter_nsrst_delay: 100 Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 8000 kHz Info : STLINK V2J36S7 (API v2) VID:PID 0483:3748 Info : using stlink api v2 Info : Target voltage: 3.247619 Info : SRST line released Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477
The cube IDE is designed to work with STM Nucleo boards and I only use them together. When programming the Bluepill or Blackpill I use ST Link and the dongle.
Select Target -> Connect To Device : contents of memory will be displayed Click on disk icon to save displayed content to .bin file. Select Target -> Program/Verify and select saved .bin file to program into second Bluepill.
@@0033mer Do i have to have the 2 bluepills connected at the same time, sorry but i never done anything like it, i got the st-link v2 and the stlink0004 software, i guess i can always do what you are saying then connect second bluepill and upload the whole .bin i copy from the first one?. Thanks?!?!
I want to use this to write a script to do everything I need to do for the day (feed the dog, check the mail, etc) so I can go back to bed. Can I do that with this?
Or. And hear me out. This is gonna sound crazy... Use the Arduino programming environment and a TTL serial adapter. So much EASY! You won't believe it.
I use 63/37 Eutectic solder with Kester 44 RA flux. It is actually better to leave the flux on which poses no problem to the PCB. A big misconception is to use Isopropyl alcohol to clean flux residue but that is the worst thing to do as it draws in moisture to the solder connections. Proper flux remover must be used. Kester recommends leaving the flux residue on under normal conditions and use the proper chemical if you want it removed. www.kester.com/DesktopModules/Bring2mind/DMX/Download.aspx?EntryId=1072&Command=Core_Download&language=en-US&PortalId=0&TabId=96
I use straight Eutectic solder with no-clean NC120 flux which can be left on. Actually cleaning it with alcohol can make it worse as it is Hygroscopic and can absorb moisture which can cause white powder residue on connections. www.techni-tool.com/site/ARTICLE_LIBRARY/ACL%20Staticide%20-%20Flux%20Cleaning%20Myths,%20Basics.pdf
You can use a USB to TTL converter connected to the serial port to program the Blue Pill module using Flash Loader software. Check out this video: ruclips.net/video/8qevASRjjEs/видео.html
Wasted most of an evening trying to get this working, so, a couple of tips.
1) If you can't connect, this could be because the SWD pins are not configured as debug. To connect, set the ST-LINK utility to 'Connect Under Reset" in Target>Settings. Press and hold the Blue Pill reset button. Select Target>Connect. Release the reset button and it should connect.
2) To stop this happening, in STM32Cube, set PA13 and PA14 to SWDIO and SWCLK respectivley, and in the System Core>SYS settings set Debug to Serial Wire.
heyyy Can you elaborate Connecting the PA13 and PA14 means , I don't have PA13 and PA 14 , but facing this problem
Great video and a real life saver. My ST-LINK v2 clone came with a pin out printed on the case with 2 - SWDIO, 4 - GND, 6 - SWCLK, 8 - 3.3V but it turns out having watched your video that the board inside matches your programmer. Having spent several hours chasing rabbits down holes it all just magically started working when wired up the way you have it. Thanks!
Glad that helped!
when i first watched this video a couple of months ago i had no idea what was going on
however now that i read a bit about how old computers worked (the terminal & computer communication), now i understand that you have a computer (the STM32 blue pill board) which is communicating to a terminal (the FTDI hooked up to your PC)
cool stuff! i'm learning how to write an operating system and i hope to be able to use it a bit like bash and have an SD card as the "hard drive"
That sounds really good.
While writing your operating system you will learn a lot. That's the best way to go.
best of luck on writing the operating system buddy
Wow Forth, that brought back some memories. I wrote a robot arm controller in Forth for my final year uni project some 35 years ago.
Yes ... the good old days.
I still use it. A friend of mine wrote one for the STM205/405 family that can be found by searching Space-Time Productions Forth STM205. It is a fig Forth so all the old stuff is (mostly) valid. Some new stuff has been added. All in 16K of Flash. Also one for the LPC1114/1115 family.
Excellent video and summary on the use of the SWD interface. Thank you so much.
You are welcome! Glad it was helpful.
Doesn't the "port" come out? What's the cause?
the file i need to program is called main.cpp will this dongle work - i noticed you said yours was a hex file?
Can we drive SSD1306 with a repurposed ST-Link dongle please tech me how!
My download of Mecrisp doesn't have the word ms defined. What other steps are performed to add that and other missing words that this video shows?
Forth is extendable so you make up words as you go along. This makes everybody's Forth different. The Mecrisp word-set has all the code needed to build any program.
: ms 0 ?do
#1000 0 do nop loop
loop ;
: seconds #1000 * ms ;
: beep 07 emit ;
If you're a beginner to Forth you should have a look at the Scamp board which has all the support words needed already coded onboard. Check out some of my recent videos.
in my case, i would need to press the reset button on my stm32 each time before connecting to stlink utility
This helped me so much thanks Sm was looking for this for the past 4 days now
Glad I could help.
Hi , I have Arduino Nano Stm32. Which has already program in it. I want to copy program from Arduino board.
My programmer is ST branded (but quite possibly fake) but the pins are labeled differently!
Yeah mine is different too
I get this:
Can not connect to target pleas select "connect under reset" mode from target-> settings menu and ty again.
if you re trying to connect to a low freq app pls select lower SWD freq. mode from target->menu settings.
There are no such options
Double check all your connections and then watch this video at the 16 min mark:
ruclips.net/video/KgjYJw_80DA/видео.html
@@0033mer dude your freaking fast. but it was not that (the st-link did not work), the programmer hat an old firmware that was not supported. You can flash it, but only if you re-plug it in and hit connect to device in the firmware flasher at the same instance
I am using STlink V2 programmer and Arduino IDE to program the Blue Pill board. Even after uploading the code the LED is not blinking. Can you please help me resolve this issue?
what is the settings of TERA TERM software or list the changes to be made in the software(TERA TERM) while giving a command
Can we connect RST pin of the dongle to the STM32 Board's 'R' pin so as to not press 'reset' button?
I am new to this. I am trying to install the bootloader for a adafruit feather. Everything was fine untill the address box did not have what yours did so the target memory was not full. I changed it to yours and it filled the box. The size box would not let me copy yours! I hit the program and verify as you did, got the next box and told it the file to install. Next a box came up saying programming error 0x00000000. in the box under the code- No onchip verification function found/ Error occured during program operation!/Programming error @: 0x00000000. Any help? Do you think you can tell me what I have wrong? Thanks for the video.
How do i convert elf to bin/hex on windows 10?
Hey, i have the problem with my rc transmitter that after the usb port broke of and i repaired it, that it wont connect anymore to pc it just show up a second and says connection failed or so. Know i have ssen that i have on the mainboard some extra solderpads (gnd, 5v, 3.3, dio and clk) so would it be possible to connect it with the dongle and look inside the chip if something failed there and maybe erase and reflash it would help? Would be grea if you could answer :) cheers
Hi,
I have used nucleo boards before. with this blue pill, i have few basic queries.
1. Shall i use STM32 IDE to write my programs & flash using it?
2. I went through lot of tutorials & used stmduino with FTDI chip to flash maple boot loader into blue pill. will i be still able to use STM V2 dongle to program further?
3. I dont want to use arduino IDE for flashing/writing programs. I want to use STM way of programming [as in peripherals examples provided by STM]
any help would be much appreciated! Thanks in advance.
BR,
Anantha R
If you are serious about getting familiar with STM microcontrollers use STM32 Cube for programming and STM32 Cube programmer for programming. The Nucleo board has the ST Link programmer onboard so you don't have to buy a dongle.
Hi, I've got the same blue-pill, faulty possibly. Because, the SWD is connected while the RESET button is being pressed down. Otherwise, no connection of SWD. Any idea with that ? Something wrong the hardware
Do a full erase of the chip so it is blank, and then try to connect.
@@0033mer oh, yes, that is what i did yesterday. I used pure vodka to brush the chip. For now it works. It responds 128k flash. Actually, it was stm32f103cb, it was not stm32f103c8.
It cost $2. That is why the chip was not cleaned by spirits / chemicals to remove the soldering dusts.
Thanks for your support
SWD was done via st-utility on windows 10. file.bin programmed with OK. But, in Ubuntu, via cmd line as st-flash write me.bin 0x08000000 did not work. I wonder why ! st-info --probe was OK that says it has 128k flash 20k ram.
Any idea with that ?
Straight to the point, helped me re-learn how to do it real fast. Thank you
You're welcome! Glad it helped.
Hello Sir, thank you for your detailed example!!! But one question, is there any STM32 Utility for MAC??? I can only find the window version of it :(
You can download STM32Cube for MAC OS:
www.st.com/en/development-tools/stm32cubeprog.html
Where is the hex file ?
Does the SWD also support a serial console?
No .. SWD is a two wire interface used for programming and debugging. It is basically an alternative JTAG.
If you want to use the SWD for debugging check out the Black Magic Probe.
Is there a way I can access uart terminal without the ftdi module and just the stlink v2 programmer ?
No, not with the bluepill module but you can if you use one of STMs Nucleo boards.
@@0033mer thanks!!
It's been a while since I watched a tech video on RUclips that made something much clearer. RUclips is flooded with children who are playing with micro controllers and have very little understanding of what they are doing. I am really grateful to your clear presentation, and thoughtful choice of what to highlight. A question. How do you compile code and can you step through your code (hardware debug) on the blue pill?
Thanks for the feedback! I program in Forth which has a built in debugger. In Forth you compile small chunks of code called words. These words are tested and then used as building blocks to make up your program. The onboard Forth contains the compiler, interpreter and assembler running on the blue pill. To debug, all words can be run independently on the command line and tested thoroughly. All my videos that involve microcontrollers and coding are written in Forth.
Excellet explanation. I have st-link and ftdi board, so could I use my st-Vlink as ftdi to make the same as described on video or not? Why did you use ftdi if you have programmed bluepii to be used through its usb?
The ST dongle is used to program a hex file into flash memory using ST-link. The FTDI was used to test out the software I uploaded ( Forth compiler ). The FTDI is not used for programming.
0033mer thanks to answer me :) So, why are they using ftdi with arduino (e.g pro mini) to upload their sketchs?
St -link means upload just a .hex file direct to chip, instead ftdi with compile inside arduino's ide?
The Arduino UNO and Nano have an onboard FTDI and the Pro Mini does not so you need to supply your own.
ST-link is for STMicroelectronics ARM micros and the Arduino IDE is for Atmel AVR micros.
The Arduino has an onboard bootloader and loads the sketches via the FTDI. STM32 micros use ST-link to load hex files to the Arm micro.
0033mer I got this board on video and I would like to know if I can upload any .hex to it, with st-link adapter, even if it comes with factory or arduino' bootloader. Of course I have a ftdi adapter, but someone has uploaded a.hex using st-link adapter, instead ftdi and I don't know how bootloader it has.
If you have a Bluepill module you can upload a hex file using the ST dongle via SWD or you can upload a hex file through the serial port using a FTDI. Pick the one that is easiest for you.
ruclips.net/video/8qevASRjjEs/видео.html
Thanks for doing this video, Bloody Ebay ST Link pinouts were labelled wrong and I wasted half an hour before finding your video. Swapped the wires around and worked perfectly.
Were those the data pins? Same thing with the China ESP32 with Camera and ESP8266.
Is there a mac version of st-link utility please ?
Download ST32 Cube Programming software for Mac OS.
www.st.com/en/development-tools/stm32cubeprog.html
Your video is very informative sir.
But which software your using for programming sir. Keil or arduino.?one more doubt. It's possible to use stm32 controller without using cube mx software sir?
The program was written in Forth. www.forth.com/
The software can't connect to the st-link. I got it off the usual suspects over at aliexpress, so it's probably real fake. Any suggestions other than paying out the nose for the real thing?
If you get no response at all from your computer when you plug in the dongle, it has failed. I have seen dongles that have been mislabeled or the wrong driver has been installed. You can use a Discovery board as a programmer or use the serial bootloader. ruclips.net/video/8qevASRjjEs/видео.html
Hi, I like your presentation style and that’s why I am writing to you. I’m an old novice with some experience in microprocessors (Motorola 6800) back in the 70’s. I would like to start learning again as I have a couple of water pumps I need to control. Two questions:- would this “pill device” be suitable and where can I get the resources to learn to write a simple program and load the device? I have programmed in machine code previously.
The Arduino UNO/Nano and the STM32 ARM Blue-pill are the best cost effective platforms to start with. The Arduino would have the smaller learning curve as compared to the ARM Blue-pill. Once you grasp the Arduino IDE you can also use it to program the Blue-Pill. I also have done a lot of assembler/machine coding on the 6805 and many other micros of the 70's. The programming language I use in all my videos is Forth which was popular in the 70's. Arduino or the Blue-pill would be suitable for your project and there is lot of free software and tutorials online.
0033mer - thanks for your prompt informative reply - much appreciated.
Great video , very good explanation , by the way , can you provide me with the link that you used to buy your Stm32 bluepill module ? I have ordered 4 modules till now but they all came with a flash size of 128kbytes , but i need the 64kbyte version of this module . I am finding a hard time to find the right one , so if I would appreciate it a lot if you can help me .
I need the STM32F103C8T6 model
The STM32F103C8 has 64K while the STM32F103CB has 128K Flash. To keep the manufacturing cost effective STMicroelectronics uses the same die for both parts so all STM32F103C8 devices have 128K but the upper half 64K is not tested and not guaranteed, and labelled as STM32F103C8. Manufacturing of Bluepill devices is slowing down so you might want to look into the Blackpill STM32f411. Here is a link where I got my Bluepills: www.banggood.com/STM32F103C8T6-System-Board-Imported-SCM-Core-Board-STM32-ARM-Development-Board-p-1825857.html?cur_warehouse=CN&rmmds=search
how do you return the blue pill to a normal status like a brand new blue pill, show me where can I download that bootloader?
Use ST-LINK utility to erase the flash memory to bring it to factory settings. Mecrisp is a programming language (Forth) and an operating system that runs onboard the microcontroller.
sourceforge.net/projects/mecrisp/files/
mbed for stm32 looks promising. I haven't used it myself but looks like a good direction if you need more speed than an arduino has.
I downloaded en.stsw-link004.zip and unzipped it. I ran the install STM32 ST-LINK Utility v4.5.0.exe and all I got were PDF files for the utility. No software installed.
Is there some other way to load a serial loader program on a Blue-pill?
You can try downloading just the Flash loader. www.st.com/en/development-tools/flasher-stm32.html
hi, i use stm32f103c8t6 and i loaded bootloader this microcontroller succesfully.Now i can program with Arduino IDE and i use Usb cable.But i want to back former state it and i want to program with st-link. I read many articles ,i didn't fix this.How can i fix it?
Run ST-Link and select Target --> Erase Chip and then do a Blank Check.
@@0033mer thank you so much .🙏 I have erased chip with flashloader before i see your comment.
Could you put this stlink utility to download to me, without being registered on Stlink site?
i just downloaded w/o registering. they sent download link to my email addr.
Very nice and thank you, i have not written in forth in a long time and it is nice to see it still lives :-)
----------- What about ALGOL and FORTRAN ------------
Guess most of viewer have never heard of them, Oh god i am really that old and boring :-)
Is it possible to cleanly debug Arduino code running in this stm32 using the stmLinkV2?
ARM is a complex architecture so I would stick to the manufacturer's IDE and programming tools.
0033mer , I can do complex (I developed on msp430 for a long time). But I'd rather not. Which is why I'd like to use the Arduino libraries. Debugging the same would be nice.
i can'nt find the mecrisp-stellaris-stm32f103.hex file, how to do that?
sourceforge.net/projects/mecrisp/
Is it possible to flash the blue pill using the Cube IDE?
All the tools needed to program a STM Nucleo board are included in the Cube IDE. The bluepill can also be programmed using Cube IDE with Keil. Check out this video:
ruclips.net/video/KVtom8IzV_Q/видео.html
@@0033mer Thank you very much for returning. I managed to flash using Keil, but using Cube IDE I always get this error: Open On-Chip Debugger 0.10.0+dev-01193-g5ce997d (2020-02-20-10:57)
Licensed under GNU GPL v2
For bug reports, read
openocd.org/doc/doxygen/bugs.html
none separate
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 8000 kHz
adapter_nsrst_delay: 100
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 8000 kHz
Info : STLINK V2J36S7 (API v2) VID:PID 0483:3748
Info : using stlink api v2
Info : Target voltage: 3.247619
Info : SRST line released
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
The cube IDE is designed to work with STM Nucleo boards and I only use them together. When programming the Bluepill or Blackpill I use ST Link and the dongle.
hi sir how can copy hex file from exeting STM32F103C8T6 chip ??
Target -> Connect -> File -> Save File as ...
Select Hex or Bin and give it a name.
Hi.
How do i copy everything from one blue pill to another?.
Select Target -> Connect To Device : contents of memory will be displayed
Click on disk icon to save displayed content to .bin file.
Select Target -> Program/Verify and select saved .bin file to program into second Bluepill.
@@0033mer Do i have to have the 2 bluepills connected at the same time, sorry but i never done anything like it, i got the st-link v2 and the stlink0004 software, i guess i can always do what you are saying then connect second bluepill and upload the whole .bin i copy from the first one?.
Thanks?!?!
Yes, download the memory from the first bluepill, then connected the second and upload.
@@0033mer Thanks, will try.
Hi, great tutorial so far!😊. Btw any chance that you know how to use stm32 discovery board as programmer instead?
Check out this video:
ruclips.net/video/8qevASRjjEs/видео.html
Can I upload and Use Serial Monitor on Arduino Using the STlink Dongle Directly without the Hex File?
If you are using the Arduino IDE to program the STM32 Blue-Pill you will have to use the serial bootloader.
0033mer After to get the serialboot onto bluepii shoud I have to use ftdi or not?
Where does the +5Vdc purple wire go to?
It goes to GPIO pin PC13 (pin2).
3.3v -> Resistor -> LED -> GPIO PC13
Can I use this to upload a program to an arduino pro mini???
No .. check out this video for pro mini programming. ruclips.net/video/mAM7s9bKEVs/видео.html
what's the unused swim? I couldn't find out fro the internet
Some boards support SWIM ( Single Wire Interface Module) with a 4 pin flat cable.
this is lovely but magically having a hex file is somewhat annoying because most of the problems with STM32 is the ecosystem & software
Can it perform debugging...??
yes look up openocd and arm-gdb
in all your videos you always start with"ok in this video......" thanks!
Yes ... I guess that will become my trademark.
your trademark is your way in teaching that is so special and useful! @@0033mer
Bro How I upload .bin file in this STM32
File -> Open File -> Select .bin file -> Target -> Program & Verify -> Start
@@0033mer very very thank U bro!!
does it use less power than the esp?
There is a special low power consumption series of this controller, the L series.
what is tat TTL module ?
USB to serial FTDI module. www.amazon.ca/FT232RL-Serial-Adapter-Module-Arduino/dp/B00HSX3CXE
A great tutorial. Thank you a lotttt
I want to use this to write a script to do everything I need to do for the day (feed the dog, check the mail, etc) so I can go back to bed. Can I do that with this?
Very useful information . Thanks a lot.
Very interesting and learned a lot.
thanks man you really helped me
Glad I could help
Thanks, Sir, Great video
Most welcome
Very interesting! Thanks!
Welcome!
Great Tutorial
thank you, my friend!!!
You're welcome!!
What is this blue pill thing and what does it do? Sorry Im new and dont understand what this is.
wiki.stm32duino.com/index.php?title=Blue_Pill
Tkanks a lot.
You saved my day.
Glad I could help.
can you help me how to connect Arduino with hoover board wiring diagram and code for Arduino for speed control
perfect thanks
Glad it helped!
Thanks so so much
You're welcome!
Awesome...
👍👍👍
Or. And hear me out. This is gonna sound crazy... Use the Arduino programming environment and a TTL serial adapter. So much EASY! You won't believe it.
That thing's been flooded with flux... I would clean that up asap :D
I use 63/37 Eutectic solder with Kester 44 RA flux. It is actually better to leave the flux on which poses no problem to the PCB. A big misconception is to use Isopropyl alcohol to clean flux residue but that is the worst thing to do as it draws in moisture to the solder connections. Proper flux remover must be used. Kester recommends leaving the flux residue on under normal conditions and use the proper chemical if you want it removed.
www.kester.com/DesktopModules/Bring2mind/DMX/Download.aspx?EntryId=1072&Command=Core_Download&language=en-US&PortalId=0&TabId=96
After some time the flux absorbs moisture and begins to conduct. I usually remove with a needle - scratch it off.
That one was cheap! Probably a chinese knock off. The cheapest I've found here is 12 bucks, and the one I just ordered was 25 bucks
H
clean your flux
I use straight Eutectic solder with no-clean NC120 flux which can be left on. Actually cleaning it with alcohol can make it worse as it is Hygroscopic and can absorb moisture which can cause white powder residue on connections.
www.techni-tool.com/site/ARTICLE_LIBRARY/ACL%20Staticide%20-%20Flux%20Cleaning%20Myths,%20Basics.pdf
Rubbing alcohol and an old tooth brush will take that old flux off easy
careless and badly made.
And where are your videos? If you are going to condemn someone at least have something better to show the world.
Not mine but this one is clear to understand and follow: ruclips.net/video/zUk0lN1oEwQ/видео.html
Has anyone been able to send a sketch using Arduino as FTDI?
could i update the code and send data through command window using ST-link v2 only? or i need bluetooth module or FTDI module ?
Can it also copy or read & extract the hex code from the STM32f103 chip?
Yes .. select Device Memory -> Save To File
@@0033merok Thanks
I have bought USB to TTL converter. Is it also works same way ?
You can use a USB to TTL converter connected to the serial port to program the Blue Pill module using Flash Loader software. Check out this video: ruclips.net/video/8qevASRjjEs/видео.html
great lecture, thank you so much
You're most welcome!