Arduino has been cheating on you. Part three

How your program gets into your board.

Carlos Aldea
3 min readJul 10, 2024
Photo by Harrison Broadbent on Unsplash

After met our new friends, the CPU and the compiler it is time to know another important concept that Arduino was hiding from you.

HOW TO FLASH YOUR BOARD

Just after you finish compiling your brand new sketch (which, by the way, is just a .c file that has been renamed to .ino) it’s time to write that binary into the flash memory of your board. What is called “flashing”.

Once again, Arduino makes it very easy. Just press a button and that’s it.

But friends, if you have read my previous posts (here and here), you will know that there is something important behind the scenes that we are not seeing.

In this case, it’s the bootloader.

To write an application into the flash memory of a microcontroller, you usually need an external circuit called a “programmer” (JLink could be one of them, although there are some more). Specifically, we would need a programmer to flash our microcontroller if the flash memory of our memory is empty (as usually is a brand new microcontroller).

But, luckily, there is another mechanism to writhe the flash memory of our microcontroller with a brand-new application.

--

--

Carlos Aldea

I am an addict. But don't worry, my addiction is a good one. I love learning things. And I am going to try sharing my learnings.