I used a blue pill for a project about a year ago. At that time compiling was "native" to the IDE. However just as I was finishing up the "new" library from ST required the installation of an ST programmer module and I never pursued it after that.
I would like to use the Blue Pill on another project. I guess my question is how do folks program the ST Blue Pill with the current IDE.
I'm not sure what you mean by " the "new" library from ST required the installation of an ST programmer module". I have not had to do this.
I'm primarily using the Blue Pill and when programming with Arduino I upload using Arduino IDE 1.8.14 on Linux Mint Mate with STLink . When uploading using STLink I get this warning
USB Status [unknown]
2020-09-20T10:24:52 INFO src/common.c: Loading device parameters....
2020-09-20T10:24:52 WARN src/common.c: unknown chip id! 0
USB Status [unknown]
Waiting for tty device
should now be available.
Perhaps by 'the "new" library from ST', @JohnRob means this:
Although install of that boards platform is very easy due to having Boards Manager installation support, once you want to upload a sketch to your STM32 board you discover there is an "extra step" to install STM32CubeProgrammer:
I seem to remember someone saying this is not required if you use the popular unofficial STM32 Arduino boards platform:
I must be missing something. My experience with the Blue Pill is that although they are not as easy to work with as say the UNO or Mega they are still very usable. I have not had to
move the the library that requires the STM32Cube programmer
; I don't really know what this means! I still use the Arduino IDE but mainly upload using a £2.50 STLink clone from ebay. I did yesterday manage to install Roger Clark's bootloader and upload my sketches with it.
Don't just toss the Blue Pills unless you toss them in my direction.
It's been a while but as I recall when Roger Clark's forum moved to ST there was an update to the Blue Pill board under the Arduino Boards Manager.
Once I updated to this library I needed to install the STM32CubeProgrammer.
So I thought my options were:
Stay with the old library. Might be OK or might become obsolete and would not be fixed by ST
install the STM32CubeProgrammer. I looked at installing the 32Cube (admittedly half heartedly) and it seemed to require too much ST stuff installed on my computer.
Before the change I had the Blue Pill running a number of Bosch sensors. The old library and board did not give me any trouble.
@pert
When I was working on the Blue Pill (some time ago) Roger Clark was officially closing down the forum and had convinced ST to take it over. His plan was to create a read only archive forum.
Didn't follow it after that.
@skyvan Are you using the Arduino 1.8.13? If so do you have a reference on how to use the ST Link to program the Blue Pill? I plan on trying again.
JohnRob: @skyvan Are you using the Arduino 1.8.13? If so do you have a reference on how to use the ST Link to program the Blue Pill? I plan on trying again.
The STM32 is connected to the Blue Pill's 4 pins on the end of the board. On the side of the st-link is a diagram indicating the pin use of the 10 pins. You only need to connect the 4 that match the 4 pins on the Blue Pill.
From within the bootloader_only_binaries directory, the basic command is
st-flash write generic_boot20_pc13.bin 0x08000000 (use whichever boot image applies to your Blue Pill).
Of course the you will need to move the Boot0 jumper to position 1 and press reset before this command. Once the bootloader is uploaded then you can swap the Boot0 jumper back to position 0.
Once you have installed the boot loader you will need to use the boards manager to install the ST boards into the Arduino IDE. You can get these from http://dan.drown.org/stm32duino/package_STM32duino_index.json . The internet is littered with instructions on how to do this as a general process.
Basically then done. Restart the IDE, under tool select the STM32f103C series and selectas upload method STM32duino bootloader. Be aware - you could use the st-link to but this would wipe out your boot loader and you would not have direct access to Serial!
I have found the most critical part of the sketch upload is the timing between pressing the reset button and pressing upload. This will require a bit of trial and error.