Skip to main content

Firmware Upgrade

info

This tutorial applies to AnyShake Explorer E-C121G as well.

This tutorial will guide you through the process of upgrading the firmware on the AnyShake Explorer E-C111G.

Before Upgrading

The E-C111G is based on the ARM Cortex-M3 core. The upgrade process is usually done via an SWD interface. To upgrade the firmware, you need a debugger that supports SWD, such as ST-Link or J-Link.

In this tutorial, we use the official ST-Link V2 for demonstration purposes.

tip

Third-party programmers that are compatible with ST-Link V2 are also supported. These alternatives are often more affordable and work reliably with AnyShake Explorer E-C111G.

Connect E-C111G SWD Interface to PC

Dissamble the E-C111G enclosure and connect the SWD pins to your PC using ST-Link V2, connect the pins as follows:

ST-Link V2 PinE-C111G Pin
Pin 4 (GND)GND
Pin 7 (SWDIO)DIO
Pin 9 (SWCLK)CLK

ST-Link V2 wiring

Connection in reality

Caution

The SWD interface is not electrically isolated. Use caution when connecting to a powered system to avoid potential damage to your programmer or the device.

Install Driver for Programmer

On Linux systems, no additional driver installation is required. ST-Link programmers are supported through the standard libusb interface.

On Windows, you need to manually install the ST-Link USB driver. You can download the latest version from the STMicroelectronics website.

After installing the driver, open Device Manager and check under Universal Serial Bus Devices.

Windows ST-Link Driver

tip

On Linux (e.g. Debian) systems, if you have stlink-tools package installed, you can use the st-info command to check if MCU is recognized by the programmer. For example:

$ st-info --probe

Typical output:

Found 1 stlink programmers
version: V2J29S7
serial: ************************
flash: 131072 (pagesize: 1024)
sram: 20480
chipid: 0x410
dev-type: STM32F1xx_MD

With non-zero chipid and dev-type in the output, which indicates that the device has been successfully recognized by the programmer.

Setup PlatformIO

PlatformIO is an open-source embedded development environment used to build and upload firmware. To install PlatformIO, you need install Python and Visual Studio Code first.

After installing, you can open Visual Studio Code and click Extensions, search to install "PlatformIO" extension.

Install PlatformIO

It usually takes a few minutes to install the extension. Restart Viaual Studio Code after PlatformIO installation for the extension to initialize properly.

Get Latest Firmware

The firmware source code for E-C111G is located in the default master branch of the AnyShake Explorer GitHub repository, under the firmware/ directory.

To get source files, you need to clone the repository and checkout the corresponding branch.

If you have git installed, you can use the following command to clone the repository:

$ git clone --depth 1 https://github.com/anyshake/explorer

Or get the latest project files using the following direct link, after downloading, extract the archive and locate the firmware directory.

Open Firmware Project

  1. Press Ctrl + K, O (or Cmd + K, O on macOS)
  2. Select the firmware folder inside the repository

Open firmware Folder

You should see the platformio.ini file in the root of the project. PlatformIO will automatically initialize the environment.

Verify project

Customize Build Settings

Open the platformio.ini file and customize the settings according to your needs. There are a few options to customize:

GNSS_BAUDRATE

The GNSS_BAUDRATE macro controls the baud rate of the on-board GNSS module. By default, it is set to 9600, which is compatible with most GNSS modules. However, some modules may require a different baud rate for proper communication.

Below is a reference table listing common GNSS module models and their corresponding recommended baud rates:

ManufacturerModelBaud Rate (bps)
ZHONGKEWEIATGM332D9600
AllystarTAU11149600
QuectelLC260Z115200
u-bloxMAX-M10S-00B38400

USE_ICM42688

The USE_ICM42688 macro to enable the ICM-42688-P as built-in accelerometer. It is a compatibility option for AnyShake Explorer E-C121G.

danger

Enabling this macro in a non-E-C121G device may cause unexpected behavior.

Build and Upload

Click the Upload button in the PlatformIO toolbar to compile and flash the firmware.

Build and Upload

It usually takes a while to build firmware and upload to the device. If successful, you’ll see a confirmation message:

Upload Success

After Flashing

Remove the programmer from the E-C111G and reset the device by pressing the RESET button.

Your device is now running the updated firmware and ready for use!