commercial product with OpenMV

How do I protect my code when I have a commercial product with your OpenMV product?

We just added a new feature for that in the repo. You just need to include you main.py as a file in the frozen manifest when you build the firmware and the main.py script will override any main.py script found on an SD card or internal flash. Your script will be built into the firmware then.

After which, the firmware can still be readout. But, can can set the readout protection bits to disable that too.

Note that you are expected to be able to compile and flash the firmware for all of this.

An example on this would be very helpful. Thanks for the answer.

You put your main.py after debugging it in this folder:

Then you add it here:

openmv/manifest.py at master · openmv/openmv · GitHub (or OPENMV4P for the plus)

Then rebuild the firmware. The main.py will override any main.py at that point.

Regarding readout protection, you need to read the STM32H743 reference manual. There’s a section about setting the flash bits.