Welcome to Our Community

Some features disabled for guests. Register Today.

GRBL v1.1 on xPRO v2

Discussion in 'Controller Boards' started by davidnhutch, Mar 25, 2020.

  1. davidnhutch

    Builder

    Joined:
    Nov 13, 2014
    Messages:
    3
    Likes Received:
    0
    Hi,

    I can flash GRBL 0.9 to my xPRO just fine. In fact it has had that on it for 2-3 years, and flashing it again works fine. Now I want to try to use OpenbuildsCONTROL. That software tells me I have to use GRBL 1.1x.

    So I downloaded 1.1 and spent the next 6 hours of my life dealing with obscure error messages, and trying a huge number of things. Flashing the hex directly, compiling and flashing GRBL 1.1 in Arduino software, and trying various combinations of parameters. I have come across so many different nondescript error messages I don't know which ones to start posting. Then I go back to flashing 0.9 and it works fine again.

    But let me first ask -- should this work? Is xPRO v2 even compatible with GRBL1.1? If it's not I can give up. If it is, I will post some more info about what error messages I'm getting and what I've tried.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    1,717
    Likes Received:
    932
    this should be much easier....

    backup your GRBL settings (all the stuff you see when you give as $$ command)

    in OpenBuilds CONTROL
    click 'wizards and tools'
    select 'flashing tool'
    select the correct options (like selecting xpro board)
    click 'Flash'

    after that you can use the 'grbl settings ' tab to fine tune it for your machine.

    you may need to restore some of the settings that you backed up.
     
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    5,411
    Likes Received:
    1,830
    Just a NB note/warning, the "Spark Concepts xPro v3/4" settings in CONTROL refers to V3 and V4 boards that has the ATMEGA328PB-PU chip (note B next to P).

    Some/most of the V2s had ATMEGA328P-PU (note no B in there) if I recall correctly...

    Picking the wrong chip can brick it (and is also probably where your obscure errors come from. Some V2s had the PB, some had the P only. Arduino expects the P only chip (therefore the errors)

    If its a PB you can try the flashing tool in CONTROL (its printed on the chip on the board, check and compare) but do note the weird choice of chip (everyone uses the Atmega328p, not sure why the xPros has Atmega328pb's instead) can lead to some of them being wiped complete (refer this thread xPro Bootloader corrupt. How to reflash? Keywords: atmega328pb vs atmega328p, usbtiny, Arduino to see how badly it can go) so be aware of the risks. If you wipe the bootloader you either throw the board away, or invest in an ISP programmer and learn the skills to bootload an ATMega again. Don't tell me we didn't warn you, using CONTROL to flash it is entirely at your own risk here, the tool was not tested on any V2 boards.

    The V2 is quite old though, consider upgrading? docs.openbuilds.com/blackbox (;
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    1,717
    Likes Received:
    932
    eish
     
    Giarc and Peter Van Der Walt like this.
  5. davidnhutch

    Builder

    Joined:
    Nov 13, 2014
    Messages:
    3
    Likes Received:
    0
    Thanks! Super useful info. Admittedly it is "old" but fully capable and I'd really like to avoid a relatively large purchase for a new

    Turns out I have "P" not "PB". This is printed on the microcontroller: "Atmel MEGA328P Au 1419"

    So I tried OpenbuildsCONTROL > Flashing tool. I chose Spark Concepts v3/v4 (it doesn't have a v2 option) and chose the correct COM port, and it tries to flash. The tx/rx lights flicker for 10 seconds, then it says "Flashing failed!"

    No matter, I can use this v0.9 hex file and flash back to v0.9 by using this command:
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -CC:"\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\<username>\Downloads\grbl_v0_9i_atmega328p_16mhz_115200.hex:i

    So, I do have a working 0.9 right now, but I am still unable to get 1.1 working. Perhaps my hardware is fundamentally incompatible?

    Here is what else I've tried:
    1) Download official GRBL1.1. Open Arduino Software. Tools > Include Library > grbl ... etc. ie follow the steps at this link. Compile and upload.
    2) Download the 1.1 hex file from Spark Concept's / xPRO's site on SourceForge. Flash using xLoader (just says failed).
    3) Download the 1.1 hex file from the same place as #2. Flash using a similar command line to the one I pasted above for my working 0.9 version. It says what I've pasted below under the "==". Note the communication failure at the end, which always occurs when it is 87% written as shown by the bar graph there.
    4) Repeat 2 and 3 but instead use the 1.1h hex files from the official grbl github site.
    5) Repeat the above several times...

    Anything else I could try?

    ==
    C:\WINDOWS\system32>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -CC:"\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\DAVIDN~1\Downloads\GRBL-1f_DefaultV3B.hex:i
    avrdude: Version 6.3-20190619
    Copyright (c) 2000-2005 Brian Dean, BDMICRO Microcontrollers, Relays, Optocouplers, and IoT
    Copyright (c) 2007-2014 Joerg Wunsch
    System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
    Using Port : COM4
    Using Programmer : arduino
    Overriding Baud Rate : 115200
    AVR Part : ATmega328P
    Chip Erase delay : 9000 us
    PAGEL : PD7
    BS2 : PC2
    RESET disposition : dedicated
    RETRY pulse : SCK
    serial program mode : yes
    parallel program mode : yes
    Timeout : 200
    StabDelay : 100
    CmdexeDelay : 25
    SyncLoops : 32
    ByteDelay : 0
    PollIndex : 3
    PollValue : 0x53
    Memory Detail :
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
    flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
    lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
    lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
    calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
    signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
    Programmer Type : Arduino
    Description : Arduino
    Hardware Version: 3
    Firmware Version: 3.3
    Vtarget : 0.3 V
    Varef : 0.3 V
    Oscillator : 28.800 kHz
    SCK period : 3.3 us
    avrdude: AVR device initialized and ready to accept instructions
    Reading | ################################################## | 100% 0.07s
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: safemode: lfuse reads as 0
    avrdude: safemode: hfuse reads as 0
    avrdude: safemode: efuse reads as 0
    avrdude: reading input file "C:\Users\DAVIDN~1\Downloads\GRBL-1f_DefaultV3B.hex"
    avrdude: writing flash (32768 bytes):
    Writing | ############################################ | 87% 12.06s
    avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x00
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_cmd(): programmer is out of sync
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_recv(): programmer is not responding

     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    5,411
    Likes Received:
    1,830
    Which is for the ATMega328PB (; ie not for you (;

    You might have to play with bootloader type selections and baud rates (it might not have standard Uno bootloader, maybe something like Optiloader. Contact Mike at SparkConcepts and ask him for advice, he'll know better whats on there, I know he even gladly flashed it for people if they send it in
     
  7. Bill_z

    Bill_z New
    Builder

    Joined:
    Mar 29, 2017
    Messages:
    2
    Likes Received:
    0
    Don't believe Xloader...

    Even though Xloader say's the upload failed, if the tx/rx lines are flashing for ~10 seconds, chances are it's programming just fine... (to prove my point, see the images below - using Xloader & 'GRBL-1f_DefaultV3B.hex'; Xloader says the upload failed, however I verified the upload using an Atmel mkii ISP and using AtmelStudio (in the Device Programming window, clicking "Verify" under "Flash (32KB)", you can see that the flash verified just fine)...

    GRBL_1f is larger than GRBL_v9 so it appears the boot-loader is being prevented from overwriting itself, by the fuse settings. The bootloader and avrdude are not aware of the X-Pro's fuse settings, so you get an error - Again chances are it's programming just fine


    Note: 'P' or 'PB' is irrelivant. ATmega328PB (the 'B' designation) was released in 2015/2016 and added a few new peripherals which are NOT currently utilized with GRBL 1.1... Regardless GRBL 1.1 code for the 'P' devices will work in the 'PB' devices without changing existing configuration or enabling new functions.

    upload_2020-3-26_15-1-21.png upload_2020-3-26_15-36-52.png
     
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    5,411
    Likes Received:
    1,830
    Except for several known instances where people tried using xLoader against it and in the process wiped the bootloader. No issue for us with ISP's lying around, but a smash for a regular user.
    And of course the standard Grbl instructions doesn't work because the PB has a different signature, so the Arduino/Avrdude instructions does not work either.
    So while, yes, works fine, it does impact users because of the obscurity aspect

    That said, as mentioned above, this user doesn't have to worry about that, he has the Non-B chip, so its just a matter of figuring out which bootloader (if installed, could have been flashed with ISP too)
     
  9. Spark Concepts

    Spark Concepts Well-Known
    Builder

    Joined:
    Dec 17, 2013
    Messages:
    128
    Likes Received:
    97
    Hi David - sorry to hear there are troubles, the V2 is compatible with GBRL 1.1f. With the large files size for 1.1f xLoader isnt a great choice as it throws errors and occasionally messes with the bootloader. Recommended instructions are here - How to Reflash GRBL to the CNC xPRO. It sounds like you have tried all of this and still having issues so I will reply to your email and we will get a repair setup.

    It should be noted, the link above (along with the official GRBL instructions) will work for both the 328P and 328PB flavors if you select Arduino Uno as the board type. The B is just the newest version of the 328P and adds some extras for those folks not using GRBL.
     
    Peter Van Der Walt likes this.
  10. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Project Maker Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    5,411
    Likes Received:
    1,830
    I can validate it does not, different chip signature makes avrdude say stop :)
    You need extra hoops to add ATMega328PB boards.txt entry first
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice