Hi Chris,
I don't know if this helps in your particular case, but you can specify
"-f <path>" to use a local file for internal flash (assuming the app
calls `mcu_sim_parse_args()` in main). If you specify the name of an
existing file, the simulator will reuse its contents.
It doesn't look like anything is being persisted to the bin file.
When I run the .elf with the following parameters:
$ [path]/blinky.elf -f simflash.bin
And then connect with minicom to verify that some files are present on
the NFFS partition, I see the following (expected) results:
ls /cfg
002382 5 /cfg/id.txt
002382 26 /cfg/run
002383 2 files
002385 compat> cat /cfg/id.txt
5678
003002 compat> cat /cfg/run
split/status=0
id/serial=
Everything looks fine, but if I then exit and dump the .bin file with
xxd, the entire file is empty:
$ xxd simflash.bin
0000000: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000010: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000030: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000040: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000050: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000060: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000070: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000080: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000090: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000a0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000c0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000e0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
... identical to the end of the flash memory.
I'll try to track down the NFFS code to see if it is written to take the
simulator into account or not.
Thanks for the heads up on the flags, though!
Kevin