-
Notifications
You must be signed in to change notification settings - Fork 298
Project Structure and Motate
The g2core project consists of two code bases: g2Core, and Motate.
g2core firmware is all of the motion-control, motor-control, communications protocol, etc. portions that represent the "business logic" of the firmware. The g2Core project is housed at http://github.com/synthetos/g2 and doesn't contain any hardware-specific code except to wire g2Core-based hardware (such as the TinyG v9, Arduino Due) to the Motate layer.
Motate is the interface between the project and the hardware itself. It's designed to be project-agnostic, and even though it's developed in tandem with g2Core, it may be used for other projects as well.
The directory structure of the g2Core project in brief:
-
./
- Top level the directory resulting from a git clone-
g2core/
- contains all of the code of the g2Core firmware, excluding what directly deals with the hardware.-
board/
- contains all of the board-specific code that is used to inform the rest of the code about available hardware resources, such as how many motor drivers (and what type) , serial ports, USB interfaces, etc. are available.- Each directory inside the
board
directory is the name of a board, and contains the code necessary for that hardware.
- Each directory inside the
-
device/
- contains all of the code for specialized devices, such as step-direction-based stepper motor drivers, NeoPixel driver, etc.- Each directory inside
device
is a specific class of device. The board makefiles then add the device directories they need to the compile, and the board-specific code imports and handles integrating these devices with the core code. - There should not be code directly in the
device
directory. It should all be in subdirectories.
- Each directory inside
-
settings/
- contains the files to configure the default settings of the firmware for a specific machine type.- The machine type should not be confused with the board. The board is the electronics that drive the machine. These settings are for the machine, and should be as board-agnostic as makes sense for that machine.
- Settings files have the name pattern of
settings_
machine type.h
- Examples:
settings_othermill.h
,settings_Printrbot_Simple_1608.h
-
settings_default.h
is called automatically after the selected settings file, and provides any #defines not already #defined in the selected settings file. The values in the default file result in a machine that is functional (i.e. communicates), but with most active devices disabled.
-
-
Motate/
- is a git submodule that houses a reference to a specific commit of in the Motate repo. (Here's a nice writeup on submodule on GitHub as well.)- The Motate project handles all of the communications directly to the hardware, and allows the g2Core project to be highly portable to other processors.
-
-
Resources/
- contains additional, non-code related resources, such as images for documentation, additional debugging helper scripts, etc.
Please check out Getting Started with g2core.
This page is useful for Setting up Configs for new boards.
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