Geoff Field
Forum Replies Created
-
AuthorPosts
-
Geoff Field
ParticipantThanks Mike,
The FM_APPEND flag wasn’t in the version I posted, so there was no reason to mention it.
I just wish there was more documentation on some of the functions, such as what the return values are, what the flags actually do, etc.
Oh yes: one last rookie error.
If you look at my original code, you’ll note that I’m reading the result of writeUserFile() into a Boolean.You’d never think I’d been writing software for 30 years…
Regards,
Geoff
Geoff Field
ParticipantI have now worked out what was going wrong with my code. It was mostly rookie mistakes.
First, the block-scope “result” variable overwrote the function-scope “result” variable, resulting in incorrect error reporting.
Secondly, I had issues reading the log reliably. Once I had the log dump working correctly and reporting the offsets, I was able to see exactly what was going on.
Finally, in the last version I tried I had set the “FM_APPEND” flag (out of desperation) so it was appending to the log regardless of what I did.Once I had fixed up all of the above, my problems went away.
Thanks to Mike in particular for help with confirming that the functionality actually worked.
Geoff
Geoff Field
ParticipantHi Mike,
Thanks for the quick response.
Your code worked correctly with my version of the library. See the PuTTY log below.
I note that the mDot library has moved on by numerous revisions since the version I have on my system. I’m told by the original developer of the system that a newer version broke things, but I might try updating anyway. I did have problems compiling the project as stored in the Mercurial repository, mostly caused my current ignorance of how to set up to compile the device on the EmBitz platform. I’ll work that out, probably by the last resort of reading the manuals…
Regards,
Geoff
[INFO] version: 0.0.9-1-ge7286ba
[INFO] deleting user files
deleting test_file.txt [1024]
[INFO] creating 1kB file of 0x3B
[INFO] seeking to 0x0025
[INFO] writing 8 ‘0xA2’ bytes to 0x0025
[INFO] seeking to 0x00B7
[INFO] writing 8 ‘0xA2’ bytes to 0x00B7
[INFO] seeking to 0x0366
[INFO] writing 8 ‘0xA2’ bytes to 0x0366
[INFO] seeking to 0x01D1
[INFO] writing 8 ‘0xA2’ bytes to 0x01D1
[INFO] seeking to 0x02FC
[INFO] writing 8 ‘0xA2’ bytes to 0x02FC
[INFO] seeking to 0x016C
[INFO] writing 8 ‘0xA2’ bytes to 0x016C
[INFO] seeking to 0x0178
[INFO] writing 8 ‘0xA2’ bytes to 0x0178
[INFO] seeking to 0x03B0
[INFO] writing 8 ‘0xA2’ bytes to 0x03B0
[INFO] seeking to 0x0278
[INFO] writing 8 ‘0xA2’ bytes to 0x0278
[INFO] seeking to 0x00C7
[INFO] writing 8 ‘0xA2’ bytes to 0x00C7
[INFO] file data:
0x0000 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0010 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0020 3B 3B 3B 3B 3B A2 A2 A2 A2 A2 A2 A2 A2 3B 3B 3B
0x0030 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0040 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0050 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0060 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0070 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0080 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0090 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x00A0 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x00B0 3B 3B 3B 3B 3B 3B 3B A2 A2 A2 A2 A2 A2 A2 A2 3B
0x00C0 3B 3B 3B 3B 3B 3B 3B A2 A2 A2 A2 A2 A2 A2 A2 3B
0x00D0 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x00E0 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x00F0 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B 3B
0x0100 3B 3B 3B 3B 3B 3B 3B 3B 3B 3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