Skip to content

Commit 8855f08

Browse files
authored
fix: 'StupSel' format error in KeilXmlParser
1 parent 8368fa3 commit 8855f08

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/KeilXmlParser.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,11 @@ class ARMParser extends KeilParser<KeilARMOption> {
778778
}
779779

780780
// default startUp index: 3 (2^3)
781-
const index = Math.log2(parseInt(info.StupSel));
781+
let index = Math.log2(parseInt(info.StupSel) || 1);
782+
if (index > 4) {
783+
index = 4;
784+
}
785+
782786
memInfo.ROM[index].isStartup = true;
783787

784788
memInfo.RAM[0].noInit = info.NoZi1 !== '0';

0 commit comments

Comments
 (0)