Pb Sending flash content over FCM V24 connection



I’m using the following code to get content of all flash object for a specific Handle:

void trc_flhRead()
u16 i;
s32 len, pos;

for(i=1;i<TRC_OBJ_MAX;i++) {
len=adl_flhExist ( (ascii*)trc_NameBuffer, i );
if ( len > 0 ) fcm_DataLen+=len;

if (fcm_DataLen>0)
if (fcm_Data)
if ( (len=adl_flhExist ( (ascii*)trc_NameBuffer, i )) > 0 )
adl_flhRead ( (ascii*)trc_NameBuffer, i, len, fcm_Data+pos );
} else
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 ?



sorry for that stupid post, i found my mistake.


What was the mistake? It may shed light on what I am trying to achieve which is very similar.