text: /**
    @Generated 16-bit Bootloader Source File
  
    @Company:
      Microchip Technology Inc.
  
    @File Name: 
      boot_verify_not_blank.c
  
    @Summary:
      This is the boot_verify_not_blank.c file generated using 16-bit Bootloader
  
    @Description:
      This header file provides implementations for driver APIs for all modules selected in the GUI.
      Generation Information :
          Product Revision  :  16-bit Bootloader - 1.17.2
          Device            :  PIC24EP256GP204
      The generated drivers are tested against the following:
          Compiler          :  XC16 v1.36B
          MPLAB             :  MPLAB X v5.15
  */
  /*
  Copyright (c) [2012-2019] Microchip Technology Inc.  
  
      All rights reserved.
  
      You are permitted to use the accompanying software and its derivatives 
      with Microchip products. See the Microchip license agreement accompanying 
      this software, if any, for additional info regarding your rights and 
      obligations.
      
      MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT 
      WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT 
      LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT 
      AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
      LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT 
      LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE 
      THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT 
      LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, 
      OR OTHER SIMILAR COSTS. 
      
      To the fullest extend allowed by law, Microchip and its licensors 
      liability will not exceed the amount of fees, if any, that you paid 
      directly to Microchip to use this software. 
      
      THIRD PARTY SOFTWARE:  Notwithstanding anything to the contrary, any 
      third party software accompanying this software is subject to the terms 
      and conditions of the third party's license agreement.  To the extent 
      required by third party licenses covering such third party software, 
      the terms of such license will apply in lieu of the terms provided in 
      this notice or applicable license.  To the extent the terms of such 
      third party licenses prohibit any of the restrictions described here, 
      such restrictions will not apply to such third party software.
  */
  
  #include "boot_config.h"
  #include "../memory/flash.h"
  #include <stdbool.h>
  
  bool BOOT_Verify(void)
  {
  	/* We are doing a blank check, so let's just test the first address of
  	 * memory to see if it is blank or not.  The first address is programmed 
  	 * last by the example Unified Bootloader Host Application (UBHA) tool so
  	 * if this address is programmed, then the device programming should be
  	 * complete.
  	 * 
  	 * NOTE: This method only checks that the first address of memory is
  	 * programmed.  It does not check the integrity of any of the program data.
  	 * To select a more complete verification method, please go to the bootloader
  	 * MCC module and make a different verification method selection.
  	 */
      return (FLASH_ReadWord24(BOOT_CONFIG_APPLICATION_RESET_ADDRESS) != 0x00FFFFFF);
  }
  