I’m using the following code to get content of all flash object for a specific Handle:
s32 len, pos;
len=adl_flhExist ( (ascii*)trc_NameBuffer, i );
if ( len > 0 ) fcm_DataLen+=len;
if ( (len=adl_flhExist ( (ascii*)trc_NameBuffer, i )) > 0 )
adl_flhRead ( (ascii*)trc_NameBuffer, i, len, fcm_Data+pos );
MainTrace ( trc_TraceLevel, “[TRC] Memory allocation error” );
First I compute the total size of flash object.
Then I put it in an allocated buffer.
After sending it via the FCM, if I run this function again, my buffer is larger than previously (x2 in fact) and data are duplicated in flash !!
Of course no write in flash are done, only flhExist and flhRead in trc_flhRead.
Anybody knows why the flash memory seems to be duplicated after executing the function above ?