Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "rap-esp32", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Rap extension for esp32", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,12 +5,11 @@ 'use strict'; | ||
const fs = require('fs'); | ||
const { spawn, spawnSync } = require('child_process'); | ||
const chalk = require('chalk'); | ||
const tmp = require('tmp'); | ||
const deployment = require('./deployment'); | ||
const { spawn, spawnSync } = require('child_process'); | ||
const { Promise } = require('thenfail'); | ||
const { flash } = require('./flash'); | ||
const ORIGIN = 500 * 1024; | ||
const ORIGIN = parseInt('0x300000', 16); | ||
const ruffCompiler = 'ruff-compiler'; | ||
@@ -54,6 +53,2 @@ | ||
if (origin < 0) { | ||
origin = 4*1024*1024 - appBuffer.length; | ||
} | ||
let cp = flash({ | ||
@@ -68,4 +63,2 @@ binary: appPath, | ||
function generateApp(pathInfos, toCompile, origin) { | ||
const deployment = (origin < 0) ? require('./deployment') : require('./deploymentAbsolute'); | ||
let compilerCmd = findCommand(ruffCompiler); | ||
@@ -72,0 +65,0 @@ if (!compilerCmd) { |
@@ -18,2 +18,11 @@ 'use strict'; | ||
let arglst = []; | ||
arglst.push('--chip', 'esp32'); | ||
arglst.push('--port', '/dev/cu.SLAB_USBtoUART'); | ||
arglst.push('--baud', '1000000'); | ||
arglst.push('write_flash'); | ||
arglst.push('--flash_mode', 'dio'); | ||
arglst.push('--flash_freq', '40m'); | ||
arglst.push('--flash_size', '4MB'); | ||
function flash(options) { | ||
@@ -27,5 +36,4 @@ // Construct flash | ||
case 'freebsd': { | ||
let arglst = []; | ||
if (!options.erase) { | ||
arglst.push('-S', `0x${options.address.toString(16)}`); | ||
arglst.push(`0x${options.address.toString(16)}`); | ||
} | ||
@@ -41,19 +49,2 @@ arglst = arglst.concat([ | ||
case 'win32': { | ||
let arglst = []; | ||
if (options.erase) { | ||
arglst.push('-e', 'all'); | ||
} | ||
arglst = arglst.concat([ | ||
'-r', | ||
'-i', 'ICDI', | ||
'-o', `0x${options.address.toString(16)}`, | ||
options.binary | ||
]); | ||
return buildCommand({ | ||
cmd: 'LMFlash.exe', | ||
args: arglst | ||
}); | ||
} | ||
default: { | ||
@@ -60,0 +51,0 @@ console.log(`Unknown platform ${platform}!`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
4
16755
8
519