cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link's Mass storage file write from firmware application

jboui.1
Associate II

Hello everyone,

i would like to know if it would be possible to write data on the STLINK mass storage device from the firmware application. This would be really awesome for debugging, logging, testing, etc.

I am only aware of dragAndDrop programming feature, but would like to know what else this mass storage can be used for.

Best.

5 REPLIES 5

And where would this data live in the mean time?

Couldn't you just write a USB MSC on the Target side, with actual memory behind it?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

The debugger mass storage device have 6Mo capacity.. this is enough for doing nice things ...

what do you mean by meantime ? 
a application debugger command to send data to the debugger, and debugger doing whatever it want with it ( writting in RAM to make it available to mass storage device)

 

TDK
Guru

The "Mass storage device" exposed by ST-Link is not a real device. It's just an interface to transfer new firmware files. The "6 MB" doesn't exist anywhere, it's fake.

If you feel a post has answered your question, please click "Accept as Solution".

I mean it's a fake MSC with a fake file system behind it, for the sole purpose of moving data the PC attempts to write/copy into the drive, to be pushed into the internal flash of the target STM32

There's not actual capacity, or storage, and definitely not 6MB

It's a magic trick, slight of hand, sufficient to **bleep** the PC OS.

On the Target STM32 you could create a USB MSC that's a (SD)RAM-DISK or QSPI-DISK of whatever capacity those devices can provide in actuality. You could also more directly act as a USB MSC to a MicroSD or eMMC device.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..