Remove bootloader and upload sketch .hex

Hi,

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.

Burn the bootloader then upload using programmer - this will overwrite the bootloader, but set the fuses to the correct settings.

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?

No changes, and it does not matter what programmer you use.

ok so if I sum up.

I have my current arduino nano card.

  • I remove the bootloader with the command: Burn the bootloader
  • I connect the ICSP pins of the arduino mega to the uno card
  • I put the ICSP program in the arduino mega
  • I upload the program for the nano from the mega with the command: upload using programmer

When i have the arduino nano custom I have to do the same just no need to remove the bootloader because it don't have ?

kealmlj:
can I let it program in AVRISP MKII?

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.

Thank you for your answers !

This is exactly what I want, I am going to make myself a little module from a nano board, and so as I would order the components they will be blank.

So if I understand correctly, I have to flash the bootloader first to get the 16Mhz? Or I can disable with minicore ?

UPDATE : ok so good ! I can burn bootloader to my nano with my mega and i can upload to my nano with my mega !

I have do this Speed up post-reset booting of "uno" or avoid bootloader entirely - #10 by pert - Microcontrollers - Arduino Forum

I think everything is ok ?

I have no bootloader, the fuse is set correctly ?

If you upload the classic blink sketch and the frequency of the blinking is 1 second on 1 second off then that would be a good start.

If, when you compiled your sketch (for your new target board of "no bootloader" type ) you get a message like this this message at the end:

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 32768 bytes.

That would be another good sign. 32768 indicates that nothing is being reserved for the boot loader.

If in doubt, use AVRDUDE to check the fuses.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.