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
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
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
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
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