Thanks Rex for the help.
Unfortunately, I could not find any complete-working hello-world program for the same (no sample-program with OpenAT, neither any reference in the ADL-User-Guide).
Following is the code.
Upon execution, it gets stuck at Beginning installation … (even though file energy-meter_maestro-m100-2g_5.5.0_5.5.0.dwl is present on the file-system).
/**********************************************************************************************************************/
/*****************************************************************************/
/* Includes */
/*****************************************************************************/
#include "wm_types.h" /* Sierra Wireless types definitions */
#include "wm_stdio.h" /* Sierra Wireless standard input/output */
/* definitions */
#include "wm_list.h" /* Sierra Wireless List and Stack API definitions*/
#include "adl_str.h" /* String service */
#include "adl_port.h" /* Port service */
#include "adl_at.h" /* AT commands related structures definition */
#include "adl_ad.h" /* Application & Data storage service */
#include "adl_traces.h" /* Traces macros definition */
#include "adl_memory.h" /* Memory management functions */
#include "adl_error.h" /* Error functions and definitions */
#include "adl_AppliInit.h" /* Application initialization definitions */
#include "adl_RspHandler.h" /* AT command response definitions */
#include "adl_CmdHandler.h" /* AT command service definitions */
#include "adl_filesystem.h"
/***************************************************************************/
/* Mandatory variables */
/***************************************************************************/
// Application tasks prototypes
extern void main_task ( void );
// Application tasks declaration table
const adl_InitTasks_t adl_InitTasks [] =
{
{ main_task, 3072, "main", 1 },
{ 0, 0, 0, 0 }
};
static char LOG_GLOBAL_BUFFER[1024];
static void info_log(char * buf)
{
TRACE((4, (char*) buf));
memset(buf, 0, sizeof(LOG_GLOBAL_BUFFER));
}
void main_task ( void )
{
memset(LOG_GLOBAL_BUFFER, 0, sizeof(LOG_GLOBAL_BUFFER));
info_log("Beginning installation ...");
{
s32 ret = adl_fsInstall("energy-meter_maestro-m100-2g_5.5.0_5.5.0.dwl");
sprintf(LOG_GLOBAL_BUFFER, "return code is [%d]", ret);
info_log(LOG_GLOBAL_BUFFER);
}
}
Kindly point me to a complete working example for the adl_fsInstall API, I will be grateful.
Thanks and Regards,
Ajay