cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a text file in Nucleo?

JChan.0
Associate II

I am using a Nucleo F429ZI. I have noticed when I plug it in via the debugger, my computer treats it like an external drive (which it calls NODE), where it seems I can store stuff. Is it possible to store a text file in this space generated from my program? For example, right now I am using the fopen() function to create a text file (with no reference to a directory) and it is saving to the project folder in my computer (I believe through semihosting). Is there a way I can save it into the Nucleo's memory space instead. I have seen suggestions about using a FatFs but I wasn't sure if that's the same thing or if there were other ways.

1 REPLY 1

The disk drive feature of the debugger port is intended as a programmer convenience. It is meant for drag and drop programming.

You're talking to the debugger's processor, not your application processor.

To do what you want, you'd plug into the other USB port on the nucleo board and write yourself an application to support a USB MSC device, then use FatFS to store your text file in internal or external flash.

You'd still have to figure out all of the intricacies of read while writing, avoiding wearing out your processor, etcetera. But at least you'll be talking to the proper processor at that point.