Skip to content

Commit 439c5ca

Browse files
authored
Merge pull request #450 from AlienWiiBF/F7_Flash
Flashing fix for STM32F722 MCU
2 parents e405164 + e479422 commit 439c5ca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/protocols/stm32usbdfu.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,12 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
298298

299299
var parseDescriptor = function(str) {
300300
// F303: "@Internal Flash /0x08000000/128*0002Kg"
301-
// F407: "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
301+
// F40x: "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
302+
// F72x: "@Internal Flash /0x08000000/04*016Kg,01*64Kg,03*128Kg"
303+
// F74x: "@Internal Flash /0x08000000/04*032Kg,01*128Kg,03*256Kg"
302304
// split main into [location, start_addr, sectors]
303-
var tmp1 = str.split('/');
305+
var tmp0 = str.replace(/[^\x20-\x7E]+/g, "");
306+
var tmp1 = tmp0.split('/');
304307
if (tmp1.length != 3 || !tmp1[0].startsWith("@")) {
305308
return null;
306309
}

0 commit comments

Comments
 (0)