Compiling without bootloader ?

While browsing my laptop files, I came across a temp folder where I could find 2 different compiled "versions" of my current Arduino project:

wf_meter.ino.with_bootloader.hex
wf_meter.ino.hex

It seems that the IDE creates by default compiled files both, with and without the bootloader ?

(deleted)

Ok, 2 more questions then:

How to upload the hex file without the bootloader?
Afterwards, how to update the executable without the bootloader in place?

I'm an Arduino noobie, so any links are appreciated.

pjrebordao:
How to upload the hex file without the bootloader?

Using a programming device connected to the ISP header on your device (or the appropriate pins if it doesn’t have a header).
Usually your first step would be to program a hex WITH either the boot loader, or combined boot loader and main app.

Afterwards, how to update the executable without the bootloader in place?

If you don’t have a boot loader installed the only way is via the ISP.

My first question was wrongly worded...

What i mean is when you have a board that still has a bootloader installed, how do you send a hex without the bootloader from the arduino ide?

pjrebordao:
What I mean is when you have a board that still has a bootloader installed, how do you send a hex without the bootloader from the arduino ide?

Err.... With the upload sketch button?

When the board has a boot loader installed, you send the hex WITHOUT the boot loader. You keep the existing boot loader and the boot loader just reprograms the application flash with the received hex.

The hex WITH boot loader is provided only as a convenience for first time programming of virgin devices. If you are doing a production run for example, but where you want the devices to be field updatable (so you want a boot loader programmed).

Ok. I was understanding that by default the bootloader was always sent with the app, as the whole flash was completely written during each upload.

pjrebordao:
Ok. I was understanding that by default the bootloader was always sent with the app, as the whole flash was completely written during each upload.

As the boot loader is running, and code runs directly from FLASH (there is no other way on most Arduino devices) it would be fatal to try to update itself while it is running.

The section of FLASH memory that the bootloader is stored in is generally protected so that it cannot be erased or overwritten, and that can only be changed by altering the fuse settings on the processor, which requires at least an ISP programmer (there is also a parallel programming interface, but that is rarely referenced here, I've only seen it mentioned when someone accidentally set the fuse that disables ISP programming).

The hex file with bootloader is mainly a convenience when using "Sketch > Export compiled Binary" in the IDE, so that the chip can be programmed external to the IDE via an ISP programmer while retaining the bootloader, because that method generally does erase the entire FLASH memory including the bootloader.

If you are going to be using Arduinos for any length of time you should probably get an ISP. You can get a "USBasp" ISP via eBay or Amazon for under $5. Most come with a 10-pin cable and the Arduino uses a 6-pin ICSP header soin that case be sure to get a 10-pin to 6-pin adapter. The cheapest ones are shipped from the Far East so these days they may take months to arrive. For more money you can order one from a more local vendor.

johnwasser:
If you are going to be using Arduinos for any length of time you should probably get an ISP. You can get a "USBasp" ISP via eBay or Amazon for under $5. Most come with a 10-pin cable and the Arduino uses a 6-pin ICSP header soin that case be sure to get a 10-pin to 6-pin adapter. The cheapest ones are shipped from the Far East so these days they may take months to arrive. For more money you can order one from a more local vendor.

I was about to ask that.
I'm developing for a nano 33 ble. What requirements should I look for when searching for an ISP?

Or this one from Pololu. Ships same day, free in the US. $7.77

Follow the directions, as it can be used as both a Programmer, and as a USB/Serial adapter. Both COM ports will show up in the IDE.

Or just build one from another Arduino you have sitting around.
I flash custom boot loaders to my ProMinis using another ProMini.

pjrebordao:
I was about to ask that.
I'm developing for a nano 33 ble. What requirements should I look for when searching for an ISP?

Nano 33 BLE is a different story. the ISP is done with an SWD programmer/debuger.

and it doesn't use .hex file. a .bin file is created. and no with bootloader bin is created