support global and local chip erase
parent
af15110fa6
commit
aaacf6cea8
|
@ -396,6 +396,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
|||
break;
|
||||
case 4:
|
||||
// erase memory
|
||||
if (!$('input.erase_chip').is(':checked')) {
|
||||
// EXPERIMENTAL
|
||||
console.log('Executing local erase (only needed pages)');
|
||||
STM32.GUI_status('Erasing');
|
||||
|
@ -427,9 +428,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
// OLD BUT GOLD
|
||||
/*
|
||||
} else {
|
||||
console.log('Executing global chip erase');
|
||||
STM32.GUI_status('Erasing');
|
||||
|
||||
|
@ -447,7 +446,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
|||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
// upload
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
If you are flashing "<strong>bare</strong>" board with no firmware preloaded or you have bootloader pins <strong>shorted</strong>, check this box.<br />
|
||||
</p>
|
||||
<label><input class="updating" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">No reboot sequence</span></label><br />
|
||||
<label class="flash_on_connect_wrapper"><input class="flash_on_connect" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">Flash on connect</span></label>
|
||||
<label class="flash_on_connect_wrapper"><input class="flash_on_connect" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">Flash on connect</span><br /></label>
|
||||
<label><input class="erase_chip" type="checkbox" /><span style="font-weight: bold; margin-left: 6px;">Full Chip Erase</span></label><br />
|
||||
</div>
|
||||
<div class="clear-both"></div>
|
||||
<div class="buttons">
|
||||
|
|
|
@ -200,6 +200,26 @@ function tab_initialize_firmware_flasher() {
|
|||
}).change();
|
||||
});
|
||||
|
||||
chrome.storage.local.get('erase_chip', function(result) {
|
||||
if (typeof result.erase_chip === 'undefined') {
|
||||
// wasn't saved yet
|
||||
$('input.updating').prop('checked', false);
|
||||
} else {
|
||||
if (result.erase_chip) {
|
||||
$('input.erase_chip').prop('checked', true);
|
||||
} else {
|
||||
$('input.erase_chip').prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
// bind UI hook so the status is saved on change
|
||||
$('input.erase_chip').change(function() {
|
||||
var status = $(this).is(':checked');
|
||||
|
||||
chrome.storage.local.set({'erase_chip': status});
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
chrome.storage.local.get('dev_mode', function(result) {
|
||||
if (typeof result.dev_mode !== 'undefined') {
|
||||
|
|
Loading…
Reference in New Issue