the other way you could do it is to make the USB look like a CDC class device (a comm port in fact) then on the PC side (because all USB aware OS support CDC) you just need a standard terminal program
That seems to be the 'normal' route to go, and if I was to use 'off-the-shelf' apps such as terminals, then that would be the way to go I suppose. But if I want to write my own app, it seems a file based approach seems the easiest and most universal. Although technically it may not the case, it also seems more 'direct' to me. For example, the bootloader idea I floated, it seems more direct/simple to write to a file called FLASH.AVR than to communicate via a com port in some specific protocol/method/whatever to accomplish the same thing (would be about as simple as it gets- copy binary file to 'fake' file, read back file to verify).
Quote:
the other way you could do it is to make the USB look like a CDC class device (a comm port in fact) then on the PC side (because all USB aware OS support CDC) you just need a standard terminal program
That seems to be the 'normal' route to go, and if I was to use 'off-the-shelf' apps such as terminals, then that would be the way to go I suppose.
But if I want to write my own app, it seems a file based approach seems the easiest and most universal.
The OS is also free to play whatever game it wants with MSDC - it can shuffle sectors at its will and write them in whichever order it finds convenient, and it can cache sectors on its own discretion
I control the sectors, so I can 'generate' the mbr/fat/dir sectors on-the-fly and let the os 'write' the date/times on the dir entries to keep it happy. No changing file sizes, file names, or deleting files though (it won't happen, so the os/app certainly won't like that if attempted). Cached data is a problem, and could be a showstopper unless the os+app can 'force' a new read. I'm testing on Vista now, which seems more 'aggressive' on caching the sectors than XP was. More to learn.