Hello all,
I want to verify the data written at the OTA update using the TI example out_of_the_box\ota_archive.c.
The answer in the topic e2e.ti.com/.../cc3235modasf-sl_fswrite---data-consistency inspired me to simply add a call to the function sl_FsRead after the data are written in the state OtaArchiveState_SaveFile.
That results in the error SL_ERROR_FS_FILE_ACCESS_IS_DIFFERENT (-10329L).
Adding an additional FsOpenFlags |= SL_FS_READ to sl_FsOpen results in an security error.
Open Flags set in ota_archive.c:
FsOpenFlags = SL_FS_CREATE;
FsOpenFlags |= SL_FS_OVERWRITE;
FsOpenFlags |= SL_FS_CREATE_NOSIGNATURE;
FsOpenFlags |= SL_FS_WRITE_BUNDLE_FILE;
FsOpenFlags |= SL_FS_CREATE_FAILSAFE;
The TI documentation states the the token returned by the function sl_FsOpen can be used to access the file.
In my case that token is always 0.
My questions are:
How can I get the right file token for secured files that are overwritten during the update process, e.g. /sys/mcuflashimg.bin?
Is the behavior related to sl_FsOpen is the same for all secured files, that one signed with an certificate and that ones without signing?
Best regards,
Roman