-
Notifications
You must be signed in to change notification settings - Fork 296
Compiling g2core on OS X (with Xcode)
This page is for compiling the G2core project on OS X with XCode. Please see Getting Started with G2core for information about hardware and compiling on other platforms.
See also: Debugging g2core on OSX with GDB and Atmel-ICE
To compile g2core on OS X with Xcode you will need to install the free XCode. Download the installer from the Mac App Store. Alternatively, if you only need the command line tools, you can run this command in Terminal: xcode-select --install
).
If you wish to use the OS X command line, then visit Compiling g2core on Linux and OS X (command line) as well.
See Getting Started with G2core → Cloning the Repo if you haven't already.
In the newly cloned repo, open the g2core.xcworkspace
.
Ensure that the "g2core" scheme to your target board is selected, as shown (Step 1):
Now you can choose Build
for the Product
menu of Xcode (or click the "play" button in the top-left of the window, marked as "2" above) to build g2core for all supported "platforms" simultaneously.
The resulting files will be in ${projectRoot}/g2core/bin/
, in a folder named after the platform and board. For example, there will be a folder named PrintrbotSimple1608-printrboardG2v3
with a file named g2core.elf
(among others).
If you have created a new BOARD
or CONFIG
(or wish to use a different SETTINGS_FILE
) then you will need to make a new target so that XCode will compile it corrrectly.
-
Click on "g2core" in the file navigator and find an existing target that is similar to the one you are planning to use.
-
Right-click on that target in the list and choose "Duplicate". The new copy will show up in the list. Double-click on the name to change it.
-
With the new Target selected, click the Info tab at the top and modify the command line as necessary.
- Generally, you will want to add
COLOR=0 VERBOSE=1
to the command line you would call from the shell prompt so Xcode can parse the output properly.
- In the scheme menu (top left, next to the play and stop buttons) you should see the name of the copy you made earlier (before you changed the name). Click on that to get a menu, and chose "Manage Schemes..." from the bottom of the list.
-
To change the name you first click on the name, then click on it again and release the mouse but hold the mouse still. Then the name will become editable text. Change the name (generally we match this name to the Target name) and then hit return to commit the change.
-
In this same window, check the checkmark in the "Shared" column to put that scheme where it will be committed by Git. Leave it unchecked and you'll be the only one that sees it, and it will be deleted if you reset the repo.
-
Click the close button when you're done, or if you wish to verify or alter the target settings you can double-click on them. (We only care that the correct Target is listed in the Build step. You can add multiple if you wish.)
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