Flash file system on mDot
- This topic has 5 replies, 2 voices, and was last updated 9 years, 3 months ago by 
Andrew Lindsay.
 
- 
		AuthorPosts
 - 
		
			
				
July 27, 2016 at 7:10 am #14332
Andrew Lindsay
ParticipantI’ve used the libmdot functions to create and read files in the flash storage. What I’m looking for is information on any way to access this via the USB mass storage device. I know the ST-Link adaptor in the UDK only implements a form of the USB Mass storage for uploading new firmware images and doesnt actually have any storage in the same way that some of the mbed boards do, like the LPC1768.
What I’m looking for is a way for the mDot to act as a mass storage device, temporarily, for a file to be copied to it.
Is this something that is possible?
Thanks
Andrew
July 27, 2016 at 7:21 am #14333Jason Reiss
KeymasterThe bootloader is part of the mDot platform and can be accessed by sending to the debug serial port just after reseting the device.
User files in the flash memory are saved with a ‘u_’ prefix prepended to the supplied name through libmDot api. Also if a file is uploaded with the prefix it should show in the libmDot file list.
bootloader :>
bootloader :> help
Available commands:
help: display this message
boot: start user application
upgrade: upgrade to new firmware transferred over serial 
transfer: transfer new firmware over serial, but don’t flash it 
recv simple: read file into the filesystem over serial 
recv ymodem [filename]: read file into the filesystem over serial
send: send file from the filesystem over serial 
flash: flash new firmware that has already been transferred
reset: perform a soft reset of the system
delete: delete the specififed file from the filesystem 
erase: erase entire 2MB external flash – BE SURE YOU WANT TO DO THIS!
July 28, 2016 at 5:15 am #14344Andrew Lindsay
ParticipantAre you saying I need to drop into the bootloader to transfer a file with a prefix of “u_”?
I was hoping to just drag the file to the mounted drive.thanks
Andrew
July 29, 2016 at 1:46 am #14361Andrew Lindsay
ParticipantOK, I used the recv simple option, how do I actually terminate the input? Is the file written to the flash once the upload is terminated?
thanks
Andrew
July 29, 2016 at 3:19 am #14362Andrew Lindsay
ParticipantUsing the ymodem transfer, I’ve got this to work.
thanks
Andrew
August 3, 2016 at 12:31 pm #14421Andrew Lindsay
ParticipantI’ve tried this a few times now and Ymodem file transfer doesnt seem to be very reliable. I am trying to transfer a 200byte file and it repeatedly times out.
I have gone back to trying plain text and raw binary but they dont seem to want to complete.
When the mDot is reset, I can see a 0 byte file when I list the files.
Any ideas?
thanks
Andrew
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.