Flashing files to External SPI Flash

I’d like to upload a midi file (essentially just a text file) to my boron’s external spi flash and have installed dfu-util to do so, but I’m having doubts about whether or not this is possible given the fact that any file on the flash drive needs to be stored with its associated metadata, and I doubt that this metadata would get added via dfu-util.

Is it possible to use dfu-util add a .txt file at to the external flash which you can then read from your firmware? A workaround might be to simply copy the text file into a String in the firmware project, but I was hoping to not have to hard-code this data.

I would not attempt this. The external flash is used by Device OS for configuration, and overwriting it will cause strange and probably bad side effects.

Half of the flash is a file system and you can store files on it. You cannot save the files using dfu-util, but you can write firmware that programs your midi file to flash, then you can flash your real firmware to the device after the file is saved.

Thanks for the quick response, and for all the libraries you’ve built for Particle! I’ve been using PublishQueuePosixRK to publish live telemetry for this project and it’s great.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.