Skip to content

Commit

Permalink
Merge pull request #30 from microsoft/bytecodename
Browse files Browse the repository at this point in the history
patch: rename generate compiler files
  • Loading branch information
pelikhan committed Dec 5, 2022
2 parents 048ee5f + eedf81d commit 9b7f538
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 39 deletions.
72 changes: 37 additions & 35 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
{
"name": "devicescript-cli",
"version": "1.0.1",
"description": "DeviceScript command line tool",
"keywords": [
"devicescript",
"jacdac",
"iot",
"embedded"
],
"author": "Microsoft",
"bin": {
"devicescript": "./devicescript",
"devicescript-cli": "./devicescript",
"devsc": "./devicescript"
},
"files": [
"./devicescript",
"./built/devicescript-cli.cjs",
"buffer",
"README.md"
],
"license": "MIT",
"devDependencies": {
"@types/commander": "^2.12.2",
"@types/debounce-promise": "^3.1.5",
"@types/fs-extra": "^9.0.13",
"@types/node": "^18.11.9"
},
"dependencies": {
"commander": "^9.4.1",
"debounce-promise": "^3.1.2",
"devicescript-compiler": "*",
"faye-websocket": "^0.11.4",
"fs-extra": "^10.1.0"
}
"name": "devicescript-cli",
"version": "1.0.1",
"description": "DeviceScript command line tool",
"keywords": [
"devicescript",
"jacdac",
"iot",
"embedded"
],
"author": "Microsoft",
"bin": {
"devicescript": "./devicescript",
"devicescript-cli": "./devicescript",
"devsc": "./devicescript"
},
"files": [
"./devicescript",
"./built/devicescript-cli.cjs",
"buffer",
"README.md"
],
"license": "MIT",
"devDependencies": {
"@types/commander": "^2.12.2",
"@types/debounce-promise": "^3.1.5",
"@types/fs-extra": "^9.0.13",
"@types/node": "^18.11.9"
},
"dependencies": {
"devicescript-compiler": "*",
"devicescript-vm": "*",
"commander": "^9.4.1",
"debounce-promise": "^3.1.2",
"faye-websocket": "^0.11.4",
"fs-extra": "^10.1.0",
"websocket-polyfill": "^0.0.3"
}
}
4 changes: 2 additions & 2 deletions compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export const JD_SERIAL_MAX_PAYLOAD_SIZE = 236
export const CMD_GET_REG = 0x1000
export const CMD_SET_REG = 0x2000

export const DEVS_ASSEMBLY_FILE = "prog.jasm"
export const DEVS_BYTECODE_FILE = "prog.jacs"
export const DEVS_ASSEMBLY_FILE = "bytecode.dasm"
export const DEVS_BYTECODE_FILE = "bytecode.devs"

class Cell {
_index: number
Expand Down
4 changes: 2 additions & 2 deletions runtime/devicescript-vm/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ function mymain(m) {
.then(() => {
m.jacsSetDeviceId("1989f4eee0ebe206")
m.jacsStart()
fetch("built/prog.jacs")
fetch("built/bytecode.dacs")
.then(r => {
if (r.status == 200)
r.arrayBuffer()
.then(v => m.jacsDeploy(new Uint8Array(v)))
else
console.log("you can copy or symlink built/prog.jacs to devicescript-vm/built/prog.jacs to pre-load it here")
console.log("you can copy or symlink built/bytecode.dacs to devicescript-vm/built/bytecode.dacs to pre-load it here")
})
}, err => {
console.log("failed to connect to devtools; please run 'jacdac devtools' in console")
Expand Down

0 comments on commit 9b7f538

Please sign in to comment.