Making DIY “Arduino”

It is a common misperception that the bootloader is where the Arduino magic happens. The bootloader is only a program that writes the application binary to the microcontroller's flash memory. That's all it does. The same bootloader could even be used if you didn't use the Arduino IDE or libraries at all. The bootloader has its own code for working with the I/O pins, for the communication interface it uses (e.g., UART), and perhaps to blink or fade the LEDs on the board, but this has nothing to do with the code you use in your sketch to control the pins.

As for the code that "recognizes" the I/O pins, that is actually part of the sketch program, not the bootloader. The question is far too ambiguous at this point to provide any specific reply, but you might start by looking at the core variant files for the board you are using.

1 Like