when I load that bootloader by a USBasp, fuses will be programmed with that values?
If I have a ATmega328P with a 16MHz XTAL installed, can I switch between XTAL 16MHz and internal 1Mhz only reprogramming the bootloader by thr USBasp or I have to burn fuses with Burn-o-mat or similar?
"Burn Bootloader" does program the fuses as appropriate.
Note that if you're using Optiboot, you need to either rebuild optiboot for 1mhz, or divide the normal optiboot upload speed by 16 (or 8 ) if you're using optiboot .hex built for 16mhz (or 8mhz), so 7200 (or 14400). I do not think 9600 is the correct baud rate unless that's a custom build of optiboot, in which case you should name it something different from the 16mhz bootloader.
I program the processor by a USBasp interface. I lowered upload speed to a reasonable value, but I will not use it. May I have other problems?
If I choose "uno1MHz" in the IDE board selection and I wrote in boards.txt:
uno1MHz.bootloader.low_fuses=0x62
uno1MHz.bootloader.high_fuses=0xd9
uno1MHz.bootloader.extended_fuses=0xfd
when I load the bootloader by the USBasp, fuses will be programmed 62, D9, FD?
I guess I can set a 328P at 16MHz or back to 1MHz only burning a bootloader, without any possibility of errors. If I don't need to program other fuses, I could choose between the two presets...
Are you not planning to use optiboot at 1mhz? (ie, programming with USBasp only to upload sketch, not via serial with the help of the bootloader (the normal way of uploading)) In that case, why put optiboot on it at all? You'd save 512 bytes of flash and skip the delay on startup while it runs the bootloader.
If you are planning to upload via serial, you need to set the upload speed to the speed that the bootloader is expecting, otherwise the serial communication won't work. Either by rebuilding optiboot for the specified upload speed and clock rate, or by using one for a different speed, and adjusting the upload speed appropriately.
Yes, your understanding of the bootloader.*_fuses options are correct - "Burn Bootloader" will program the fuses to those specifications.
There are no tools that read "boards.txt" OTHER than the arduino IDE.
The IDE "Burn bootloader" command DOES burn the fuses, using whatever programmer you've selected.
But this means that if you use something other than the IDE to burn the bootloader (avrdude directly, optiloader, or Nick's bootloader loader) it will NOT be looking at the boards.txt file, and may not program the fuses at all.
But this means that if you use something other than the IDE to burn the bootloader it will NOT be looking at the boards.txt file, and may not program the fuses at all.