LPM executing from the Boot Loader section is not allowed toread from the Application section. If Interrupt Vectors are placedin the Boot Loader section, interrupts are disabled whileexecuting from the Application section.
Your best source of information is the data sheet section on the lock bits. Obviously, some of the people whose posts you quote are confused.It is not entirely clear what you want to do, but to disable program memory reads from the bootloader code, that would appear to be BLB0 mode 4.In this mode:
And I would like to test if I can still read the hex file from it or not once I have set the lock bits.
My recommendation concerned reading program memory from the bootloader memory section, which evidently does not apply to your case.If this is a commercial venture, you need to do some experimentation to fully understand the functionality of the lock bits, then decide what is best for your application. Also, consult AVRFreaks forum members. Those people live and breathe details like these.To test that, attempt to read the program memory and check whether the expected values are returned.
Here's what the lockbits look like from my Atmega328P
Code: [Select]Atmel Studio
So you mean the right way is to set the lock to 0x0F?
How'd you get Studio to be in "dark mode" ?
Code: [Select]How'd you get Studio to be in "dark mode" ?There's a built-in theme under Tools > Options