Skip to content

Flashing with Node SAM Ba Utility in OSX

Jay Polo edited this page May 31, 2018 · 6 revisions

Node-Sam-Ba

This is a nodejs utility that you can flash your ARM based g2 boards with.

Installing NodeJs

The easiest way to install NodeJs on OSX is to use the node version manager. Use this one-liner at the command line to install nvm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash

After nvm is installed type:\ `nvm install 6`
This will install node version 6.

Getting node-sam-ba

Next we use git to download node-sam-ba like the screen shot below:
git clone https://github.com/synthetos/node-sam-ba.git

Installing node-sam-ba

Installing is pretty simple. Change to the node-sam-ba directory and then issue the npm command to download and install all needed dependencies.
Type: cd node-sam-ba
npm install

Usage

To use the node-sam-ba programming utility you need to make sure your USB cable is hooked to your g2core board and that the board is in bootloader mode. IE: No heart beats blinking. See entering bootloader mode for more details on this.
You can now type: node flash.js to get the command usage.

You will notice that you must provide a port (-p option) to specify which serial port the g2core board is identified in your computer. If you do not see a port make sure that your board is hooked up and is in bootloader mode.

My command looked something like this: node flash.js -p /dev/tty.usbmodem146231 -b ~/Documents/GitHub/g2/g2core/bin/Ultimaker2Plus-gquintic-c/g2core.bin

INCOMPLETE: Attach Video and screen shot. -ril3y

Clone this wiki locally