Flashing GRBL onto Arduino via Mac OS X

Post Reply
joelcrawford
Posts: 8
Joined: Sat Oct 25, 2014 1:57 pm

Flashing GRBL onto Arduino via Mac OS X

Post by joelcrawford » Sat Oct 25, 2014 3:10 pm

(this post won't help you if your arduino is damaged or the boot loader is dead - however you'll know if you run thru this reload and you still get a programmer error)

I needed to reload a couple of Arduino spares with GRBL (they had been overwritten in a haste of trying a new CAM software). I tried downloading the general GRBL hex files but I had a feeling what Inventables loads may not be on github (or it may but I couldn't find it - and if so link us!). Long story short I got the file from Sam @ Inventables (She's awesome). Now I had the file I needed to do the upload thing (see how technical I am?). It was suggested to use HexUploader for Mac. However, and I tried on two different machines (OS 10.9 & 10.8) and the binary wouldn't load ... so no easy app solution for me.

First, make sure you have the Arduino IDE installed at this point (it's under downloads on the Arduino site)

Now open Terminal. (In HD>Applications>Utilities)

Terminal Commands:

FIRST: I set my directory to desktop: cd /Users/<short account name>/Desktop (for example for me it's cd /Users/Joel/Desktop)

NEXT: I put the GRBL hex code file on the desktop and renamed it grbl.hex just for ease.

In terminal I laid this out:

Code: Select all

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v  -p m328p -c arduino -P/dev/tty.usbmodem621  -D -U flash:w:grbl.hex
[/color]

PRESSED ENTER AND POOF! I had a factory fresh install of Shapeoko 2 GRBL.

BUT WAIT - THERE'S MORE (a.k.a It's not that easy, you'll need to change some things to make it work for you.)

A couple things to note BEFORE you just cut and paste and run it from above:

Your Arduino app NEEDS to be in Applications (you'll need to move it as it just sits in downloads when you download it)

THIS PART WILL LIKELY BE DIFFERENT FOR YOU:

Code: Select all

/dev/tty.usbmodem621
[/color]
There's an easy way to get your modem port and a slightly harder way:
a. open Universal Gcode Sender (hou should have this by now, if not, download it) and see what port it picks up (i.e. tty.usbmodem611 or tty.usbmodem411 or tty.usbmodem422) now replace the "tty.usbmodem621" with YOUR modem.
b. In Terminal type /dev/tty <then hit TAB and it should complete - unless there are two instances in which case you'll have to actually go to the /dev dir and take a look: That's cd /dev and then type "ls" that's LS not i. (It's a big list, look for tty)

THIS PART WILL LIKELY BE DIFFERENT FOR YOU:

Code: Select all

grbl.hex
[/color]
It's the exact name of the hex file that you've put on the desktop. As I said, I renamed mine for ease of typing in Terminal. (originally it was "grbl_0.8c_s2_defaults (1).hex" which is horrible to try to type out)

Now after you've change the command with your information run it. You'll see a lot of things going on because I turned on verbose mode which shows you everything going thru. But in the end you should have a working board (or not, and then you'll know if it's bricked if you get back "avrdude: ser_recv(): programmer is not responding" and "avrdude: stk500_recv(): programmer is not responding")

The only reason why I'm posting all this is two fold - This should me MUCH easier to do and there was a baud setting in this code from another post that made communicating with the Arduino fail. (it was this: -b57600) I would highly suggest NOT using this as it didn't work and was the source of an hour of self hate. Also I did add the "-v" call to see what was going on.

Hope this helps. Let me know if I missed anything it was a late night last night and I should have been taking notes - but I was just happy to have the darn things up and running. Also if someone has a link to the Shapeoko 2 GRBL file that would be awesome - If not I can email you a copy, just PM.

WillAdams
Posts: 8564
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Flashing GRBL onto Arduino via Mac OS X

Post by WillAdams » Sat Oct 25, 2014 3:20 pm

Would you please zip up and upload the file you got from Inventables to the wiki?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets
Nomad 883 Pro #596 (bamboo)

Caesar S
Posts: 197
Joined: Mon Sep 29, 2014 7:19 pm
Location: Seattle, WA

Re: Flashing GRBL onto Arduino via Mac OS X

Post by Caesar S » Wed Nov 19, 2014 3:39 am

Hex file from Sam?

Caesar S
Posts: 197
Joined: Mon Sep 29, 2014 7:19 pm
Location: Seattle, WA

Re: Flashing GRBL onto Arduino via Mac OS X

Post by Caesar S » Thu Nov 20, 2014 3:45 am

I received the attached file from John (.hex content are apparently not allowed for uploading, so I zipped it up).
grbl_0.8c_shapeoko_2_defaults.hex.zip
(29.55 KiB) Downloaded 4766 times
I followed the directions noted previously and it reset my Arduino Uno back to factory shipped state.

This is the config it is programmed with:
PastedGraphic-2.jpg
PastedGraphic-2.jpg (67.68 KiB) Viewed 1825 times
My confusion over the setting is due to 3 (THREE) different configurations shown in the http://docs.shapeoko.com/helloworld.html page.

Which one should I use?

The first screenshot has the $0 = 43.740

Image

The second screenshot has the $0 = 42.020

Image

To make it even more confusing, the copy and paste text from the page has the $0 = 40.000
PastedGraphic-1.jpg
PastedGraphic-1.jpg (34.7 KiB) Viewed 1825 times

Post Reply