2

Is it possible to use a custom bootloader, that loads and executes a main program stored for example on an SD card? The idea is to make it possible to update the Arduino remotely.

I tried this with a bootloader, which writes the program into the flash storage with a 32KB offset and then uses a function pointer with that address (0x88000) to continue execution there. The 0x80000 is as far as I am informed the address offset of the flash storage. It can be written on Due boards with this library: https://github.com/sebnil/DueFlashStorage. The problem was that this just hasn't worked, the Arduino simply stopped responding after the function pointer being executed. I would appreciate any information or hints on this topic.

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Mar 28, 2015 at 14:55
1
  • A solution of this type should be possible - but was your loaded program linked to execute at that address? And did you come up with a scheme for handling interrupt vectors? I believe on the ARM cortex you can change the address of the vector table. Commented May 13, 2015 at 17:17

2 Answers 2

1

The guys at Phoenard did just that with an AVR2560. They wrote a bootloader that loads and saves FLASH memory from/to the Micro-SD card. You can save HEX files on an SD card and then load one of them in the FLASH memory and run it.

answered Dec 19, 2016 at 18:23
0

Not sure if you could get the bootloader to support SD, but I have little experience with bootloader code, so the way I would go about it would be to make the sketch load content from the SD that then affects the sketch process.

dda
1,5951 gold badge12 silver badges17 bronze badges
answered Mar 29, 2015 at 22:40
1
  • That sounds like what the poster already did. To be an answer, this would need to provide a path around the fact that it didn't work - by being more than just a vague idea. Commented Oct 20, 2016 at 17:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.