loading GRBL to an Arduino

Discussion about the arduino based g-code interpreter, grbl
Post Reply
alpha
Posts: 174
Joined: Thu Apr 12, 2012 2:49 pm

loading GRBL to an Arduino

Post by alpha » Fri May 18, 2012 12:41 am

I do have a AVR JTAGICE mkII and I have Linux Mint 12 64bit. The Arduino is a Seeeduino V2.2 with a AVR labeled "ATMEGA328P AU 1019". From what I understand this should be compatible to GRBL.

Code: Select all

~/Downloads $ sudo /home/markus/arduino-1.0/hardware/tools/avrdude64 -C/home/markus/arduino-1.0/hardware/tools/avrdude.conf -pm328p -cjtag2isp -P usb -D -Uflash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

avrdude64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude64: Device signature = 0x1e950f
avrdude64: reading input file "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: writing flash (21738 bytes):

Writing | ################################################## | 100% 10.09s

avrdude64: 21738 bytes of flash written
avrdude64: verifying flash memory against grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: load data flash data from input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex contains 21738 bytes
avrdude64: reading on-chip flash data:

Reading | ################################################## | 100% 5.85s

avrdude64: verifying ...
avrdude64: verification error, first mismatch at byte 0x0002
           0xeb != 0x61
avrdude64: verification error; content mismatch

avrdude64: safemode: Fuses OK

avrdude64 done.  Thank you.
looks like it is not overwriting the Arduino boot loader, For example if I upload the blinky sketch it works and the LED starts flashing.

Code: Select all

sudo /home/markus/arduino-1.0/hardware/tools/avrdude64 -C/home/markus/arduino-1.0/hardware/tools/avrdude.conf -pm328p -carduino -P /dev/ttyUSB0 -D -Uflash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex
avrdude64: stk500_recv(): programmer is not responding
I also tried to download like this, but this is also not working.

Code: Select all

~/Downloads $ sudo /home/markus/arduino-1.0/hardware/tools/avrdude64 -C/home/markus/arduino-1.0/hardware/tools/avrdude.conf -pm328p -cjtag2isp -P usb -D -Uflash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

avrdude64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude64: Device signature = 0x1e950f
avrdude64: reading input file "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: writing flash (21738 bytes):

Writing | ################################################## | 100% 10.09s

avrdude64: 21738 bytes of flash written
avrdude64: verifying flash memory against grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: load data flash data from input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex contains 21738 bytes
avrdude64: reading on-chip flash data:

Reading | ################################################## | 100% 5.84s

avrdude64: verifying ...
avrdude64: verification error, first mismatch at byte 0x0002
           0xeb != 0xab
avrdude64: verification error; content mismatch

avrdude64: safemode: Fuses OK

avrdude64 done.  Thank you.
So I thought I may try a original Arduino Duemilanove, but it looks like the same problem.

Any idea what I'm doing wrong? I do have

alpha
Posts: 174
Joined: Thu Apr 12, 2012 2:49 pm

Re: loading GRBL to an Arduino

Post by alpha » Fri May 18, 2012 12:56 am

Code: Select all

 ~/Downloads $ sudo /home/markus/arduino-1.0/hardware/tools/avrdude64 -C/home/markus/arduino-1.0/hardware/tools/avrdude.conf -p m328p -cjtag2isp -P usb -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

avrdude64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude64: Device signature = 0x1e950f
avrdude64: NOTE: FLASH memory has been specified, an erase cycle will be performed
           To disable this feature, specify the -D option.
avrdude64: erasing chip
avrdude64: reading input file "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: writing flash (21738 bytes):

Writing | ################################################## | 100% 10.09s

avrdude64: 21738 bytes of flash written
avrdude64: verifying flash memory against grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: load data flash data from input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex contains 21738 bytes
avrdude64: reading on-chip flash data:

Reading | ################################################## | 100% 5.85s

avrdude64: verifying ...
avrdude64: verification error, first mismatch at byte 0x0000
           0x0c != 0x00
avrdude64: verification error; content mismatch

avrdude64: safemode: lfuse changed! Was ff, and is now fe
Would you like this fuse to be changed back? [y/n] n
avrdude64: safemode: hfuse changed! Was da, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude64: safemode: efuse changed! Was 5, and is now 6
Would you like this fuse to be changed back? [y/n] n
avrdude64: safemode: Fuses OK

avrdude64 done.  Thank you.

~/Downloads $ sudo /home/markus/arduino-1.0/hardware/tools/avrdude64 -C/home/markus/arduino-1.0/hardware/tools/avrdude.conf -p m328p -cjtag2isp -P usb -D -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

avrdude64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude64: Device signature = 0x1e950f
avrdude64: reading input file "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: writing flash (21738 bytes):

Writing | ################################################## | 100% 10.09s

avrdude64: 21738 bytes of flash written
avrdude64: verifying flash memory against grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: load data flash data from input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex auto detected as Intel Hex
avrdude64: input file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex contains 21738 bytes
avrdude64: reading on-chip flash data:

Reading | ################################################## | 100% 5.84s

avrdude64: verifying ...
avrdude64: 21738 bytes of flash verified

avrdude64: safemode: Fuses OK

avrdude64 done.  Thank you.

looks like removing -D and running it and adding -D and running it again it may worked????
GrblController.png
GrblController.png (75.6 KiB) Viewed 1385 times
It looks like the Arduino is accepting the GCODE :D

Post Reply