Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:
Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.
- Download and unpack the CHIP-SDK.zip from one of the following:
- https://archive.org/details/C.h.i.p.FlashCollection
- https://github.com/NextThingCo/CHIP-SDK
- https://github.com/Project-chip-crumbs/CHIP-SDK
- Download and unpack CHIP-tools.zip from one of the following:
- https://archive.org/details/C.h.i.p.FlashCollection
- https://github.com/NextThingCo/CHIP-tools-backup
- https://github.com/Project-chip-crumbs/CHIP-tools
-
Move the CHIP-tools directory inside CHIP-SDK directory (CHIP-SDK/CHIP-tools).
-
Download the a CHIP image from one of the following:
- https://archive.org/details/C.h.i.p.FlashCollection (.zip contains all CHIP image variants)
- https://dl.bintray.com/yoursunny/CHIP/ (can download individual CHIP images)
Unzip it (if necessary) and move the desired image into the CHIP-SDK directory. In my case since I'm flashing the Pocketchip I used the stable-pocketchip-b128 image and I put it at CHIP-SDK/stable-pocketchip-b128.
-
Navigate to the CHIP-SDK directory in terminal and run the build script:
./setup_ubuntu1404.sh
The build script should run. Multiple errors will be shown, including a fatal error when the script tries to get the CHIP-tools from a non-existant repo. This can be ignored since we already downloaded the CHIP-tools directory in step 2. -
Put your CHIP in FEL mode by putting a jumper wire between GND and FEL. Connect the CHIP to your computer with USB (using the microUSB port on the CHIP, not the fullsize USB port).
-
Navigate to the CHIP-tools directory in terminal at CHIP-SDK/CHIP-tools and run the update firmware script. Use the -L option to explicitly specify the firmware versions from the flash-collection directory:
./chip-update-firmware.sh -L ../stable-pocketchip-b128
References:
Hi...below the instructions, this works also on current Ubuntu Version (the step 8 is the one that allow to flash NTC CHIP also on the most updated Ubuntu versions).
Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of January 2023 (Ubuntu 22.10 Tested). The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of January 2023:
Note: Flashing must be done on Linux. Tested on Ubuntu.
Move the CHIP-tools directory inside CHIP-SDK directory (CHIP-SDK/CHIP-tools).
Download a CHIP image from one of the following:
Unzip it (if necessary) and move the desired image into the CHIP-SDK directory. In my case since I'm flashing the NTC CHIP I used the stable-server-b149 image and I put it at CHIP-SDK/stable-server-b149.
Navigate to the CHIP-SDK directory in terminal and run the build script:
./setup_ubuntu1404.sh
The build script should run. Multiple errors will be shown, including a fatal error when the script tries to get the CHIP-tools from a non-existant repo. This can be ignored since we already downloaded the CHIP-tools directory in step 2.Put your CHIP in FEL mode by putting a jumper wire between GND and FEL. (see image below)
https://ksr-ugc.imgix.net/assets/005/256/895/d2cdca49fbc785b4f636bedaf96b383d_original.jpg?w=639&fit=max&v=1453875954&auto=format&q=92&s=bff8004fdbb40a01bf0a5e675b8d1641
Connect the CHIP to your computer with USB (using the microUSB port on the CHIP, not the fullsize USB port).
Navigate to directory CHIP-SDK/CHIP-tools. Open with text editor the following files chip-fel-flash.sh, chip-flash, common.sh and remove the strings “-i 0x1f3a” and “-u”. Save the edited files.
Navigate to the CHIP-tools directory in terminal at CHIP-SDK/CHIP-tools and run the update firmware script. Use the -L option to explicitly specify the firmware versions from the flash-collection directory: “sudo ./chip-update-firmware.sh -L ../stable-server-b149”