Skip to content

Commit 8dc98d6

Browse files
committed
Compatibilize WIP with apio 0.8.4 development > 0.9.0
1 parent b31290a commit 8dc98d6

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

app/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/services/tools.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,18 @@ angular
6969
//-- Execute the apio build command. It builds the current circuit
7070
this.buildCode = function (startMessage, endMessage) {
7171
let board = (common.selectedBoard.name === 'MCH2022_badge') ? 'iCE40-UP5K' : common.selectedBoard.name;
72-
72+
let apioParams = [];
73+
if (toolchain.apio >= '0.9.0') {
74+
apioParams = ["build", "--board", board, "--top-module", "main"];
75+
} else {
76+
apioParams = ["build", "--board", board];
77+
}
7378
return apioRun(
74-
["build", "--board", board], // TODO: Include top module name: , "--top-module", "main"],
79+
apioParams,
7580
startMessage,
7681
endMessage
7782
);
83+
7884
};
7985

8086
//-- Execute the apio upload command. It uploads the bitstream to the
@@ -84,8 +90,15 @@ angular
8490
if (common.selectedBoard.name === 'MCH2022_badge') {
8591
return toolchainRun(['upload'], startMessage, endMessage);
8692
}
93+
let apioParams = [];
94+
if (toolchain.apio >= '0.9.0') {
95+
apioParams = ["upload", "--board", common.selectedBoard.name, "--top-module", "main"];
96+
} else {
97+
apioParams = ["upload", "--board", common.selectedBoard.name];
98+
}
99+
87100
return apioRun(
88-
["upload", "--board", common.selectedBoard.name], //TODO: Include top module name, "--top-module", "main"],
101+
apioParams,
89102
startMessage,
90103
endMessage
91104
);

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)