I want to flash a hex file stored in a micro SD card into an Arduino [Uno/Nano]. So far I can read and write to the SD card using Arduino.

Without modifying the bootloader, is it possible to flash the Arduino using micro SD card module?

  • 1
    Do you have two user accounts? You appear to be suggesting edits from an account that differs from the account that you originally posted your question from. If you contact the moderators, then they can merge the two accounts for you. – Greenonline Jun 3 '17 at 10:06
  • I have rejected the edit as it changes the focus of the question. What you asked in your edit was a good question - I highly suggest that you ask it as another question (if it hasn't been asked already). – sa_leinad Jun 5 '17 at 4:05

No. Only the bootloader is allowed to write to the program flash.

  • can you show us where this is explained? The boot loader is just a program and so is the sketch. I do not see why a sketch can not do what the OP asked. That said, the knowledge to read the SDCard and modify the non-volatile program memory goes way beyond common Arduino programming knowledge. One would have to be very familiar the the particular micro processor being used. Even then it would be a challenge. To put it another way, this task is easily on par with that of creating the Arduino boot loader in the first place. – st2000 Jun 1 '17 at 11:52
  • @st2000 the bootloader has this extra privilege that a regular sketch hasn't. – Gerben Jun 1 '17 at 14:54

Yes, but I am not sure it can work from the smaller Arduino models. Have a look at the Phoenard project. The platform, based on a 2560, flashes .hex files on demand, which are stored on the SD card.

It's an open-source project, so it should be possible to go through the code and see how they do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.