I’m sure this would probably take up a ton of memory, but what if we stored the contents of the CONFIG_FILE as a string literal that could be retrieved later in serial monitor with show_config?
Maybe just the BladeConfig?
Maybe check for an SD card before uploading and copy the config file there ?
All far fetched I’m sure, but worth pondering?
Just trying to help alleviate another poor user who wasn’t provided their config file at time of purchase.
My suggestion is to not help them, just send them back to the seller.
That said, I’ve been pondering adding some simple serial monitor commands for reading and writing files. I was planning to use them in the ProffieOS workbench. However, if we have those commands, we may also be able to write some scripts that connects to the serial port and uploads the config file to the SD card after programming.
Another idea we’ve tossing around is to upload the config to a central repository. That central repository could be indexed by the proffieboard serial number and/or the a hash of the flash memory.
Of course, none of these ideas help if the installer modified the OS directly…
One day, we’ll have linux running on our sabers, and compilation will happen on the saber itself. Updating to a new OS will be a button press and adding fonts will be done by an in-saber store… (but not today)
So, ProffieOS has a makefile in it, and I recently updated it to use arduino-cli.
It doesn’t have targets for uploading, but those could easily be added.
I primarily use the makefile to run “make test” which sets up multiple builds with multiple config files and runs them all to make sure they all compile. Because it’s a makefile it integrates nicely with emacs, and any other editor that has a “compile mode”.
Agreed, but I don’t think it can be set up to where average installer Joe would unknowingly have that be part of his established upload routines, because Arduino IDE doesn’t seem to have a way to have an external script to run during compile.
Also, there’s no guarantee an SD card is inserted during upload. Any ideas?
Good point.
Unfortunately, my next idea has a similar problem, but I still kind of like it…
ZIP files!
Zip files are made to be read from the end, and it doesn’t matter what is at the beginning of the file.
That means, that if there is sufficient space in board memory, you can zip up the config file, add it to the end of the flash memory and fill up the region in between with zeroes.
To recover the config file, all you have to do is to dump the flash memory (there is a web page that lets you do that) and then unzip the result.
Since the config file would be compressed, it would take less space and fit more often.
PROS
the only extra steps are to add some data to the file after linking
works with existing tools
works even if there no SD card in the board when programming