Author Topic: STM32 "empty check" and forced bootloader execution  (Read 2467 times)

0 Members and 1 Guest are viewing this topic.

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4630
  • Country: nl
Re: STM32 "empty check" and forced bootloader execution
« Reply #25 on: November 26, 2024, 08:40:07 pm »
(SWD is faster in production anyway than ST's craploader which I refuse to call bootloader because it's not a bootloader.)

If your definition of a bootloader is that it loads a main program to the memory and starts it, than you are totally right.

But you should then also use another name for what is used in the Arduino world. (And maybe you do  :) ) The so called bootloader there allows you to make a connection at startup to (re) program part of the FLASH, and when no connection is made it jumps to the actual main code if present.

For something that needs to work in the real world, I myself would get rid of it directly. Have actually done so for an extension I made for my central heating system. Needed to control a mixing valve servo and an Arduino mini board was more than enough processing power to do the job. (All gone now by the way. The geothermal heat pump system is up and running and works like a charm.)

I agree that the automatic start when FLASH is empty is not really necessary. In each case (selected by pin or automatic) you still have to connect something to program your device.

For devices that do not have a BOOT0 pin, I see another problem. As soon as you have programmed the device it won't start in this programming code (bootloader) anymore, so you have to implement something in your own code to take care of reprogramming, or it has to have SWD pins and you still have to have a ST-link programmer.

Best option seems to be to always use a SWD or JTAG based programmer.

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9215
  • Country: fi
Re: STM32 "empty check" and forced bootloader execution
« Reply #26 on: November 27, 2024, 09:34:50 am »
If your definition of a bootloader is that it loads a main program to the memory and starts it, than you are totally right.

Or to be more generic, something that runs first, and executes the actual application. Maybe just jumps there if it does not need copying to memory. Which Arduino bootloader does, hence it's a bootloader.

ST's "bootloader" is just a name, it does not boot first and it does not execute the application. It has absolutely nothing to do with a bootloader in any common or uncommon meaning whatsoever, except ST's own meaning.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4630
  • Country: nl
Re: STM32 "empty check" and forced bootloader execution
« Reply #27 on: November 27, 2024, 02:23:34 pm »
If your definition of a bootloader is that it loads a main program to the memory and starts it, than you are totally right.

Or to be more generic, something that runs first, and executes the actual application. Maybe just jumps there if it does not need copying to memory. Which Arduino bootloader does, hence it's a bootloader.

I like to disagree on this. For me it is in the name. "boot" yes, that indicates starting as the first thing. But "loader" to me means actually loading something and not just jumping to code that is already there.

I know, it is semantic nitpicking.   >:D

Maybe bootprogrammer would have been a better fit.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf