#if defined (__USE_LPCOPEN)
#if defined(NO_BOARD_LIB)
#include "chip.h"
#else
#include "board.h"
#include "chip.h"
#endif
#endif
#include <cr_section_macros.h>
// TODO: insert other include files here
#include "stdio.h"
#include "string.h"
#define START_ADDRESS 0x1B000000
#define END_ADDRESS 4096
// TODO: insert other definitions and declarations here
int main(void) {
#if defined (__USE_LPCOPEN)
// Read clock settings and update SystemCoreClock variable
SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
// Set up and initialize all required blocks and
// functions related to the board hardware
Board_Init();
// Set the LED to the state of "On"
Board_LED_Set(0, true);
#endif
#endif
// TODO: insert code here
// Board_Debug_Init();
uint32_t sector_end = START_ADDRESS + END_ADDRESS - 1;
Chip_IAP_PreSectorForReadWrite(START_ADDRESS, sector_end, IAP_FLASH_BANK_B);
Chip_IAP_EraseSector(START_ADDRESS, sector_end, IAP_FLASH_BANK_B);
uint32_t buffer[] = {0xFF, 0x01, 0x02, 0x03, 0xAA};
Chip_IAP_CopyRamToFlash(START_ADDRESS, buffer, sizeof(buffer));
while(1)
{
}
return 0 ;
}