In IAR/Keil environment , when you change to other flash(not default flash on EVK board), please refer to below AN to modify the code for it.
https://www.nxp.com/docs/en/nxp/application-notes/AN12183.pdf