/* Write a data buffer to internal Flash. Note that we need for this function to reside in RAM since it will be used to self-upgrade U-boot in internal Flash.  */
u32 __attribute__((section(".ramcode")))
/* Write a data buffer to internal Flash. Note that we need for this function to reside in RAM since it will be used to self-upgrade U-boot in internal Flash.  */
u32 __attribute__((section(".ramcode")))
{
	iap_commands[0] = IAP_CMD_PREP_SECTORS;
	iap_commands[1] = start;
	iap_commands[2] = end;
	iap_commands[3] = bank;
	lpc43xn_iap_entry(iap_commands, iap_results);
	return iap_results[0];
}