We made our own Arduino board with the ATMEGA32U4 microcontroller and currently struggle with flashing the bootloader.
There is no ISP pinout, just the USB connection.
Our setup contains the board plugged in the USB port. We tried to flash the microcontroller over USB via the command-line tool DFU-programmer (via Terminal on Mac) with the [LilypadUSB bootloader, but receive the following Error:
ERROR: Data exists outside of the valid target flash region.
Hex file error, use debug for more info.
commands.c:360: Error writing memory data.
I assume that there is not enough space available to flash the microcontroller, but why?
Do I use the appropriate bootloader? Or is it even the right approach to get it work?
We get the same/similar error in Windows with ATMEL FLIP: ```
Adress is out of range.
Help is greatly appreciated.](https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Caterina-LilyPadUSB.hex)