From 8dc98d6c12f9176efe9aad9e1d63ffda1c7df7ae Mon Sep 17 00:00:00 2001 From: Carlos Venegas Date: Wed, 4 Oct 2023 16:28:32 +0200 Subject: [PATCH] Compatibilize WIP with apio 0.8.4 development > 0.9.0 --- app/package-lock.json | 2 +- app/scripts/services/tools.js | 19 ++++++++++++++++--- package-lock.json | 16 ++++++++-------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 5547b94ad..5dab90d83 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "icestudio", - "version": "0.10.1w", + "version": "0.11.1w", "license": "GPL-2.0", "dependencies": { "ace-builds": "~1.4.12", diff --git a/app/scripts/services/tools.js b/app/scripts/services/tools.js index 62a19afd0..524959a46 100644 --- a/app/scripts/services/tools.js +++ b/app/scripts/services/tools.js @@ -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 @@ -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 ); diff --git a/package-lock.json b/package-lock.json index 2d63519f8..28a018e10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "icestudio", - "version": "0.10.1w", + "version": "0.11.1w", "hasInstallScript": true, "license": "GPL-2.0", "dependencies": { @@ -29,7 +29,7 @@ "grunt-wget": "^0.1.3", "grunt-zip": "^0.18.2", "npm-platform-dependencies": "0.1.0", - "nw": "0.76.1-sdk", + "nw": "0.76.1", "nw-builder": "^3.5.7" }, "optionalDependencies": { @@ -4682,9 +4682,9 @@ } }, "node_modules/nw": { - "version": "0.76.1-sdk", - "resolved": "https://registry.npmjs.org/nw/-/nw-0.76.1-sdk.tgz", - "integrity": "sha512-OUsGUVfpeOV5h2sy+7LIuMZe6vl/d+IoBoVLE2M7+Xh5D8YkwbNHbEYoT8ZlAJLDm0Ze61VLuBkD05AU1AnwvQ==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/nw/-/nw-0.76.1.tgz", + "integrity": "sha512-6D3bu+v/gMR4Tsw7CHfB5HAKiOsD76ve+cc2OIMFjLGH46bBHLOgRD2QnDngz2dK76+xM3LpH0XCxkwY9ZX+Pw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -11114,9 +11114,9 @@ "dev": true }, "nw": { - "version": "0.76.1-sdk", - "resolved": "https://registry.npmjs.org/nw/-/nw-0.76.1-sdk.tgz", - "integrity": "sha512-OUsGUVfpeOV5h2sy+7LIuMZe6vl/d+IoBoVLE2M7+Xh5D8YkwbNHbEYoT8ZlAJLDm0Ze61VLuBkD05AU1AnwvQ==", + "version": "0.76.1", + "resolved": "https://registry.npmjs.org/nw/-/nw-0.76.1.tgz", + "integrity": "sha512-6D3bu+v/gMR4Tsw7CHfB5HAKiOsD76ve+cc2OIMFjLGH46bBHLOgRD2QnDngz2dK76+xM3LpH0XCxkwY9ZX+Pw==", "dev": true, "requires": { "chalk": "~1.1.3",