MCU Flasher
This library is still in alpha
stage. Breaking changes may occurs in future releases.
See CHANGELOG.
Installation
npm
npm install @iotize/mcu-flasher.js
Usage
MCU Flasher needs these informations to configure itself :
- Simfile : A configuration file provided by IoTize declaring every MCU Reference-specific informations (such as memory addresses).
- PluginFile : an Intel HEX file, provided by IoTize, that contains the plugin to load in the MCU's memory to perform programming actions. The plugin to load is specified in the MCU's Simfile.
Both files can be retrieved from this repository: https://github.com/iotize-sas/simfiles
It also needs an IoTizeDevice to connect to, and profile credentials with sufficient rights, (e.g. tap admin's credentials)
Create and use a Developer instance
import { MicroControllerDeveloper } from '@iotize/mcu-flasher.js';
let mcuDeveloper = MicroControllerDeveloper.create(
device,
simFileString,
pluginString
);
// now you may call the programming methods:
await mcuDeveloper.dump();
await mcuDeveloper.erase();
await mcuDeveloper.blankCheck();
await mcuDeveloper.programFile(programString);
await mcuDeveloper.run();
programString is the Hex file or Srec file (to be validated) that you want to program in your MCU memory.