Skip to content

Commit

Permalink
Compatibilize WIP with apio 0.8.4 development > 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cavearr committed Oct 4, 2023
1 parent b31290a commit 8dc98d6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions app/scripts/services/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ angular
//-- Execute the apio build command. It builds the current circuit
this.buildCode = function (startMessage, endMessage) {
let board = (common.selectedBoard.name === 'MCH2022_badge') ? 'iCE40-UP5K' : common.selectedBoard.name;

let apioParams = [];
if (toolchain.apio >= '0.9.0') {
apioParams = ["build", "--board", board, "--top-module", "main"];
} else {
apioParams = ["build", "--board", board];
}
return apioRun(
["build", "--board", board], // TODO: Include top module name: , "--top-module", "main"],
apioParams,
startMessage,
endMessage
);

};

//-- Execute the apio upload command. It uploads the bitstream to the
Expand All @@ -84,8 +90,15 @@ angular
if (common.selectedBoard.name === 'MCH2022_badge') {
return toolchainRun(['upload'], startMessage, endMessage);
}
let apioParams = [];
if (toolchain.apio >= '0.9.0') {
apioParams = ["upload", "--board", common.selectedBoard.name, "--top-module", "main"];
} else {
apioParams = ["upload", "--board", common.selectedBoard.name];
}

return apioRun(
["upload", "--board", common.selectedBoard.name], //TODO: Include top module name, "--top-module", "main"],
apioParams,
startMessage,
endMessage
);
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8dc98d6

Please sign in to comment.