-
Notifications
You must be signed in to change notification settings - Fork 296
Flashing g2core with OSX
This page is for uploading an already compiled G2 binary to a target board without a debugger from OS X. Please see Getting Started with G2 for information about other options.
This is also for flashing without a hardware debugger such as the Atmel ICE, Atmel SAM-ICE, or Segger JLink.
Please see this guide for instructions on flashing with a hardware debugger
Note - Flashing the Due from OSX seems to be occasionally unreliable. If you experience weirdness with the flashing process, using a Raspberry Pi or other Linux machine to do the flashing should work reliably.
Option 1 - Compile your own using the instructions in Compiling G2 on OS X (with Xcode)
Option 2 - Get a suitable .bin firmware file from https://github.com/synthetos/g2/releases
- Click the "Assets" drop down for any of the releases. The various g2core.bin files will be displayed, with names appropriate for specific boards we have configuration files for.
Open Terminal.app, then change to the Resources/TinyG2-OSX-Programmer/ subdirectory in the g2 repository you just cloned. One way to do that is:
- Type "cd " (That's lowercase "c", then "d", then space), DON'T press return yet.
- Then drag the Resources/TinyG2-OSX-Programmer/ folder from the cloned g2 repository to that Terminal.app window. It should type in a path for you.
- Now press return.
Either place the .bin file you want to program into that directory or remove the trailing version number from the elf file that is present; e.g.
mv g2core.bin.13.01 g2core.bin
Plug a USB cable from the computer to the Programming port of the Due (the one closest to the power jack). Make sure there are no shields, programmers, debuggers or other devices plugged into the Due. The Due does not need external power for programming - it will be powered by the USB programming cable.
Copy and paste the following line into the Terminal window:
./DueFromOSX.sh -f g2core.bin -p /dev/cu.usbmodem*
The output should look something like this (the numbers after cu.usbmodem will be different):
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem241311
wait...
Starting programming of file g2core.elf -> g2core.bin on port cu.usbmodem241311
Erase flash
Write 119380 bytes to flash
[==============================] 100% (467/467 pages)
Verify 119380 bytes of flash
[==============================] 100% (467/467 pages)
Verify successful
Set boot flash true
CPU reset.
The flashing is done. You now have a Due/TinyG2. 😀
You may need to press the reset button on the Due before continuing.
Generally the next step will be connecting to your Due to verify it's working, and to make use of it.
Disconnect the Due, then plug the USB cable into the other port.
If the flashing doesn't appear to work, and you get all red lights on the board when it starts, don't panic.
The red lights just mean the board is in bootloader mode. You haven't bricked the board. 😄
OSX seems to have difficulty recognising boards on bootloader mode, not even showing a /dev/cu.usbmodem*
entry for them.
If this happens to you, one work around with successful results is to try flashing again, but this time from a Linux system. A Linux PC - even a Raspberry Pi running Linux - will still be able to recognise and flash the Due, even when the Due is in bootloader mode.
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