Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rap-tm4c1294

Package Overview
Dependencies
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rap-tm4c1294 - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0

2

package.json
{
"name": "rap-tm4c1294",
"version": "0.5.3",
"version": "0.6.0",
"description": "Rap extension for tm4c1294",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -23,2 +23,3 @@ 'use strict';

.option('--source', 'deploy source code directly without pre-compilation')
.option('--file <path>', 'deploy the specified app file')
.option('--use-32-bit', 'use 32 bit compiler')

@@ -61,2 +62,36 @@ //.option('--force', 'force deployment even if a claim claims incompatable engine or board')

if (program.file) {
return new Promise((resolve, reject) => {
try {
let fileBuffer = fs.readFileSync(program.file);
resolve(fileBuffer);
} catch (error) {
reject(error);
}
})
.then(fileBuffer => {
// get program.serail
let parameters = parametersJS.getParameters(rap, program);
if (parameters === undefined) {
program.serial = undefined;
} else {
program.serial = parameters.serial;
}
// create package and deploy it
let appPath = tmp.tmpNameSync();
let appBuffer = alignAppForFlash(fileBuffer);
fs.writeFileSync(appPath, appBuffer);
if (origin < 0) {
origin = 1024 * 1024 - appBuffer.length;
}
let cp = flash({
binary: appPath,
serial: program.serial,
address: origin
});
return Promise.for(cp);
});
}
rap

@@ -90,2 +125,3 @@ .getDeploymentManifest()

let appBuffer = generateApp(manifest, toCompile, origin, alignment);
appBuffer = alignAppForFlash(appBuffer);
fs.writeFileSync(appPath, appBuffer);

@@ -222,1 +258,13 @@

}
function alignAppForFlash(appBuffer) {
let flashAlignment = 4 * 1024;
if (appBuffer.length % flashAlignment === 0) {
return appBuffer;
}
let size = Math.ceil(appBuffer.length / flashAlignment) * flashAlignment;
return Buffer.concat([
Buffer.alloc(size - appBuffer.length, 0),
appBuffer
]);
}

@@ -270,2 +270,8 @@ /* eslint-disable camelcase */

// NOTE:
// JerryScript's bytecode must be 8 bytes aligned,
// see docs/04.INTERNALS.md section "Compressed Pointers".
// Since we put all data in "chars" region including bytecode,
// therefore we need to align start address for each data with 8 bytes.
// rofs_t

@@ -272,0 +278,0 @@ relOffsetMap.rofs_t = relOffset;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc