I have to make a custom arduino nano board with modules.
On this card there will be nothing, it will be blank/raw (no bootloader or other ...). My question is how to upload program made with the arduino IDE into this arduino nano custom without installing anything just by sending the program with the ICSP pins?
Thanks!
PS : I have an arduino mega and USBasp AVR Programming Device for ATMEL processors for upload.
missdrew:
Burn the bootloader then upload using programmer - this will overwrite the bootloader, but set the fuses to the correct settings.
thank you, this is precisely my question, what are the modifications to be made in the basic program? and when you say to send the proramm with the programmer, can I let it program in AVRISP MKII? I have to go through the arduino mega in isp?
Yes. This programmer is supported. Just select Tools > Programmer > AVRISP mkII in the Arduino IDE.
kealmlj:
I remove the bootloader with the command: Burn the bootloader
The command is Tools > Burn Bootloader.
You need to connect the ISP programmer to the target board first.
This does not remove the bootloader. It actually flashes the bootloader. But before doing that it sets the configuration fuses on the microcontroller according to the definition of the currently selected board. So even though you don't want the bootloader, the Burn Bootloader process can be useful. For example, the default setting of the ATmega328P when you get it fresh from the factory is to run at 1 MHz from the internal oscillator. But the real Nano's fuses are configured so it runs at 16 MHz from an external clock source. If you try to run code compiled for a 16 MHz clock on the chip running at 1 MHz, you'll find everything is very slow.
Even though you can use the standard Nano or Uno board definitions if your custom board has the same 16 MHz external crystal/oscillator, these board definitions cause a section of the flash memory to be reserved for the bootloader. If you're not using a bootloader, that's just wasted space. For this reason, you might consider using the MiniCore instead:
MiniCore's "ATmega328" board offers a Tools > Bootloader > No bootloader option that will allow you to use the full 32 kB of flash memory for your sketch.
If you are not programming using a serial connection, then you could consider alternatives to the Nano such as the pro mini or even a raw ATmega328p chip. The advantage of the Nano is the USBTTL chip which you are not using.