Boot loader on "blue pill" questions

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
tfried
Posts: 22
Joined: Mon Dec 04, 2017 8:45 pm

Boot loader on "blue pill" questions

Post by tfried » Sun Dec 24, 2017 9:54 pm

So far I have been using an ST-link (V2 clone) to upload to my "blue pill" board. Now I'm considering to switch to the STM32duino boot loader, but there are a few points that are not entirely clear to me even after reading the wiki and searching the forum. Could somebody confirm or correct the following assumptions?
  • Uploading the boot-loader will my reduce flash available for sketches by 8kB, but not affect RAM.
  • At the same time, there is a fair chance that I will come out flash-positive, because, actually, my MCU probably has 128kB flash (but my ST-link refuses to even attempt to write more than 64kB).
  • Uploading via USB with the boot loader may or may not work without re-soldering a resistor.
  • Using the boot loader means that pins PA11 and PA12 will effectively become unavailable for any other purpose.
  • In order to remove the boot loader, all I will have to do is to upload a sketch (any sketch) via ST-link, again.
  • The factory default USART boot loader (available by setting the "Boot 0" jumper to 1) will never be affected in any way, because it is located in ROM, not flash.
Thanks!

stevestrong
Posts: 2070
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Boot loader on "blue pill" questions

Post by stevestrong » Mon Dec 25, 2017 10:13 am

tfried wrote:
Sun Dec 24, 2017 9:54 pm
  • Uploading the boot-loader will my reduce flash available for sketches by 8kB, but not affect RAM.
Yes.
  • At the same time, there is a fair chance that I will come out flash-positive, because, actually, my MCU probably has 128kB flash.
Yes.
  • Uploading via USB with the boot loader may or may not work without re-soldering a resistor.
It will most probably work, I have never re-soldered any resistor on any of my 20 blue pill boards, and all work fine with the default values.
  • Using the boot loader means that pins PA11 and PA12 will effectively become unavailable for any other purpose.
Yes, those pins are reserved for USB, and they will be reserved even if you plan to use serial communication over USB.
  • In order to remove the boot loader, all I will have to do is to upload a sketch (any sketch) via ST-link, again.
Yes.
  • The factory default USART boot loader (available by setting the "Boot 0" jumper to 1) will never be affected in any way, because it is located in ROM, not flash.
Yes.

MarkB
Posts: 11
Joined: Sun Oct 02, 2016 11:40 pm

Re: Boot loader on "blue pill" questions

Post by MarkB » Mon Dec 25, 2017 2:05 pm

stevestrong wrote:
Mon Dec 25, 2017 10:13 am
tfried wrote:
Sun Dec 24, 2017 9:54 pm
  • Uploading via USB with the boot loader may or may not work without re-soldering a resistor.
It will most probably work, I have never re-soldered any resistor on any of my 20 blue pill boards, and all work fine with the default values.
Whether it works or not is a function of the host PC, so if one blue pill works, likely others will, but a blue pill that works with one PC may not work with another unless modified.

victor_pv
Posts: 1871
Joined: Mon Apr 27, 2015 12:12 pm

Re: Boot loader on "blue pill" questions

Post by victor_pv » Mon Dec 25, 2017 10:22 pm

tfried wrote:
Sun Dec 24, 2017 9:54 pm
  • At the same time, there is a fair chance that I will come out flash-positive, because, actually, my MCU probably has 128kB flash (but my ST-link refuses to even attempt to write more than 64kB).
If St-Link allows you to read the flash from 64KB to 128KB, you have extra flash. If it gives you an error when trying to read, you don't.

tfried
Posts: 22
Joined: Mon Dec 04, 2017 8:45 pm

Re: Boot loader on "blue pill" questions

Post by tfried » Tue Dec 26, 2017 4:38 pm

Thanks for your answers, everybody! Now using the boot loader, without changing a resistor, and with 128kb flash. Nice!

Post Reply