-
Notifications
You must be signed in to change notification settings - Fork 296
Compiling g2core on Linux and OS X (command line)
-
Linux (Ubuntu-based)
sudo apt-get install git-core make
If you're running a 64-bit version of Ubuntu, you'll also need to install some 32-bit pieces:
sudo apt-get install libstdc++6:i386
-
OS X - If you don't already have Xcode command line tools installed (it doesn't hurt to run it again):
xcode-select --install
- See Getting Started with G2core → Cloning the Repo if you haven't already.
For Arduino Due:
cd g2/g2core
make PLATFORM=DUE BOARD=gShield
For TinyG V9 board:
cd g2/g2core
make CONFIG=TestV9
- See Adding and Revising Boards for explanation of the available
make
options.
We recommend using the Segger J-Link for debugging. It can also be used for flashing (which may be faster than other flashing methods).
In addition to the debugger, you may also need a SWD Cable and JTag to SWD Adapter to connect to the Arduino Due. Some versions of the J-Link already have a SWD port and come with a cable.
When connecting everything, ensure that all cables are plugged in with the correct polarity. The SWD cable is not keyed, so markings on the boards should be used to align it. Typically, there is a dot or 1
near one corner of the SWD pin header (look for a 5x2 pin header with 0.5mm pitch) that should be aligned with the striped side of the cable.
- Download and install the J-Link Software and Documentation Pack. If using Ubuntu, you probably want the 64-bit .deb.
- Ensure your user account has access to usb/serial devices:
sudo usermod -a -G dialout USERNAME
- Install the multi-architecture version of gdb:
sudo apt-get install gdb-multiarch
- Start the JLink GDB server. This command works for Arduino Due; it may need to be modified for other boards:
JLinkGDBServer -if SWD -device AT91SAM3X8E
- Start gdb:
gdb-multiarch ./bin/gShield/g2core.elf
- Inside gdb, connect to the JLink GDB server:
target extended-remote :2331
- Type
load
to flash the current binary to the device. - Type
monitor reset
to reset the device. - Type
continue
to run, and use gdb as normal.
You may need to re-plug the device's USB after flashing/resetting if the host is not properly detecting it immediately.
Getting Started Pages
- Home
- What is g2core?
- Who uses g2core?
- Jerk-Controlled Motion
- Getting Started with g2core
- Connecting to g2core
- Configuring g2core
- Flashing g2core
- Troubleshooting
Reference Pages
- Gcodes
- Mcodes
- Text Mode
- JSON Communications
- GPIO Digital IO
- Alarms & Exceptions
- Power Management
- Coordinate Systems
- Status Reports
- Status Codes
- G2 Communications
- Tool Offsets and Selection
- Probing
- Feedhold, Resume, Job Kill
- Marlin Compatibility
- 9 Axis UVW Operation
- gQuintic Specs
Discussion Topics
- Roadmap
- GPIO for 1.X Releases
- Toolheads
- Raster Streaming Prototol
- g2core REST Interface
- Gcode Parsing
- G2 3DP Dialect
- Consensus Gcode
- Digital DRO
- Overview of Motion Processing
Developer Pages
- Development & Contribution
- Branching and Release - DRAFT
- Getting Started with g2core Development
- Project Structure & Motate
- Compiling G2
- OSX w/Xcode
- OSX/Linux Command Line
- Windows10 w/AtmelStudio7
- Debugging G2 on OSX
- Board and Machine Profiles
- Arduino Due Pinout
- Arduino DUE External Interfaces
- Diagnostics
- Debugging w/Motate Pins
- Development Troubleshooting
- g2core Communications
- Git Procedures
- Windows 10 / VMware 8 Issues
- Dual Endpoint USB Internals
- G2core License
- VSCode Setup
- Compatibility Axioms
- Wiki History