I wrote an experimental bootloader that load the user application in binary format at the address 0xe000 of the k60N512 the file have more than 400KB and fill Block0 and Block1 of the flash , the declared size of flashx is (0x80000-0xE000) ie whole space after the bootloader.
This application work fine with MQX3.7 but with MQX3.8.1 the flashx write() seems do not work correct when switching from Block0 to Block1 at this point the Function _io_flashx_find_correct_sectors() give an incorrect "location" that rise an unhandled interrupt when try to write() at this location (a huge number).
The flow of the porgram is:
fseek(flash_hdl, sectorOffset, IO_SEEK_SET);
write(flash_hdl, tempBuf, sizeof(tempBuf));
the "sectorOffset" is the liniar offest of the sector relative to the start of the binary file and to the start of flashx (0xe000).
When sectorOffset=204800 the write function rise an unhandled interrupt, the corresponding address in the flash space of K60N512 is 204800 +0xE000= 0x40000 ie the start of Block1.
Could someone help with this issue?