Down Load Location of Black Pill Boot Loader

Post here first, or if you can't find a relevant section!
Post Reply
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Down Load Location of Black Pill Boot Loader

Post by imk »

Hello,
I am trying to use WeAct Black Pill STM32F411 with Arduino IDE and can't get the serial monitor to work.
In fact the pill is not seen by device manage and there is not a COM port assigned.
See post viewtopic.php?f=7&t=1352

I have spent an hour going around in GitHu loops looking for a download link to the boot loader/driver etc.

Have given up, some help appreciated please imk
1201 Alarm
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: Down Load Location of Black Pill Boot Loader

Post by GonzoG »

You don't need bootloader firmware. F411 has hardware DFU mode. Just reset it in DFU mode (reset with boot pressed).
As upload method select STM32CubeProgrammer (DFU) (there is no COM Port in this mode).

If you want to upload without manual resetting board into DFU, you can flash HID bootloader. There is a version for F411 black pills.
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Down Load Location of Black Pill Boot Loader

Post by imk »

Hello GonzoG and many thanks for the insight.
So now i know why serial does not work :-)
I do suppose you happen to know where i can find the HID boot loader please as spent couple hours searching for it.

BTW I wonder if i messed up the boot loader months ago when i tried to put python on this chip as a quick test.

thanks again imk
1201 Alarm
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Down Load Location of Black Pill Boot Loader

Post by ag123 »

Normally you need
STM32CubeProgrammer
there are open sourced variety such as dfu-util, but that STM32CubeProgrammer is 'official' firmware installer.

The usual tricks is this finger dance
- press both boot0 and reset
- hold boot0, release reset
- release boot0 2 secs later

Then use stm32cube programmer to install your firmware the bin file via usb DFU mode.

To get your bin file in the Arduino IDE, it is normally Sketch > Export compiled binary.
The bin file should be left in your sketch folder.

The boot loader is *inside* the chip, you don't need a separate boot loader for it.
If you still stumble with it, get a st-link v2
Adafruit has a nice one
https://www.adafruit.com/product/2548
official one is here
https://www.st.com/en/development-tools/st-link-v2.html
https://octopart.com/st-link%2Fv2-stmic ... s-20057793

if you still struggle with that, try a Nucleo board on the list
https://github.com/stm32duino/Arduino_Core_STM32
the wiki is here
https://github.com/stm32duino/wiki/wiki

and these are the usual FAQ links
viewtopic.php?f=2&t=3
viewtopic.php?f=2&t=301
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Down Load Location of Black Pill Boot Loader

Post by imk »

hello ag123 and thanks for the reply.

I have genuine STlink and Cube programmer ap.
Thing is when i first got this board few month ago i tried loading python, did like it so removed it.
Somewhere i think i messed up the boot loader as windows barks at it Unrecognized Device.
So think i need to try to refresh the bootloader but spent (given up) hours trying to find and not in WeAct github.

Thanks again imk

PS not having good day at this as just found feature with Nucleo STM32L432 not send serial data out of Tx pin but using A7
PSS and just lockup arduino IDE when trying to update libraries and had to try Task Manager to Kill it and still wont close.. Reboot PC!
Opps Sorry Arduino IDE developers was not IDE that died it was Jave gone it a while( 1 );
1201 Alarm
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Down Load Location of Black Pill Boot Loader

Post by ag123 »

On normal stm32 devices, there isn't a separate boot loader. Any additional boot loader are custom and you are on your own with regards to support for it.
The usual ways to program it is like DFU using stm32cube programmer as discussed above, this doesn't need a separate dongle, just a usb cable should work, but it needs access to boot0 and reset pin. Otherwise, st-link is the 'official' way to program it via swd.

WeAct did release a HID bootloader. But do note that it is custom by WeAct. You are on your own with regards to support for it.
https://github.com/WeActTC/WeAct_HID_Bootloader_F4x1

As for myself, I'm happy with the internal usb DFU bootloader that is inside the stm32 and it doesn't need a separate bootloader.
Learn to use the internal bootloader and you don't need another bootloader.
You can also use the st-link to install firmware, that is the 'normal' way to install firmware, including your own sketch.
using st-link with STM32CubeProgrammer is supported in STM core.
https://github.com/stm32duino/wiki/wiki/Upload-methods
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Down Load Location of Black Pill Boot Loader

