PIC32 BootLoader
Functions | Variables
main.c File Reference

In this file the functions are defined and processed the commands from the host. More...

#include "system.h"
#include "FlashDriver.h"
#include "UARTDriver.h"
Include dependency graph for main.c:

Functions

void main (void)
 
void initVarConfigPort (void)
 
void runApplcn (void)
 PC is updated with the new pointer to execute loaded binary from the application flash program memory.
 
void runStateMachine (void)
 function executes different states of the system. SYS_SND_ADDRS_RANGE - Send the PIC programmable start and end address of the program memory SYS_WAIT_FOR_START_CMND - The Start command triggers system to start the process and initializes buffer counter SYS_RCV_FIRMWARE_HEADER - Get the total packet count from the host and applcn start address SYS_CONFIG_FLASH - Erase application program area and update table pointer SYS_FIRMWARE_UPDATE - Receive and put the binary chunks in the flash memory SYS_RUN_APPLCN - Run the application
 

Variables

uint16_t progMemRange []
 

Detailed Description

In this file the functions are defined and processed the commands from the host.

Author
Mallikarjun Tirlapur
Date
29 Aug, 2016, 11:04 PM

Variable Documentation

§ progMemRange

uint16_t progMemRange[]
Initial value:
= {SYS_ADDRESS_RANGE_TAG, BYTE_ROW_SIZE,
(uint8_t)((APP_FLASH_END_ADDRES & 0xff000000) >> 24),
(uint8_t)((APP_FLASH_END_ADDRES & 0x00ff0000) >> 16),
(uint8_t)((APP_FLASH_END_ADDRES & 0x0000ff00) >> 8),
(uint8_t)(APP_FLASH_END_ADDRES & 0x000000ff),
(uint8_t)((APP_FLASH_BASE_ADDRESS & 0xff000000) >> 24),
(uint8_t)((APP_FLASH_BASE_ADDRESS & 0x00ff0000) >> 16),
(uint8_t)((APP_FLASH_BASE_ADDRESS & 0x0000ff00) >> 8),
(uint8_t)(APP_FLASH_BASE_ADDRESS & 0x000000ff)}
Definition: system.h:89
#define APP_FLASH_END_ADDRES
Definition: system.h:56
#define APP_FLASH_BASE_ADDRESS
Definition: system.h:55