G2Core is a motion control system, similar to grbl, mach3/4, linuxCNC, etc. It runs on a 32-bit ARM Cortex M3 Arduino Due, which means plenty of power for additional features.

Due Pinout

Due Pinout

Configuration in G2core

TermMeaning
machineBOARD + SETTINGS_FILE
CONFIGSpecifies default BOARD/SETTINGS_FILE for a machine
BOARDSpecify board type and revision
BASE_BOARDSpecify underlying hardware platform
SETTINGS_FILESpecify default settings

Enable Motors and Axes

  1. Create a new SETTINGS_FILE, settings_defaultdue.h

  2. Enable motors M1_POWER_MODE: MOTOR_ALWAYS_POWERED

  3. Set motor power level M1_POWER_LEVEL: 1.0

  4. Enable axes X_AXIS_MODE: AXIS_STANDARD

Build and Flash

  1. Add a new config in boards.mk which will use the new settings_defaultdue.h
ifeq ("$(CONFIG)","DefualtDue")
    ifeq ("$(BOARD)","NONE")
        BOARD=g2v9k
    endif
    SETTINGS_FILE="settings_defaultdue.h"
endif
  1. Clean then Build Solution

  2. Flash the board using arduino-flash-tools, which in my case is

mode COM3 BAUD=1200
bossac.exe --port=COM3 -U false -e -w -v -b C:\Github\g2\g2core\bin\DefualtDue-gShield\g2core.bin -R

Connect

  1. Switch the USB cable to the other port on the board, and connect to CNCjs/UGS/Chilipeppr