Skip to content

Commit 08010d2

Browse files
committed
Copy binary-counter upload.wasm to the zephyr build directory on setup
1 parent 64cbe4c commit 08010d2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,16 @@ tasks.register<Exec>("makeWARDuino") {
7878
commandLine("sh", "-c", "make")
7979
}
8080

81+
fun setDefaultZephyrWasmBinary() {
82+
val zephyrBuildDir = File(projectDir.absolutePath + "/WARDuino/platforms/Zephyr")
83+
File(projectDir.absolutePath + "/examples/binary-counter/upload.wasm").copyTo(File(zephyrBuildDir.absolutePath + "/upload.wasm"), overwrite = true)
84+
File(projectDir.absolutePath + "/examples/binary-counter/upload.wasm.map").copyTo(File(zephyrBuildDir.absolutePath + "/upload.wasm.map"), overwrite = true)
85+
}
86+
8187
tasks.register<Copy>("setup") {
8288
dependsOn("fatJar")
8389
dependsOn("makeWARDuino")
90+
setDefaultZephyrWasmBinary()
8491

8592
// Setup configuration file.
8693
val file = File("${System.getenv("HOME")}/.mio/debugger.properties")

0 commit comments

Comments
 (0)