I compiled and execute the "evkmimxrt1010_dev_msc_ramdisk_lite_bm" example, all is working but only a 4KB U disk is created; may you help me to understand how to increase the disk size and to understand how this code works ?
On the board a 128Mbit flash is mounted (FlexSPI AT25SF128A-SHB-T); is it possible to use a part of it to create an U disk ? In what way ?
Is it possible to do the same mounting and using the MX25L4006EM2R-12G LpSPI flash ?
Thank you
Luigi
Hi @LuigiV
Thank you for reaching out and for your patience.
To increase disk size, you need to find the DISK_SIZE_NORMAL macro and increase the size of the TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL macro.
The dev_msc_ramdisk_lite_bm demo is conveniently set to work with NCACHE SRAM, so it is extremely limited max disk size you can get if using NACHA SRAM, is about 30 KB, so I understand why you may want to use flash.
It is possible to create a U-disk using your NOR flash memory. But you need to consider about the fact that most of NOR flash memories do not support read/write while you do XIP. So, some these functions will need to be linked to SRAM. To see how to write from flash you can check the flexspi_nor_polling_transfer_demo from the EVK.
The RT1020 SDK does include a dev_msc_disk_lite_bm. Like the dev_msc_ramdisk_lite_bm this demo enumerates an USB disk , but instead of creating disk file system on SRAM, it uses a SD card. You can try change SD card interfacing by the NOR flash interfacing, and that is a way to get your desired application with any of your flash memories.
I recommend using a file comparison tool to check the differences between dev_msc_ramdisk_lite_bm and dev_msc_disk_lite_bm.
I hope this could help you.
Diego