Hi Quatre,
One thing that I want to test in my application is self-programming flash using the SPM command. The stable branch in the git repository does not provide support for the SPM instruction. However, the master branch seems to, as there is code for it in decode.cpp. What is the state of the master branch, and would I be able to use the SPM command successfully?
If yes, I think in the SPM code in decode.cpp, using SPM outside of the
No-Read-White-Write section is ignored. From what I can tell from the atmega128
data sheets, it seems the microcontroller will allow the SPM command both in
the Read-While-Write and No-Read-While-Write sections. Is preventing the SPM
command in the Read-While-Write section a simplification, to prevent
potentially unpredictable behaviour?
One last question. Is there an example or test available showing the simulator
using the SPM command?
You're right. stable branch ist the state of simulavr before we switched
to git and before Onno started to make some improvments and new
features. The master branch is the latest and hopefully stable code of
simulavr. Unfortunately we havn't made a release from this new code till
now.
And you're right too, that in master branch is self-programming
functionality. I've tested (and developed ... ;-) ) it with amforth!
amfoth uses programming to save new forth words. So it should work for
normal programming cases. In the moment I work on fuses, lock bits and
some special lpm and spm functionality. This code you'll find in
devel-tomk branch. But hold in mind, this is code in development!
A coding example for spm programming isn't available. I have written
some tests for reading fuses, reading and writing lock bits. This is
actually only in devel-tomk branch. (you'll find it below regress
directory!) But not for writing some data to flash. I think, that I'll
do that next time, because it's a good idea to have some tests for that
too. If you like, you can start with this test programs to write such
test for programming a flash block by spm self programming.
cu, Thomas
_______________________________________________
Simulavr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/simulavr-devel