/* This function should not be in .ramcode, because it will be called only once before self-upgrade.  */
void lpc43xn_iap_init(void)
/* This function should not be in .ramcode, because it will be called only once before self-upgrade.  */
void lpc43xn_iap_init(void)
{
	lpc43xn_iap_entry = (lpc43xn_iap) *(u32*)IAP_LOCATION_PTR;
	iap_commands[0] = IAP_CMD_INIT;
	lpc43xn_iap_entry(iap_commands, iap_results);
	if (iap_results[0] != IAP_STATUS_SUCCESS) {
		printf("%s: failed %d\n", __func__, iap_results[0]);
		return;
	}
}