All,
This is continuation of the Solved: Re: Boot Application for MPC5775E - NXP Community.
I have now my boot application allocated to the Block0 of 256K sectors.ie 800000 - 83FFFF.

My application now starts from 840000.
I am using the S32DS processor expert and below code for erasing 15 blocks as one block is where I am executing from
Unlock the sector ->
ret = FLASH_DRV_SetLock(C55_BLOCK_256K_FIRST, 0x8000FFFFU);
/* Erase block */
blockSelect.lowBlockSelect = 0x0U;
blockSelect.midBlockSelect = 0x0U;
blockSelect.highBlockSelect = 0x0U;
blockSelect.first256KBlockSelect = 0xFFFF0000U;
blockSelect.second256KBlockSelect = 0x0U;
ret = FLASH_DRV_Erase(ERS_OPT_MAIN_SPACE, &blockSelect);
The erase looks ok, but when I program the flash I get exception IVOR1
Code is below
ret = FLASH_DRV_Program(&pCtxData,0x00840000,size,from);
Exception as below, with Instruction fetch error bit set in the MCSR register.


@lukaszadrapa please help!