Question about "what goes where" while flashing firmware

Discussion around the SwissMicros DM42 calculator
Post Reply
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

Question about "what goes where" while flashing firmware

Post by mcc »

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 release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

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

Post by grsbanks »

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.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

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

Post by mcc »

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 release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
gmac42
Posts: 103
Joined: Fri Jun 01, 2018 11:30 am

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

Post by gmac42 »

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.
DM41X #542, DM42 #650, DM41L #801, HP 41CX, HP 41CV, HP 50G, HP11C, TI 89
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

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

Post by ijabbott »

mcc wrote:
Tue Jun 05, 2018 8: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: 277
Joined: Fri Jun 23, 2017 5:10 am

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

Post by mcc »

ijabbott wrote:
Tue Jun 05, 2018 11:52 pm
mcc wrote:
Tue Jun 05, 2018 8: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 release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

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

Post by grsbanks »

DMCP loads the .pgm file into and runs it from the STM32L476's internal flash memory.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Post Reply