save RAM content overridden by bootloader magic
save RAM content overridden by bootloader magic

and restore it in case of aborted reboot
use RAMEND-1 as suggested by @yyyc514 in PR #2474

of course it's not a real solution but we cannot force everyone to update the bootloader using an external programmer

tommyli2014/Arduino,ricklon/Arduino,eduardocasarin/Arduino,gberl001/Arduino,gestrem/Arduino,stevemayhew/Arduino,tomkrus007/Arduino,jaimemaretoli/Arduino,xxxajk/Arduino-1,henningpohl/Arduino,laylthe/Arduino,zederson/Arduino,garci66/Arduino,PeterVH/Arduino,lukeWal/Arduino,tskurauskas/Arduino,Gourav2906/Arduino,niggor/Arduino_cc,stevemayhew/Arduino,majenkotech/Arduino,pdNor/Arduino,majenkotech/Arduino,henningpohl/Arduino,Gourav2906/Arduino,PaoloP74/Arduino,HCastano/Arduino,jmgonzalez00449/Arduino,KlaasDeNys/Arduino,Chris--A/Arduino,majenkotech/Arduino,ThoughtWorksIoTGurgaon/Arduino,ogferreiro/Arduino,KlaasDeNys/Arduino,chaveiro/Arduino,ccoenen/Arduino,me-no-dev/Arduino-1,kidswong999/Arduino,superboonie/Arduino,zederson/Arduino,Chris--A/Arduino,jabezGit/Arduino,tomkrus007/Arduino,wilhelmryan/Arduino,NicoHood/Arduino,stevemayhew/Arduino,wayoda/Arduino,nandojve/Arduino,ThoughtWorksIoTGurgaon/Arduino,tbowmo/Arduino,xxxajk/Arduino-1,superboonie/Arduino,xxxajk/Arduino-1,Chris--A/Arduino,steamboating/Arduino,gberl001/Arduino,bigjosh/Arduino,niggor/Arduino_cc,lukeWal/Arduino,acosinwork/Arduino,stevemayhew/Arduino,tbowmo/Arduino,stevemayhew/Arduino,wilhelmryan/Arduino,shannonshsu/Arduino,Gourav2906/Arduino,shannonshsu/Arduino,andyvand/Arduino-1,zaiexx/Arduino,ThoughtWorksIoTGurgaon/Arduino,nandojve/Arduino,wayoda/Arduino,shannonshsu/Arduino,onovy/Arduino,KlaasDeNys/Arduino,byran/Arduino,pdNor/Arduino,eddyst/Arduino-SourceCode,ikbelkirasan/Arduino,PeterVH/Arduino,gberl001/Arduino,NicoHood/Arduino,henningpohl/Arduino,ashwin713/Arduino,NaSymbol/Arduino,eduardocasarin/Arduino,eggfly/arduino,bsmr-arduino/Arduino,KlaasDeNys/Arduino,me-no-dev/Arduino-1,zaiexx/Arduino,ricklon/Arduino,bsmr-arduino/Arduino,steamboating/Arduino,NaSymbol/Arduino,jabezGit/Arduino,bsmr-arduino/Arduino,PaoloP74/Arduino,ForestNymph/Arduino_sources,jabezGit/Arduino,jabezGit/Arduino,jmgonzalez00449/Arduino,ikbelkirasan/Arduino,Gourav2906/Arduino,ForestNymph/Arduino_sources,jaimemaretoli/Arduino,henningpohl/Arduino,acosinwork/Arduino,tommyli2014/Arduino,nandojve/Arduino,lukeWal/Arduino,PeterVH/Arduino,gestrem/Arduino,henningpohl/Arduino,shannonshsu/Arduino,acosinwork/Arduino,chaveiro/Arduino,NaSymbol/Arduino,NicoHood/Arduino,bsmr-arduino/Arduino,adamkh/Arduino,andyvand/Arduino-1,kidswong999/Arduino,garci66/Arduino,snargledorf/Arduino,jmgonzalez00449/Arduino,ntruchsess/Arduino-1,niggor/Arduino_cc,niggor/Arduino_cc,laylthe/Arduino,me-no-dev/Arduino-1,ari-analytics/Arduino,NaSymbol/Arduino,stevemayhew/Arduino,ogferreiro/Arduino,ricklon/Arduino,steamboating/Arduino,onovy/Arduino,acosinwork/Arduino,ricklon/Arduino,byran/Arduino,NaSymbol/Arduino,ogferreiro/Arduino,karlitxo/Arduino,me-no-dev/Arduino-1,wayoda/Arduino,cscenter/Arduino,jmgonzalez00449/Arduino,vbextreme/Arduino,xxxajk/Arduino-1,ntruchsess/Arduino-1,eduardocasarin/Arduino,zaiexx/Arduino,Gourav2906/Arduino,arunkuttiyara/Arduino,ForestNymph/Arduino_sources,lukeWal/Arduino,eggfly/arduino,ThoughtWorksIoTGurgaon/Arduino,cscenter/Arduino,garci66/Arduino,KlaasDeNys/Arduino,ntruchsess/Arduino-1,ThoughtWorksIoTGurgaon/Arduino,talhaburak/Arduino,wayoda/Arduino,bsmr-arduino/Arduino,majenkotech/Arduino,vbextreme/Arduino,eddyst/Arduino-SourceCode,kidswong999/Arduino,zederson/Arduino,tomkrus007/Arduino,tomkrus007/Arduino,NicoHood/Arduino,ForestNymph/Arduino_sources,pdNor/Arduino,ccoenen/Arduino,cscenter/Arduino,bigjosh/Arduino,onovy/Arduino,ikbelkirasan/Arduino,tommyli2014/Arduino,ogferreiro/Arduino,snargledorf/Arduino,niggor/Arduino_cc,eduardocasarin/Arduino,jamesrob4/Arduino,tbowmo/Arduino,karlitxo/Arduino,jaimemaretoli/Arduino,andyvand/Arduino-1,niggor/Arduino_cc,vbextreme/Arduino,nandojve/Arduino,henningpohl/Arduino,byran/Arduino,Gourav2906/Arduino,ikbelkirasan/Arduino,arunkuttiyara/Arduino,steamboating/Arduino,vbextreme/Arduino,jmgonzalez00449/Arduino,shannonshsu/Arduino,bigjosh/Arduino,jabezGit/Arduino,henningpohl/Arduino,gberl001/Arduino,superboonie/Arduino,gestrem/Arduino,eggfly/arduino,jmgonzalez00449/Arduino,superboonie/Arduino,kidswong999/Arduino,wilhelmryan/Arduino,superboonie/Arduino,KlaasDeNys/Arduino,NicoHood/Arduino,chaveiro/Arduino,superboonie/Arduino,gberl001/Arduino,chaveiro/Arduino,jmgonzalez00449/Arduino,steamboating/Arduino,jabezGit/Arduino,adamkh/Arduino,andyvand/Arduino-1,jaimemaretoli/Arduino,arunkuttiyara/Arduino,snargledorf/Arduino,bigjosh/Arduino,onovy/Arduino,bigjosh/Arduino,ari-analytics/Arduino,karlitxo/Arduino,xxxajk/Arduino-1,ari-analytics/Arduino,jmgonzalez00449/Arduino,NicoHood/Arduino,ccoenen/Arduino,talhaburak/Arduino,wilhelmryan/Arduino,eggfly/arduino,pdNor/Arduino,zaiexx/Arduino,lukeWal/Arduino,vbextreme/Arduino,jamesrob4/Arduino,PaoloP74/Arduino,stickbreaker/Arduino,stickbreaker/Arduino,PaoloP74/Arduino,tomkrus007/Arduino,tomkrus007/Arduino,PeterVH/Arduino,majenkotech/Arduino,PeterVH/Arduino,HCastano/Arduino,eddyst/Arduino-SourceCode,HCastano/Arduino,jabezGit/Arduino,adamkh/Arduino,bsmr-arduino/Arduino,stickbreaker/Arduino,ashwin713/Arduino,eddyst/Arduino-SourceCode,ccoenen/Arduino,cscenter/Arduino,PaoloP74/Arduino,ashwin713/Arduino,ricklon/Arduino,eduardocasarin/Arduino,adamkh/Arduino,onovy/Arduino,wayoda/Arduino,KlaasDeNys/Arduino,eduardocasarin/Arduino,wayoda/Arduino,adamkh/Arduino,andyvand/Arduino-1,ntruchsess/Arduino-1,Chris--A/Arduino,pdNor/Arduino,zederson/Arduino,ashwin713/Arduino,acosinwork/Arduino,laylthe/Arduino,tskurauskas/Arduino,tskurauskas/Arduino,KlaasDeNys/Arduino,bigjosh/Arduino,kidswong999/Arduino,onovy/Arduino,stickbreaker/Arduino,karlitxo/Arduino,ikbelkirasan/Arduino,steamboating/Arduino,tommyli2014/Arduino,eddyst/Arduino-SourceCode,bsmr-arduino/Arduino,PaoloP74/Arduino,chaveiro/Arduino,wilhelmryan/Arduino,stevemayhew/Arduino,ashwin713/Arduino,vbextreme/Arduino,NaSymbol/Arduino,ashwin713/Arduino,stickbreaker/Arduino,vbextreme/Arduino,ogferreiro/Arduino,tommyli2014/Arduino,chaveiro/Arduino,acosinwork/Arduino,ikbelkirasan/Arduino,andyvand/Arduino-1,kidswong999/Arduino,byran/Arduino,bigjosh/Arduino,niggor/Arduino_cc,adamkh/Arduino,jabezGit/Arduino,ikbelkirasan/Arduino,ari-analytics/Arduino,NaSymbol/Arduino,xxxajk/Arduino-1,jaimemaretoli/Arduino,eddyst/Arduino-SourceCode,arunkuttiyara/Arduino,ikbelkirasan/Arduino,talhaburak/Arduino,karlitxo/Arduino,zaiexx/Arduino,ccoenen/Arduino,pdNor/Arduino,ntruchsess/Arduino-1,cscenter/Arduino,talhaburak/Arduino,ccoenen/Arduino,gestrem/Arduino,ForestNymph/Arduino_sources,tommyli2014/Arduino,garci66/Arduino,HCastano/Arduino,tbowmo/Arduino,tskurauskas/Arduino,jamesrob4/Arduino,pdNor/Arduino,garci66/Arduino,ForestNymph/Arduino_sources,NicoHood/Arduino,chaveiro/Arduino,PeterVH/Arduino,zaiexx/Arduino,byran/Arduino,eggfly/arduino,majenkotech/Arduino,PaoloP74/Arduino,onovy/Arduino,henningpohl/Arduino,kidswong999/Arduino,cscenter/Arduino,wayoda/Arduino,tbowmo/Arduino,tomkrus007/Arduino,garci66/Arduino,PaoloP74/Arduino,ashwin713/Arduino,eduardocasarin/Arduino,ari-analytics/Arduino,HCastano/Arduino,jaimemaretoli/Arduino,ari-analytics/Arduino,tskurauskas/Arduino,chaveiro/Arduino,arunkuttiyara/Arduino,Chris--A/Arduino,tbowmo/Arduino,ari-analytics/Arduino,me-no-dev/Arduino-1,tbowmo/Arduino,ThoughtWorksIoTGurgaon/Arduino,nandojve/Arduino,ari-analytics/Arduino,tomkrus007/Arduino,me-no-dev/Arduino-1,jamesrob4/Arduino,ntruchsess/Arduino-1,acosinwork/Arduino,superboonie/Arduino,ccoenen/Arduino,byran/Arduino,gberl001/Arduino,zaiexx/Arduino,pdNor/Arduino,xxxajk/Arduino-1,ashwin713/Arduino,HCastano/Arduino,talhaburak/Arduino,talhaburak/Arduino,snargledorf/Arduino,nandojve/Arduino,eddyst/Arduino-SourceCode,eggfly/arduino,zederson/Arduino,byran/Arduino,laylthe/Arduino,nandojve/Arduino,lukeWal/Arduino,niggor/Arduino_cc,NicoHood/Arduino,adamkh/Arduino,steamboating/Arduino,wayoda/Arduino,tommyli2014/Arduino,jamesrob4/Arduino,PeterVH/Arduino,ccoenen/Arduino,NaSymbol/Arduino,ForestNymph/Arduino_sources,talhaburak/Arduino,stickbreaker/Arduino,eddyst/Arduino-SourceCode,ricklon/Arduino,tskurauskas/Arduino,gestrem/Arduino,karlitxo/Arduino,gestrem/Arduino,HCastano/Arduino,ntruchsess/Arduino-1,ThoughtWorksIoTGurgaon/Arduino,snargledorf/Arduino,ricklon/Arduino,Gourav2906/Arduino,xxxajk/Arduino-1,tbowmo/Arduino,andyvand/Arduino-1,majenkotech/Arduino,laylthe/Arduino,zederson/Arduino,garci66/Arduino,arunkuttiyara/Arduino,Chris--A/Arduino,gestrem/Arduino,stevemayhew/Arduino,me-no-dev/Arduino-1,Chris--A/Arduino,eggfly/arduino,wilhelmryan/Arduino,Gourav2906/Arduino,zaiexx/Arduino,jaimemaretoli/Arduino,stickbreaker/Arduino,acosinwork/Arduino,laylthe/Arduino,bigjosh/Arduino,cscenter/Arduino,byran/Arduino,karlitxo/Arduino,nandojve/Arduino,arunkuttiyara/Arduino,talhaburak/Arduino,cscenter/Arduino,ogferreiro/Arduino,lukeWal/Arduino,lukeWal/Arduino,shannonshsu/Arduino,niggor/Arduino_cc,zederson/Arduino,tskurauskas/Arduino,ntruchsess/Arduino-1,tskurauskas/Arduino,me-no-dev/Arduino-1,shannonshsu/Arduino,jaimemaretoli/Arduino,superboonie/Arduino,adamkh/Arduino,shannonshsu/Arduino,ogferreiro/Arduino,jamesrob4/Arduino,PeterVH/Arduino,Chris--A/Arduino,jamesrob4/Arduino,eggfly/arduino,garci66/Arduino,ThoughtWorksIoTGurgaon/Arduino,vbextreme/Arduino,bsmr-arduino/Arduino,snargledorf/Arduino,HCastano/Arduino,kidswong999/Arduino,gberl001/Arduino,wilhelmryan/Arduino,snargledorf/Arduino,laylthe/Arduino