Help with bootloader modification

Hello,

I'm relatively comfortable with Arduino programming, but I've encountered some difficulties while attempting to modify a TFTP bootloader for my custom ATmega2560 board with a W5500 Ethernet module. I'm seeking some guidance on how to exclusively utilize Ethernet for bootloader operations while bypassing the serial channel. Here's what I've done so far and the issues I've encountered:

Problem Description:

I've been working with the Ariadne Bootloader, which incorporates TFTP functionality for uploading firmware over Ethernet. My goal is to eliminate the reliance on the serial channel entirely, relying solely on the Ethernet connection for uploading firmware. This is because I have a serial device connected on that port which sends data continously and whenever it is connected by code just won't get started.

Steps Taken:

  1. I modified the bootloader code to comment out the serial-related sections, ensuring that only Ethernet functionality remains.
  2. After compiling and fusing the modified bootloader file, I successfully uploaded my code via Ethernet for the first time.
  3. However, subsequent attempts to upload new firmware via Ethernet fail. Furthermore, the uploaded code now runs immediately upon power-on, suggesting that it may have overwritten the bootloader.

Request for Assistance:

I'm reaching out to the community for any insights or suggestions on how to resolve this issue. Specifically, I'm looking for guidance on:

  1. How to ensure that the bootloader remains intact after uploading firmware via Ethernet.
  2. Any potential pitfalls or overlooked configurations that might be causing this behavior.
  3. Suggestions for troubleshooting steps to isolate and address the root cause of the problem.

Any assistance or advice would be greatly appreciated.

Hi @confusedprogrammer1. Very cool that you are working with the Ariadne bootloader. I did some projects with it. That was many years ago so I don't know how much help I can be, but I retain a fondness for Ariadne even if not so much of the technical details of the bootloader.

I'm not sure I understood correctly what you mean by this. Did you flash the hex file generated by compiling the modified bootloader to your ATmega2560 board?

Hi,
Thanks for the response.

Yes I modified the bootloader and tried to flash it by replacing with the bootloader in the folder from where arduino IDE picks it up when we do Burn Bootloader option.

After this,
First time, I am able to upload my hex with the bootloader using FTP.

But after that on subsequent power cycles my code starts without any delay, and there is no time to upload using bootloader, so I am assuming the bootloader is not starting now on power up. My code is starting directly.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.