The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

DIYx flash bootloader
Message #1 Posted by Eric Smith on 9 Sept 2012, 6:40 p.m.

Previously the only way to update the flash of the DIYx series of calculators Richard Ottosen and I have made required a special debugging interface. (Sort of like the HP programming cable, but more expensived due to having a microcontroller and other active electronics.)

It's long been on my to-do list, but I finally have a flash bootloader working for the DIY4x and DIY5. Currently it is able to install a new firmware image from a MicroSD card, but I expect to soon have it able to install from a host computer over USB also.

It's quite nice finally being to be able to do firmware updates without needing any special hardware.

Also, there's no fooling around with erase and reset buttons on a cable, or getting a blank display so you can't tell what's going on, and draining the coin cells rapidly.

Currently the bootloader takes around 44KB of the 1MB flash, which is much more than I expected, especially since the USB stack isn't even compiled in yet. From the linker map it is apparent that around 28KB of that is from the standard C library, which is linked in because I use printf(). I can replace that with a lightweight printf() replacement, and that should reduce it by 20KB or more, although I also need to add a bigger font for the LCD. My original objective was to have the bootloader fit in under 32KB of flash, but that might not be possible when including the USB stack. However, I think I'll be reasonably happy as long as it stays under 64KB, since that will still leave 960KB of flash for the calculator.

Edited: 9 Sept 2012, 6:40 p.m.

      
Re: DIYx flash bootloader
Message #2 Posted by Paul Dale on 9 Sept 2012, 7:25 p.m.,
in response to message #1 by Eric Smith

Sounds like decent progress. It is a nice feeling to be able to easily reflash a device for the first time :-)

It also seems like you're close to target for the 32kb boot loader.

- Pauli

      
Re: DIYx flash bootloader
Message #3 Posted by Walter B on 10 Sept 2012, 2:27 a.m.,
in response to message #1 by Eric Smith

Quote:
... there's no fooling around with erase and reset buttons on a cable, or getting a blank display so you can't tell what's going on, and draining the coin cells rapidly.
As written in the manual, that blank display phase can be annoying. Though it lost much of its horror since I know my calculator is well supplied by Harald's USB board :-)

Anyway, your flash bootloader is most welcome progress :-)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall