1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

F72x flashing fix

This commit is contained in:
Pawel Spychalski (DzikuVx) 2017-06-04 11:27:08 +02:00
parent d1d724efb3
commit 6c76a7337e
2 changed files with 14 additions and 10 deletions

View file

@ -256,12 +256,14 @@ STM32DFU_protocol.prototype.getFlashInfo = function (_interface, callback) {
}
// F303: "@Internal Flash /0x08000000/128*0002Kg"
// F407: "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
// F40x: "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
// F72x: "@Internal Flash /0x08000000/04*016Kg,01*64Kg,03*128Kg"
// F74x: "@Internal Flash /0x08000000/04*032Kg,01*128Kg,03*256Kg"
// split main into [location, start_addr, sectors]
var tmp1 = str.split('/');
if (tmp1.length != 3 || !tmp1[0].startsWith("@Internal Flash")) {
callback({}, -1);
return;
var tmp0 = str.replace(/[^\x20-\x7E]+/g, "");
var tmp1 = tmp0.split('/');
if (tmp1.length != 3 || !tmp1[0].startsWith("@")) {
return null;
}
var type = tmp1[0].trim().replace('@', '');
var start_address = parseInt(tmp1[1]);