Idea for an "end user" bootloader (mass storage device)

STM32duino bootloader aka Maple bootloader
madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Idea for an "end user" bootloader (mass storage device)

Post by madias » Wed Sep 16, 2015 8:14 am

In my synth-project thread (I'm sure nobody follow it, expect Victor ;) ) I wrote about an idea about a "drag&drop - mass storage device bootloader":

This is an old idea of mine, while playing with the Nucleo boards: The (onboard) ST-Link v2.1 connect to the PC as "mass storage device" You just drag&drop the *bin file for upload. This must be an (quiet) easy solution for a "drag&drop" bootloader. So this special bootloader can be uploaded as a "final step" on a finished product (Maybe this functionality is an exchange for the "perpetual bootloader" ).
I believe many of us will not only working for ourselves but making projects for family, friends or even commercial. So this end-user can easily upload a new firmware via a drag&drop bootloader without installing anything. Should be possibly - or? ;)

User avatar
martinayotte
Posts: 1219
Joined: Mon Apr 27, 2015 1:45 pm

Re: Idea for an "end user" bootloader (mass storage device)

Post by martinayotte » Wed Sep 16, 2015 2:59 pm

madias wrote:I'm sure nobody follow it, expect Victor ;)
I've read it, although in diagonal ... ;)
madias wrote:So this end-user can easily upload a new firmware via a drag&drop bootloader without installing anything. Should be possibly - or? ;)
I should be possible, although it is not trivial if written from scratch.

User avatar
zoomx
Posts: 488
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Idea for an "end user" bootloader (mass storage device)

Post by zoomx » Wed Sep 16, 2015 4:04 pm

I have read it too. I remember this way of uploading of the Nucleo.

User avatar
mrburnette
Posts: 1803
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Idea for an "end user" bootloader (mass storage device)

Post by mrburnette » Thu Sep 17, 2015 12:52 am

So this end-user can easily upload a new firmware via a drag&drop bootloader without installing anything. Should be possibly - or?
I live a very simple life with the Maple Mini clone. Does the world need a drag&drop bootloader? Is not all of the magic done on the host machine? That is: editor, compiler, linker, and finally the use if a custom utility to upload the binary HEX to the attached microcontroller board. Other than the "cutness", why introduce s manual operation... unless one intends on only posting binary giles?

If I am missing the obvious, I apologize, but I am old and my 34 year old daughter thinks I am crotchety.


Ray

User avatar
martinayotte
Posts: 1219
Joined: Mon Apr 27, 2015 1:45 pm

Re: Idea for an "end user" bootloader (mass storage device)

Post by martinayotte » Thu Sep 17, 2015 1:47 am

mrburnette wrote:but I am old and my 34 year old daughter thinks I am crotchety.
:)
My virtual daughter should think the same, but I don't have real dauther, neither than son... :?

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

Re: Idea for an "end user" bootloader (mass storage device)

Post by victor_pv » Thu Sep 17, 2015 2:51 am

Madias, check this thread I just started, I found a project that implements a mass storage device in a sketch:
http://www.stm32duino.com/viewtopic.php?f=13&t=585

May be even better than implementing it in the bootloader. If you can implement MIDI and the USB Storage at the same time in the sketch, one would only need to write a certain file to the mass storage to update the fw.

User avatar
RogerClark
Posts: 6877
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Idea for an "end user" bootloader (mass storage device)

Post by RogerClark » Thu Sep 17, 2015 7:36 am

I wonder how whether the bootloader size would be larger than the DFU version?

I guess the benefit of this would be for web based development e.g. like mbed and also what the BBC in the UK are doing with their new board for schools "BBC Mico bit" (I think thats its name)

Personally I'm not a fan of online IDE's as they tend to be clunky and slower than local IDE's, but it does appear to be the way things are going for educational dev systems, and other dev systems for possible less tech minded people e.g. Spark Photo use an online dev env I think.

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Idea for an "end user" bootloader (mass storage device)

Post by madias » Thu Sep 17, 2015 7:50 am

I think, there is a little misunderstood related to my idea:
This bootloader should only be useable for "end user". As example: Ok, I finished my synthesizer project and build about 5-10 prototypes. I would sold them on a local internet market to finance my next project. But the synth-firmware is still in progress (bugfixes, new features...). None of the people who bought the synth are able (or willing) to install several drivers/IDE's/toolchains.
So they only need to download the new firmware on internet, getting the synth into upload mode (perpetual bootloader) and drag&drop the new firmware from PC into the synth.
Including this upload routine into the main code would be very dangerous: Just a little mistake, broken cable, wrong binary and the synth would be bricked and can only be reanimated with USB-ttl, ST-Link, etc.

For developers this bootloader would be ... mostly useless :)

User avatar
zoomx
Posts: 488
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Idea for an "end user" bootloader (mass storage device)

Post by zoomx » Thu Sep 17, 2015 9:49 am

I don't like online IDE too but maybe it is the best choiche for teaching purpouse since the maintenance is much simple and all students have the same compiler. I don't believe that all schools that use Arduino have the 1.6.5 IDE, for example.

madias,
maybe this bootloader can be used for remote upload.

User avatar
mrburnette
Posts: 1803
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Idea for an "end user" bootloader (mass storage device)

Post by mrburnette » Thu Sep 17, 2015 12:15 pm

madias wrote:I think, there is a little misunderstood related to my idea:
This bootloader should only be useable for "end user". As example: Ok, I finished my synthesizer project and build about 5-10 prototypes. I would sold them on a local internet market to finance my next project. But the synth-firmware is still in progress (bugfixes, new features...). None of the people who bought the synth are able (or willing) to install several drivers/IDE's/toolchains.
So they only need to download the new firmware on internet, getting the synth into upload mode (perpetual bootloader) and drag&drop the new firmware from PC into the synth.
Including this upload routine into the main code would be very dangerous: Just a little mistake, broken cable, wrong binary and the synth would be bricked and can only be reanimated with USB-ttl, ST-Link, etc.

For developers this bootloader would be ... mostly useless :)
Ah, ha! Now that does make a bit of sense. So, really, what would be idea is a working OTA type of upgrade, similar to the ESP8266 implementation for firmware upgrade. As an over-simplification:
1) The OTA bootloader would use the PC as a proxy to download the URL hosted binary.
2) The PC would download the binary and validate the checksum.
3) The OTA bootloader in cooperation with the workstation would move the binary to flash and validate the checksum.
4) The flash would then overwrite the existing firmware and force a reboot.

The only downside is that the "safe" way of doing this requires enough 'free' flash to move an entire new update of the project without affecting the existing project code ... that is, if things go wrong, the project still functions. This would be opposed to the unsafe way which would rely upon the workstation checksum validation only.

Ray

Post Reply