Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: rename generate compiler files #30

Merged
merged 3 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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