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.
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).
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?