1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist
bors[bot] 743ae3f095
Merge #19242
19242: usbus/msc: add initial Mass Storage Class support r=benpicco a=dylad

### Contribution description

This PR adds the initial support for Mass Storage Class in USBUS. This PR relies on the RIOT MTD implementation to implement the Mass Storage Class support. With the provided test application, a MTD device will be accessible as a normal storage device on your host computer.
Read and Write operations are allowed.
Multiple LUNs are supported so several MTD devices can be exported through USB.
The MSC relies on SCSI protocol to operate.

Currently there are some limitations:
    Supported host : Linux & Windows (macOS is untested)
    MSC cannot be used if MTD page size > 4096
    MTD device must have at least 512 bytes of memory to be exported.

Please be aware that performance are not so great.

### Testing procedure
Flash `tests/usbus_msc` application on a board with at least one MTD device.
Once the shell has started, prepare one or several MTD devices to be exported using `add_lun` command.
Once ready, start the USB connection with `usb_attach`

All MTD exported should appear as` /dev/sdX` on Linux.

### Issues/PRs references
Supersede #15941 


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-03-02 22:19:41 +00:00
..
pythonlibs riotctrl_shell.cord_ep: remove regif parameter 2022-10-10 10:57:37 +02:00
testbed-support make: Sort >/dev/null and 2>&1 when used with command 2022-04-16 10:04:20 +02:00
tools Merge #19242 2023-03-02 22:19:41 +00:00
empty.a make: OSX: don't fail for empty .a archives 2014-06-24 20:29:32 +02:00
gdbinit-docker tools: use 'BOARDSDIR' for the boards directory 2019-12-16 15:35:04 +01:00
Makefile makefiles: do not locally export compilation variables 2019-08-29 10:35:36 +02:00
usb_id_testing usb: Warn on test-ID usage in a unified location 2020-06-30 10:51:36 +02:00