Question about "what goes where" while flashing firmware

Discussion around the Swiss Micros DM42 calculator.
Post Reply
mcc
Posts: 167
Joined: Fri Jun 23, 2017 3:10 am

Question about "what goes where" while flashing firmware

Post by mcc » Tue Jun 05, 2018 5:05 pm

Hi,

as now all interested hobbyist are able to build and flash their very own firmware for the DM42, flashing
will become a more common task...and with that the write cycles and the wear-out of the flash memory
will increase.

The serial eeprom is somehow replaceable, because Michael and David carefully place that chip more at
the "border" of 'DM42 city' on the PCB and choose a package for the chip, which can be handled manually
with some experience in soldering.

The CPU and the flash inside the cpu is a totally different story.

As far as I understood, when changing the Free42 related stuff (and therefore the "visible part" of the DM42")
needs to be flashed (?) -- that is the file DM42-3.7.1.pgm currently.

But where will it be stored?
In the eeprom chip or the cpu flash memory?

Cheers!
Meino
DM 42 - SN: 00373, Firmware v.:3.9.1 / 3.9.1 as compiled by SwissMicros

grsbanks
Posts: 676
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Question about "what goes where" while flashing firmware

Post by grsbanks » Tue Jun 05, 2018 5:58 pm

Files of the form *_flash_x.y.bin go to the STM32L476 chip's internal flash.

Files of the form *_qspi_x.y.bin get written to the external QSPI chip.
Not SwissMicros staff, just an enthusiast.

mcc
Posts: 167
Joined: Fri Jun 23, 2017 3:10 am

Re: Question about "what goes where" while flashing firmware

Post by mcc » Tue Jun 05, 2018 6:12 pm

Hi grsbanks,

thank you for your reply! :)

Where do the files of the pattern DM42-<m>.<n>.<o>.pgm go...??
These are -- as far I understood the split -- the parts containing
Free42 and therefore the most changed once...?

Cheers!
Meino
DM 42 - SN: 00373, Firmware v.:3.9.1 / 3.9.1 as compiled by SwissMicros

gmac42
Posts: 18
Joined: Fri Jun 01, 2018 9:30 am

Re: Question about "what goes where" while flashing firmware

Post by gmac42 » Tue Jun 05, 2018 8:21 pm

FWIW, I've been working with different microcontrollers for more than 10 years now, and I have never had one go bad on me because of flash wear, even with excessive reprogramming and/or EEPROM use.
Yes, it can happen, but I wouldn't worry too much about it.
DM42 #650, DM41L #801, HP 41CX, HP 41CV, HP 50G, TI 89

User avatar
ijabbott
Posts: 89
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

Re: Question about "what goes where" while flashing firmware

Post by ijabbott » Tue Jun 05, 2018 9:52 pm

mcc wrote:
Tue Jun 05, 2018 6:12 pm
Where do the files of the pattern DM42-<m>.<n>.<o>.pgm go...??
These are -- as far I understood the split -- the parts containing
Free42 and therefore the most changed once...?
They get written to some Flash memory by the DMCP "Load Program" code (which is in also in Flash memory). The code might check the QSPI contents are correct first (described by the program header), but I'm not sure about that.

The DM42PGM code runs directly from Flash memory. Do not pass Go. Do not collect 200 Euros.

mcc
Posts: 167
Joined: Fri Jun 23, 2017 3:10 am

Re: Question about "what goes where" while flashing firmware

Post by mcc » Wed Jun 06, 2018 2:14 am

ijabbott wrote:
Tue Jun 05, 2018 9:52 pm
mcc wrote:
Tue Jun 05, 2018 6:12 pm
Where do the files of the pattern DM42-<m>.<n>.<o>.pgm go...??
These are -- as far I understood the split -- the parts containing
Free42 and therefore the most changed once...?
They get written to some Flash memory by the DMCP "Load Program" code (which is in also in Flash memory). The code might check the QSPI contents are correct first (described by the program header), but I'm not sure about that.

The DM42PGM code runs directly from Flash memory. Do not pass Go. Do not collect 200 Euros.
Hi ijabbott,

thanks for your reply!

With "flash memory"...do you meant the memory of the CPU or the external QSPI-chip?
DM 42 - SN: 00373, Firmware v.:3.9.1 / 3.9.1 as compiled by SwissMicros

grsbanks
Posts: 676
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Question about "what goes where" while flashing firmware

Post by grsbanks » Wed Jun 06, 2018 5:30 am

DMCP loads the .pgm file into and runs it from the STM32L476's internal flash memory.
Not SwissMicros staff, just an enthusiast.

Post Reply