Enable/Disable the ROM bootloader in your image, if the board supports it.
Look in Board.h to choose the DIO and corresponding level that will cause the chip to enter bootloader mode.