Compile and save file for future upload?

I have written some code which I would like to give to someone without them being able to see the source code.
Is there a way that I can compile the code and then save the binary file to a USB stick which someone else can then flash to their ESP32?

Hope that makes sense?


The compiled firmware is in .pio\build\<environment name>\firmware.bin, that can be used for flashing.

PlatformIO also supports a upload-without-build, so you may be able to build once, delete the source files, but keep the build output in .pio, and run that command.