Skip to content

Commit

Permalink
Add note on how to create a filesystem on Linux with identical geometry
Browse files Browse the repository at this point in the history
This is quite useful during debugging, and I've had to build it from
scratch a few times now.
  • Loading branch information
stecman committed Mar 12, 2022
1 parent 9660392 commit 539e352
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ const struct usb_config_descriptor config = {

// Filesystem size is (SECTOR_COUNT * SECTOR_SIZE) in bytes
// Note that sector size cannot be changed as usb_msc_init defines it
//
// An equivalent filesystem can be created as a file for reference on Linux using:
//
// mkfs.fat -F12 -i 55AA6922 -n SWITCH -s 1 -S 512 -g 64/32 -C example.bin 64
//
#define SECTOR_COUNT 128
#define SECTOR_SIZE 512
#define BYTES_PER_SECTOR 512
Expand Down

0 comments on commit 539e352

Please sign in to comment.