I want to make a product that will have an ATmega but you know that Arduino is intended to be “open-source” but I don’t like the idea of people copying my code for the product and making knock-off versions of it. Is there any way I could lock the chip so It can not be programmed again and make the code undumpable?
For absolute security, also forget the bootloader & program the device using the ISP interface.
That uses a six pin header connected directly to the MCU.
Once you have a tested and working program, you can use one of these:
Drop the Arduino IDE and develop in MPLABX.
I just tried setting MPLABX up to program an ATMEGA328p without any problem.
I don't have any chips to try compiling.