This MDK-Middleware example project implements a mass storage USB Device using Mass Storage device Class.
For detailed description see USB Device MSC Example section in MDK-Middleware documentation.
For successful build and operation the project needs to be extended with a board layer that implements required connections to the target hardware interfaces. For details see example documentation referenced above.
The implementation uses on-chip RAM as a storage device. The USB Host can access this memory drive using standard file access methods.