DUE with DueFlashStorage.h library "Flash page is locked" error

Good Night

I was working with my Arduino DUE an suddenly it got freeze, when i tried to download a program i got

"Flash page is Locked" error, I am using DueFlashStorage library an it seem to be the origin of the problem.
I tried push the erase button with the reset together, but it don´t fix the problem.
Are There any solution for that?

Thanks in advance

In the IDE window, go to File/ Preferences, then click in the url at the bottom of preferences:

c:\Users....\AppData\Local\Arduino15\preferences.txt

This workaournd may work:

Go to: packages>arduino>hardware>sam>1.6.x>platform.txt

Copy and past platform.txt into a new blank IDE window (without setup() and loop()

At the end of the file, you will find:

-e -w -v -b, change this by:

-e -w -u -v -b

For the meaning of -u (unlock all Flash pages), see:
http://www.shumatech.com/web/products/bossa

Then copy the entire new file in platform.txt, save and close all IDE windows.

Open a new IDE window with the minimal sketch (setup() and loop()), all Flash pages should be unlocked now.

ard_newbie

Thanks for your help, I tried but didn't work, same error Flash page is locked.

Need to know if this bug is for using DueFlashStorage library, what do you think?

Thanks again¡¡

Lots of users of this library have had this issue, but I don't know why.

BTW, unlike the arduino DUE, the DUE Core (a 100% DUE compatible board), has an EEPROM.

Or try out this:
The SAM3X that makes up the heart of the DUE doesn't have any EEPROM itself, but the Atmel 16U2 that is the bridge between the UART interface on the DUE and the USB programming port does (512 Bytes of EEPROM).

And here is how you can wire your DUE to extract 512 bytes of EEPROM:

https://forum.arduino.cc/index.php?topic=191298.0

ard_newbie:
Copy and past platform.txt into a new blank IDE window (without setup() and loop()

What is the reason for this step?

ard_newbie:
At the end of the file, you will find:

-e -w -v -b, change this by:

That is the "tools.bossac_remote.upload.pattern" recipe, right? AFAIK, this is not used during a normal upload. I would expect it to be "tools.bossac.upload.pattern" that you need to modify.

What is the reason for this step?

it's easier with a text editor.

I don't understand what you mean by that. In order to copy/paste the contents of platform.txt, it already needs to be open in a text editor. So why not just edit the file there?