Project

General

Profile

$5000 eraseflashfrom

Added by DamirX about 1 year ago

Hi all!
Why I should use $5000 eraseflashfrom to clean the Mecrisp image?
Is $5000 value depend of which kind of Mecrisp image I use? I mean stm32f103 or stm32f103-ra? Is it really does not matter?
Example: https://github.com/jeelabs/embello/blob/master/explore/1608-forth/suf/f-common.fs

PS. English is not my native language, sorry for possibles mistakes.

--
DamirX


Replies (2)

RE: $5000 eraseflashfrom - Added by jcw about 1 year ago

The STM32F103-RA image is exactly 20 KB long, i.e. $5000 hex.
For the non-RA image, it's 16 KB, so then you'd have to use $4000.

The reason is that eraseflash is redefined in the USB build of Mecrisp, so that calling it won't delete the USB driver itself (and cause you to lose console access).

In normal use, just use eraseflash, you only should use $5000 eraseflashfrom when you really want to wipe everything except the Mecrisp core itself.

RE: $5000 eraseflashfrom - Added by DamirX about 1 year ago

Thanks for Your explanations!
So, I have no idea whats the reason to use some_value eraseflashfrom while normal development flow. I mean if I will guided by https://jeelabs.org/2016/06/thoughts-about-app-structure/ . Only if something goes wrong AND I know that magic value, from which I can eraseflashfrom. Am I right?
The next Q is:
Can You please advise some example code, or better to say a skeleton of Mecrisp project, which will be the best way to start using development practice in concert with https://jeelabs.org/2016/06/thoughts-about-app-structure/ ?

Thank You once again!

--
DamirX

    (1-2/2)