I'm working on making a commercial product that for now runs on a PMC. What I'd like to do is be able to distribute compiled firmware updates for customers to upload in as simple of an 'update firmware' type fashion as possible in order to keep the process simple for them, and prying eyes away from my source code.
At the moment it seems like OTA updates may be the way to go, but not needing a network connection is a selling point on my product, so I'm trying to avoid that option.
Is there a way to do this without writing my own program to perform the action? (Which would likely be well over my head.)
I do not think that its possible without some form of coding. You can find the exact commands that are issued for an upload if you enable verbose output during upload. Next you can write a program (it could be a script) to issue those commands.
Distribution of your code needs to contain that program as well as all stuff needed by that program.
As Arduino stuff is open source, be aware that you might have to release the source code on request.
Thank you. Wouldn't some commands issued in the IDE only be valid inside the IDE? While I can send a serial command to the PMC to enter a certain state, say to prepare to receive a file, but I would think it's more than just a serial command to actually send the firmware file transfer to the PMC?
While I don't intend to publish it, I don't particularly mind if my code is seen, as chatGPT could probably whip up an better equivalent program in minutes. It's more that end users are a fiddly bunch, and if an end user can screw with something, they will. So if they can see the code, they'll undoubtedly alter it and may create a dangerous situation / damage the machine.
The IDE is just a shell around a number of applications; you can execute those applications (with the correct parameters) manually on a command line or in a script.
E.g. for AVR based boards, the main command is avrdude. If that board supports native USB (like a Leonardo) there is an additional step before avrdude is executed; the serial port is opened and closed with abaudrate of 1200 baud to invoke the bootloader. You can simulate that step in a script and next call avrdude.