Hi,
given full flash sample code
/********************************************************************************************/
/* Hello_World.c - Copyright Wavecom S.A. (c) 2002 */
/* */
/* */
/* DISCLAIMER OF WARRANTY */
/* ====================== */
/* This Software is provided free of charge on an 'as is' basis. No warranty is given */
/* by Wavecom S.A. in relation to the Software of the uses to which it may be put by you, */
/* the user, or its merchantability, fitness or suitability for any particular purpose */
/* or conditions; and/or that the use of the Software and all documentation relating */
/* thereto by the Licensee will not infringe any third party copyright or other */
/* intellectual property rights. Wavecom S.A. shall furthermore be under no obligation */
/* to provide support of any nature for the Software and the Documentation. */
/* */
/* LIMIT OF LIABILITY */
/* ================== */
/* In no event shall Wavecom S.A. be liable for any loss or damages whatsoever or howsoever */
/* caused arising directly or indirectly in connection with this licence, the Software, */
/* its use or otherwise except to the extent that such liability may not be lawfully */
/* excluded. Notwithstanding the generality of the foregoing, Wavecom S.A. expressly */
/* excludes liability for indirect, special, incidental or consequential loss or damage */
/* which may arise in respect of the Software or its use, or in respect of other equipment */
/* or property, or for loss of profit, business, revenue, goodwill or anticipated savings. */
/* */
/********************************************************************************************/
/***************************************************************************/
/* File : Hello_World.c */
/*-------------------------------------------------------------------------*/
/* Object : Customer application */
/* */
/* contents : Customer main procedures */
/* */
/* Change : */
/***************************************************************************/
/*
$LogWavecom: G:\projet\mmi\pvcsarch\archives\open-mmi\SAMPLES\adl\Hello_World\src\hello_world.c-arc $
* --------------------------------------------------------------------------
* Date | Author | Revision | Description
* ----------+--------+----------------+-------------------------------------
* 25.10.05 | DPO | 1.2 | * New V4 interface
* ----------+--------+----------------+-------------------------------------
* 11.12.02 | dpo | 1.1 | * Timer subscription update
* ----------+--------+----------------+-------------------------------------
* 06.11.02 | dpo | 1.0 | Initial revision.
* ----------+--------+----------------+-------------------------------------
*/
#include "adl_global.h"
/***************************************************************************/
/* Mandatory variables */
/*-------------------------------------------------------------------------*/
/* wm_apmCustomStackSize */
/*-------------------------------------------------------------------------*/
/***************************************************************************/
const u16 wm_apmCustomStackSize = 1024*3;
#define FLHID_COUNT 117
//static const ascii * FLH_HANDLE = "Wmtest";
#define FLH_HANDLE "Nagtest4"
/***************************************************************************/
/* Function : adl_main */
/*-------------------------------------------------------------------------*/
/* Object : Customer application initialisation */
/* */
/*-------------------------------------------------------------------------*/
/* Variable Name |IN |OUT|GLB| Utilisation */
/*--------------------+---+---+---+----------------------------------------*/
/* InitType | | | | Application start mode reason */
/*--------------------+---+---+---+----------------------------------------*/
/***************************************************************************/
void adl_main ( adl_InitType_e InitType )
{
s32 IdCount;
ascii ParamStr[25];
s8 FlashRetVal;
s8 retval;
ascii buff[50];
u8 m;
TRACE (( 1, "Embedded : Appli Init 6 " ));
// Subscribe to the flash object
FlashRetVal = adl_flhSubscribe ( FLH_HANDLE, FLHID_COUNT );
if (FlashRetVal == OK )
{
TRACE (( 1, "Embedded : Flash Subscribe Success " ));
// Check object count
IdCount = adl_flhGetIDCount ( FLH_HANDLE );
TRACE (( 1, "Subscribed IdCount: %d", IdCount ));
if ( IdCount != FLHID_COUNT )
{
adl_atSendResponse ( ADL_AT_UNS, "\r\nInit error: please reset flash objects (AT+WOPEN=3)\r\n" );
TRACE (( 1, "Embedded: Appli flash init error" ));
}
else
{
adl_atSendResponse ( ADL_AT_UNS, "\r\n Application started \r\n" );
TRACE (( 1, "Embedded : Appli is started" ));
}
wm_strcpy(ParamStr,"Hello Nagendra test");
//retval = adl_flhErase(FLH_HANDLE,1 );
//TRACE (( 1, "Flash Erase return value is: %d", retval ));
retval = adl_flhWrite ( FLH_HANDLE, FLHID_COUNT, 24, ParamStr);
TRACE (( 1, "Flash Write return value is: %d", retval ));
s32 Length = adl_flhExist ( FLH_HANDLE, FLHID_COUNT );
TRACE (( 1, "Length : %d", Length ));
retval = adl_flhRead(FLH_HANDLE,FLHID_COUNT,Length,(u8*)buff);
if(retval == OK)
{
TRACE (( 2, "Embedded : Flash Read Success " ));
}
TRACE (( 2, buff));
}
else
{
TRACE (( 1, "Embedded : Flash Subscribe Failed " ));
}
}
and trace results like
10/06/10,12:52:35:390 ADL 1 Binary header at 6E616180
10/06/10,12:52:36:437 ADL 16 [ADL PORT] subs (6E609F60) : 0
10/06/10,12:52:37:421 ADL 16 [ADL PORT] subs (6E603B00) : 1
10/06/10,12:52:37:437 ADL 22 [ADL] flash subs 2 : -4
10/06/10,12:52:37:453 ADL 22 Flh Obj 0000 Len : 4
10/06/10,12:52:37:468 ADL 22 Read Flh Obj 0000 (4) : 0
10/06/10,12:52:37:531 ADL 16 [ADL PORT] event : 0 (port 80 ; state 0)
10/06/10,12:52:37:796 ADL 16 [ADL PORT] event : 0 (port 70 ; state 0)
10/06/10,12:52:37:812 ADL 16 [ADL PORT] event : 0 (port 01 ; state 0)
10/06/10,12:52:37:828 ADL 16 [ADL PORT] event : 0 (port 02 ; state 0)
10/06/10,12:52:38:93 ADL 22 Flh Obj 0000 Len : 4
10/06/10,12:52:38:109 ADL 16 [ADL PORT] unsubs (1) : 0
10/06/10,12:52:39:203 ADL 1 Embedded : Appli Init 6
10/06/10,12:52:39:296 ADL 22 [ADL] flash subs 117 : 0
10/06/10,12:52:39:312 ADL 1 Embedded : Flash Subscribe Success
10/06/10,12:52:39:328 ADL 22 ID count : 117
10/06/10,12:52:39:343 ADL 1 Subscribed IdCount: 117
10/06/10,12:52:39:437 ADL 1 Embedded : Appli is started
10/06/10,12:52:39:468 ADL 22 Write Flh Obj 0075 (24) : -23 ; 130189
10/06/10,12:52:39:484 ADL 1 Flash Write return value is: -23
10/06/10,12:52:39:500 ADL 22 Flh Obj 0075 Len : 0
10/06/10,12:52:39:515 ADL 1 Length : -23
10/06/10,12:52:39:531 ADL 22 Read Flh Obj 0075 (65513) : -23
here iam getting error code -23
where do we get error code meanings ?
is there any documents please let me know?