Hello Mark,
I planned using some database code source with SPI eeprom using µfileSystem.
It look quite good with the simulator, but I got problems with writing to file.
The code reads from a file using fseek (in a tempory buffer) then performs some write with fseek too....
Here is some debug value : at the end the dump shows the data were written but sequentially...
Seek<>length:value
from here reading with seek
@0000<=0200:
@0200<=0200:
@0400<=0200:
@0600<=0200:
@0800<=0200:
@0a00<=0200:
@0c00<=0200:
@0e00<=0200:
from here writing with seek
@0028=>0008:€
@0000=>0008:JL
@0028=>0008:€
@0008=>0002:€€
@000a=>001e:€™address[name:S,country:S]‚ˆ
@0030=>0008:€
@0000=>0008:JL
Commit 1
@0085=>0008:€
@0000=>0008:JL
@0085=>0008:€
@0038=>0018:John Williams
@0050=>0001:®
@0051=>0009:UK
@005a=>0001:c
@005b=>000c:€‚˜¸Ð€‰ÑÚ€
@0067=>001e:€™address[name:S,country:S]ŒÛ
@008d=>0008:€
@0000=>0008:JL
Commit 2
#dump
DUMP myfile.dat
00000000:80 00 00 00 00 00 00 28 4a 4c 1a ff ff ff ff ff €
00000010:80 00 00 00 00 00 00 28 80 80 80 99 61 64 64 72 €
00000020:65 73 73 5b 6e 61 6d 65 3a 53 2c 63 6f 75 6e 74 ess[name:S,count
00000030:72 79 3a 53 5d 81 82 88 80 00 00 1e 00 00 00 0a ry:S]‚ˆ€
00000040:4a 4c 1a 00 00 00 00 38 80 00 00 00 00 00 00 85 JL
00000050:4a 4c 1a 00 00 00 00 95 80 00 00 00 00 00 00 85 JL
00000060:4a 6f 68 6e 20 57 69 6c 6c 69 61 6d 73 00 50 61 John Williams
00000070:63 6f 20 50 65 6e 61 00 ae 55 4b 00 53 70 61 69 co Pena
00000080:6e 00 63 80 82 98 b8 81 d0 80 89 d1 81 da 80 80 n
00000090:99 61 64 64 72 65 73 73 5b 6e 61 6d 65 3a 53 2c ™address[name:S,
000000a0:63 6f 75 6e 74 72 79 3a 53 5d 81 8c db 80 00 00 country:S]ŒÛ€
000000b0:1e 00 00 00 67 4a 4c 1a 00 00 00 00 95
#