Attached is my sample driver code and corresponding trace.
Upon further research, it is definitely a problem with the last read in the set. So assume I am reading 256 byte chunks. For a 656 byte file, I read a chunk at offset 0, I read a second chunk at offset 256, and I read the third chunk at offset 512.
If I trim back the buffer size for the third chunk to exactly 144 (which matches the file size), then it all seems to work. But if I leave the buffer size at 256, and expect the system to truncate the request back to the last 144 bytes, then it fails. The system already knows the available file size, so I would think it would be reasonable for it to account for the size of the last request.
I am attempting to create a simple, minimal footprint app that uses a fixed buffer length and then dumps each buffer into a file (or out a socket, or into any other arbitrary data sink). I would prefer NOT to have to allocate a single buffer to handle the largest conceivable file, since I am working with a test device that has files of 32K.
Version info:
#define SW_VER_PPP "AKX"
#define SW_VER_NUM "0.3"
#define SW_VER_DEV "09"
#define SW_VER_BRANCH " " [file name=TestCase.zip size=10245]
http://www.thisisant.com/images/fbfiles/files/TestCase.zip[/file]