Hi @vwsncr
I hope you are doing excellent!
Generally speaking, I think that this can be achieved by creating an adapter file for the Hyperflash memory, like the usb_sdcard_adapter.c / .h we have on the evkbimxrt1050_dev_msc_disk_bm example.
I do not know if you are also using our i.MXRT1050 EVK, but please try to verify proper operation of the Hyperflash memory before hand. Please see the evkbimxrt1050_flexspi_hyper_flash_polling_transfer example.
Also, I recommend you to you create a linkerscrypt to run the Hyperflash memory APIs from SRAM, this in the case you are performing XIP from this memory. Or for test purposes link whole application to SRAM.
I do not know what is the source of the error, but if is related to the Hyperflash adapter : Please try to diagnose which kind of error you are getting. For example, first see if you can initialize properly the memory and read out some commands, then see if erase operation is successful, and then if write is works too.
All the best,
Diego.