I haven't understend if (for a Pic and AVR Mega) I can take an upgrade firmware file and put directly into cpu (with programmer and not with bootloader function).
If it is thrue, in this mode the firmware is not protected, can someone confirm this ??
When you put your software with a programmer into PIC or AVR (or even some 8051) there are a lot of fuses which you should be able to manipulate with the programmers software.
Look for the Code Protection fuses and activate them before programming.
Afterwards program the desired cpu and your code will be protected agains readout
If you are programming this chip with downloaded firmware, there are two options:
1. device wasn`t code protected (so you can read it), and firmaware was partial
2. device was code protected (so to update you need to erase whole device, eeprom too) and firmware was complete.
These are true for PIC microcontrollers. If firmware should be applied via special software and direct connection to device firmware file can be even encrypted and digitally signed, because some PIC device have capability to change own flash memory by own program stored in flash memory (it is called self-programming).