Go Down

Topic: How to reflash the Arduino due in-field (Read 1 time) previous topic - next topic

Luke999

Hi all,

I have Arduino Due with network shield and SD card.
Arduino Due can remote access by network shiled.

Can I remote reflash the Arduino Due?

I have no idea how to do that?

Can anyone give me some advice?

Thanks.

Luke.

AdderD

The most straight forward approach is to use the network shield to save a binary firmware image to the SD Card. Then cause the sketch to reset and upon all resets look for a binary firmware image and write it into the FLASH memory of the Due. This is certainly possible to do but it's far beyond the scope of a beginner project. You need a custom bootloader stored in FLASH space that can write to the Due without overwriting itself. As a bonus, this bootloader has to have a separate copy of the SPI, SDCard, and FAT code so that it can read data off of a formatted SDCard. So, the bootloader is likely to be somewhat large. However, I have done all of this on a little 8-bit processor with limited flash space so it can be done even more easily on the Due. But, I do not know if anyone has done this yet so you might be stuck doing a LOT of coding to make it happen.

The far easier approach is to do the flashing from a PC by distributing a binary firmware image, bossac, and a little batch file to call bossac to make it flash the firmware image. I have investigated using this approach and have had some success. If you set the baud rate to 1200 on the Due's USB port it'll reset into the bootloader so you can find the COM port, set it to 1200 baud, then have bossac send the binary file. This can be done in a batch file and it's a lot simpler than trying to actually do a remote firmware upgrade over the radio.

Luke999

Thanks to Collin80.

Flashing from PC is working but it is not my choice.

The custom bootloader is my choise but it seems a lot of works need to do.
Actually, I have no idea how to do that in the first step.

Do anyone have the example of custom booloader?

Thanks in advance.




PCWorxLA

Hi all,

I have Arduino Due with network shield and SD card.
Arduino Due can remote access by network shiled.

Can I remote reflash the Arduino Due?

I have no idea how to do that?

Can anyone give me some advice?

Thanks.

Luke.
Sounds like a typical "chicken and egg" problem. You would lose all access to the network shield and the SD card as soon as you would even start to put the Due into flash/programming mode...

Ralf

Go Up