Microchip® Advanced Software Framework

common/components/wifi/winc1500/image_downloader_example/main.c File Reference

Image Downloader Example.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

#include <string.h>
#include "spi_flash/include/spi_flash_map.h"
#include "programmer/programmer_apis.h"
#include "driver/include/m2m_wifi.h"
#include "stdio_serial.h"
#include "binaries/m2m_aio_3a0.h"

Macros

#define STRING_EOL   "\r\n"
 the firmware image to be updated. More...
 
#define STRING_HEADER
 

Functions

static sint8 burn_firmware (void)
 Program firmware to WINC1500 memory. More...
 
static void configure_console (void)
 Configure UART console. More...
 
static sint8 dump_firmware_section (void)
 
int main (void)
 Main application function. More...
 

#define STRING_EOL   "\r\n"

the firmware image to be updated.

#define STRING_HEADER
Value:
"-- Image downloader example --"STRING_EOL \
"-- "BOARD_NAME " --"STRING_EOL \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
the firmware image to be updated.
Definition: common/components/wifi/winc1500/image_downloader_example/main.c:97

Referenced by main().

static sint8 burn_firmware ( void  )
static

Program firmware to WINC1500 memory.

Returns
M2M_SUCCESS on success, error code otherwise.

References FLASH_SECTOR_SZ, M2M_ERR_FAIL, M2M_SUCCESS, programmer_write_firmware_image, winc_fw, and winc_fw_size.

Referenced by main().

static void configure_console ( void  )
static
static sint8 dump_firmware_section ( void  )
static
int main ( void  )

Main application function.

Application entry point.

Returns
program return value.

References board_init(), burn_firmware(), configure_console(), dump_firmware_section(), M2M_SUCCESS, m2m_wifi_download_mode(), nm_bsp_init(), programmer_erase_all, STRING_HEADER, and sysclk_init().