Using DueFlashStorage and Flash Page is Locked, How to change bossac prams the ide using to have the -u need to unlock?

Im playing with DueFlashStorage
And after push script to board works first time
Then when attempting to upload again its Flash Page is Locked

And seem that you need to change the bossac to have -u added in cmd line

I found a post that says I need to to change it from “-e -w -v -b” to this “-e -w -u -v -b” with the -u added.

But that must of been older post and cant find those prams in the "preferences.txt" file

Im using Arduino 1.8.13, can someone please help where I can add this "-u" pram so used when uploading

Hi True_Soln
You are not the only one with this problem !!!
I personally have followed the instrauction given to include the -u, but I could not make it work.
I have made several attempt without success.
I am using the IDE 1.8.7.
Anyway to answer your question you can find the place were to include the -u following this path , Go on File and select PREFERENCE a window will open and at the bottom you will se C:\Users\HP\Data\Local\Arduino15\preferences.txt clik on it and then PAKAGES > ARDUINO> HARDWARE>SAM>1.612>PLATFORM.
open Platform and at the end of the file you will see the line to wok on.
Please advise if you find a solution because at the moment I cannot use the Arduino Due bord with any program.
Ciao

@franz48 thanks that is what was looking for

Can see on my image,
Had the error with flash page locked
Change that cmd line and added "-u" and upload again and it worked
But was not on last line, was on line above that need change

I used the verbose output during upload and was able to see it was added

Worked for me, you sure you put cmd needed on correct line
When I tried first it did not work as I put on wrong line
Then noticed the line above and it then worked

If you need to,
you can press the erase button (The one they say dont press)
The due and it will wipe all programs and clear the lock
That is how I have been doing it to update when this locked memory happened
erase button

Plug in due to usb
Press erase button
Press reset button
And then if you go to tools->ports
You should see it change port and can push code up again

Thank you.
Will work on it tomorrow

Francesco Bassi

Hi True_Soln
THANK YOUUUUUU.
It works also for me.

Hi True_Solon
This morning I got the same problem with looking of Flash pages.
I looked at the BOSSA and it is with the changes

BOSSA

tools.bossac.path={runtime.tools.bossac.path}
tools.bossac.cmd=bossac
tools.bossac.cmd.windows=bossac.exe

tools.bossac.upload.params.verbose=-i -d
tools.bossac.upload.params.quiet=
tools.bossac.upload.params.verify=-v
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -u {upload.verify} -b "{build.path}/{build.project_name}.bin" -R

tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v -b /tmp/sketch.bin -R

I worked for few days on the same software with DueFlashStorage without problema but this morning stopped again.
Are you able to work ?

That is same thing I have and mine is still working to unlock the flash each time I deploy code
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -u {upload.verify} -b "{build.path}/{build.project_name}.bin" -R

Have you tried with verbose on to make sure see the -u is being used
Do you have more that one versions of IDE on pc
I run with portable folders so that setup just for one project that using DueFlash
Maybe you have something like that gone wrong

And did you try pressing erase button that will unlock