I don’t know much about racket or StandardFirmata, however, if all you want to do is to upload that firmware from the terminal, i can help with that.
First go to the ArduinoIDE on the Pi, open the StandardFirmata example. The goto File->Preferences and make sure that Show verbose output during: compilation is selected.
The compile the standard firmata (Do not upload). You’ll get a message with the path to the hex file in the black screen below the editor (in the screenshot it is : /tmp/build79…44.tmp/StandardFirmwata.cpp.hex).
Next, goto that /tmp location and copy this file to a place where you can easily access it (/tmp folder gets erased during reboot, so it better to keep a copy). To upload this firmware which is the binary file for the StandardFirmwata, use this on the command line:
avrdude -c gpio1 -p m328p -U flash:w:StandardFirmata.cpp.hex from the folder where the StandardFirmata.cpp.hex is present. This will upload the firmware to the Arduberry. You can automate this to run at boot too.
Do let us know if you need any more help and also let us know more about the project that you are doing with this.