Go Down

Topic: How to properly upload Grbl v0.9 code to A4988 driver board R3 ARDUINO UNO? (Read 72 times) previous topic - next topic

sagex98

When I try to upload GRBLv.9 (https://github.com/grbl/grbl) code to my A4988 driver board R3 I get the following error message:



Code: [Select]
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\sagex\Documents\Arduino\libraries\grbl/grbl.h:43:0,

                 from C:\Users\sagex\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:

C:\Users\sagex\Documents\Arduino\libraries\grbl/nuts_bolts.h:25:0: warning: "false" redefined

 #define false 0

 ^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:24:0,

                 from sketch\grblUpload.ino.cpp:1:

c:\program files (x86)\arduino\hardware\tools\avr\lib\gcc\avr\4.9.2\include\stdbool.h:42:0: note: this is the location of the previous definition

 #define false false

 ^

In file included from C:\Users\sagex\Documents\Arduino\libraries\grbl/grbl.h:43:0,

                 from C:\Users\sagex\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:

C:\Users\sagex\Documents\Arduino\libraries\grbl/nuts_bolts.h:26:0: warning: "true" redefined

 #define true 1

 ^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:24:0,

                 from sketch\grblUpload.ino.cpp:1:

c:\program files (x86)\arduino\hardware\tools\avr\lib\gcc\avr\4.9.2\include\stdbool.h:43:0: note: this is the location of the previous definition

 #define true true

 ^

In file included from C:\Users\sagex\Documents\Arduino\libraries\grbl/grbl.h:43:0,

                 from C:\Users\sagex\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:

C:\Users\sagex\Documents\Arduino\libraries\grbl/nuts_bolts.h:51:0: warning: "max" redefined

 #define max(a,b) (((a) > (b)) ? (a) : (b))

 ^

In file included from sketch\grblUpload.ino.cpp:1:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:93:0: note: this is the location of the previous definition

 #define max(a,b) ((a)>(b)?(a):(b))

 ^

In file included from C:\Users\sagex\Documents\Arduino\libraries\grbl/grbl.h:43:0,

                 from C:\Users\sagex\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:

C:\Users\sagex\Documents\Arduino\libraries\grbl/nuts_bolts.h:52:0: warning: "min" redefined

 #define min(a,b) (((a) < (b)) ? (a) : (b))

 ^

In file included from sketch\grblUpload.ino.cpp:1:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:92:0: note: this is the location of the previous definition

 #define min(a,b) ((a)<(b)?(a):(b))

 ^

In file included from C:\Users\sagex\Documents\Arduino\libraries\grbl/grbl.h:43:0,

                 from C:\Users\sagex\Documents\Arduino\libraries\grbl\examples\grblUpload\grblUpload.ino:27:

C:\Users\sagex\Documents\Arduino\libraries\grbl/nuts_bolts.h:55:0: warning: "bit" redefined

 #define bit(n) (1 << n)

 ^

In file included from sketch\grblUpload.ino.cpp:1:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:123:0: note: this is the location of the previous definition

 #define bit(b) (1UL << (b))

 ^

Sketch uses 30058 bytes (93%) of program storage space. Maximum is 32256 bytes.
Global variables use 1486 bytes (72%) of dynamic memory, leaving 562 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xf2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xf2
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
a


I tried to upload example code from Arduino IDE, even blank code, but every attempt failed.

I'm trying to use this as controller for my cnc machine but can't seem to find answer to this. I'm using fresh GRBL code with no changes (from the git repo mentioned above). Is my driver wrong or what? Thanks!  :)

Link to my board:


https://www.aliexpress.com/item/4-x-A4988-Stepper-Motor-Driver-with-Heat-Sink-UNO-R3-Board-CNC-Shield-Expansion-Board/32655336905.html?spm=2114.search0104.3.8.1a207f47CHx9Y6&ws_ab_test=searchweb0_0,searchweb201602_2_10065_10068_10344_10342_10343_10340_10341_10084_10083_10618_10307_10615_10313_10059_10534_100031_10103_441_10624_442_10623_10622_10621_10620_10142,searchweb201603_28,ppcSwitch_2&algo_expid=f66e04ac-1c9d-47be-acaf-2ef910ed5b2a-1&algo_pvid=f66e04ac-1c9d-47be-acaf-2ef910ed5b2a&transAbTest=ae803_5&priceBeautifyAB=0

DrAzzy

The compiler warnings are just warnings (and appear to be no problem)

The problem is the sync error on upload. This can have a great many causes. Have you connected anything to the board? If so, remove it.

I would also try uploading with "nano" and "pro mini" selected for the board. Sometimes vendors of unofficial boards (like yours) screw up and put chips with the wrong bootloader onto the board, so it acts like one of the other '328p based boards.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

sagex98

Thanks for help, but it still doesn't work. Nothing was connected to the board so I tried changing the board types as you suggested but it still displays the same error, really don't know how to approach this problem.  :smiley-confuse:

Go Up