Post by imk »

ag123
Many Thanks for the link but clicking on the hex file results in a hex file being displayed on the chrome page and no download tag
https://github.com/WeActTC/WeAct_HID_Bo ... oader_F4x1

Sorry but finding this more than bit of a pain, and real pity you can't run serial monitor out of the USB on these WeAct boards.
So think my only option is to put the Arduino Monitor COM address to a FT232RL Board FTDI and power the blackpill from the FT232RL

Then unsolder the USB socket and use it as bit of Tech Costume Jewelry as it seems to be its only use :-)
Heading for the bed as another bad day with WeAct/STM32/Arduino... I used to make faster progress coding PIC, and wondering if i have made a good move.

Thanks again for the help imk
1201 Alarm
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Down Load Location of Black Pill Boot Loader

Post by mrburnette »

imk wrote: Sat Oct 30, 2021 10:00 pm ...
Somewhere i think i messed up the boot loader as windows barks at it Unrecognized Device.
So think i need to try to refresh the bootloader but spent (given up) hours trying to find and not in WeAct github.
...
The black 411:
The STM32F4 core plate has been pre-burned by the factory with HID Bootloader
Putting microPython on the board will overwrite the bootloader.

Link to board description and about 60% down is the bootloader link. Use page translate.

https://www.weact-tc.cn/2019/11/30/STM32Download/#more
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Down Load Location of Black Pill Boot Loader

Post by ag123 »

imk wrote: Sat Oct 30, 2021 11:05 pm ag123
Many Thanks for the link but clicking on the hex file results in a hex file being displayed on the chrome page and no download tag
https://github.com/WeActTC/WeAct_HID_Bo ... oader_F4x1

Sorry but finding this more than bit of a pain, and real pity you can't run serial monitor out of the USB on these WeAct boards.
So think my only option is to put the Arduino Monitor COM address to a FT232RL Board FTDI and power the blackpill from the FT232RL

Then unsolder the USB socket and use it as bit of Tech Costume Jewelry as it seems to be its only use :-)
Heading for the bed as another bad day with WeAct/STM32/Arduino... I used to make faster progress coding PIC, and wondering if i have made a good move.

Thanks again for the help imk
To use serial monitor with this board, you need to select USB CDC Serial for Serial when you compile your sketch in Arduino IDE (1.8) the java one.
Then the normal codes works. e.g.

Code: Select all

void setup() {
	Serial.begin();
}

void loop() {
	Serial.println("Hello world");
	delay(1000);
}
you can then install the compiled sketch bin using your st-link or usb dfu with stm32cubeprogrammer.

There is no need of a separate usb-uart chip, USB CDC Serial is much faster, typically from 1 Mbps to 12 Mbps. There is no usb-uart chips that can match these speeds. It is in fact fast enough to make a webcam out of a stm32f401/f411 board, the cheap usb-uart chips won't be able to do that.
imk
Posts: 31
Joined: Fri Sep 24, 2021 9:26 pm

Re: Down Load Location of Black Pill Boot Loader

Post by imk »

Hello ag123
Many thanks for the heads up re the "USB CDC Serial for Serial Monitor/Debug Port!
As now i have the solution that i really wanted day one when i started doing i/o test apps for my project.
Which is a serial monitor via USB for debugging and TWO serial/UART ports via PA9/PA10 and PA2/PA3
This i a BIG step forwarded so many many thanks, plus the Black Pill is now back in my box of smiley things :-)
Plus much gratitude to the develops of https://github.com/stm32duino/wiki/wiki ... wareserial
Test app is below for others the try.

IMK

//#define LED_PIN D13 // Nucleo
#define LED_PIN PC13 // Black Pill

HardwareSerial Serial2( PA3 , PA2 ); // Rx Tx

//#define LED_PIN LED_BUILTIN
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
Serial2.begin(9600);
//delay(1000);

pinMode(LED_PIN, OUTPUT);
}

void loop()
{
Serial.println("Monitor Output OK");
Serial1.println("123");
Serial2.println("ABC");

digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
1201 Alarm
Post Reply

Return to “General discussion”