Skip to content

Instantly share code, notes, and snippets.

@verticalgrain
Last active August 31, 2024 12:51
Show Gist options
  • Save verticalgrain/deae2821213a891747e08e2d6492808a to your computer and use it in GitHub Desktop.
Save verticalgrain/deae2821213a891747e08e2d6492808a to your computer and use it in GitHub Desktop.
NextThingCo C.H.I.P. Flashing guide as of November, 2018

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.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
  1. Move the CHIP-tools directory inside CHIP-SDK directory (CHIP-SDK/CHIP-tools).

  2. Download the 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 Pocketchip I used the stable-pocketchip-b128 image and I put it at CHIP-SDK/stable-pocketchip-b128.

  1. 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.

  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).

  3. 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:

@Alexander323Ch
Copy link

I am trying to flash the chip in ubuntu in its most current version

@Alexander323Ch
Copy link

and currently they do not work for me in the git clone method https://github.com/thore-krug/Flash-CHIP.git

@Alexander323Ch
Copy link

In that method it shows me errors such as time out or the most common one that is invalid option "i"

@Alexander323Ch
Copy link

can someone help me i'm giving up on this and i'm new to this world

@Lorenz74
Copy link

Lorenz74 commented Feb 20, 2023

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.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
  1. Move the CHIP-tools directory inside CHIP-SDK directory (CHIP-SDK/CHIP-tools).

  2. 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.

  1. 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.

  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

  3. Connect the CHIP to your computer with USB (using the microUSB port on the CHIP, not the fullsize USB port).

  4. 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.

  5. 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”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment