0

I am having some issue writing to flash memory on Arduino Uno.

I burned the optiboot bootloader that ships with the IDE 1.8.3 to the chip, then uploaded the test_dospm sketch to write content to flash memory but appears to reset the device instead.

Any idea why this might be happening?

asked May 27, 2020 at 23:45

1 Answer 1

0

The bootloader which ships with Arduino IDE is version 4 which was already in the Uno from factory. To use the do_spm function you need Optiboot 8 (削除) build with this support enabled. It is not enabled in the default builds, because it doesn't fit in the usual Optiboot size for Uno (削除ここまで).

The hex file of the bootloader is here. Simply replace the hex file in AVR boards package with this one.

answered May 28, 2020 at 4:17
5
  • I can add more details or even build and test the bootloader and provide boards.txt settings since I have this on my TODO list. Commented May 28, 2020 at 12:05
  • Thanks @Juraj, that would be helpful! I am currently diving in the source code/makefile to see what are the option I need to enable to build the bootloader and you were right about the do_spm not being enabled by default. Commented May 28, 2020 at 20:51
  • @FallaCoulibaly, I discovered that do_spm is in the normal build of Optiboot8. BIGBOOT is not required. I modified the answer. Commented May 30, 2020 at 17:24
  • Thanks, that did the trick Commented Jun 4, 2020 at 8:58
  • but if somebody ever needs the big version of Optiboot including my copy_flash_pages function, here it is github.com/jandrassy/my_boards. about copy_flash_pages: github.com/Optiboot/optiboot/pull/269 Commented Jun 4, 2020 at 9:19

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.