I got the board up and according to Step10 I went to APPS/infinity and ran the script

./update_firmware_build_from_git.sh

it said everything's up to date. I then ran

./setup_hardware_for_linuxCNC.sh

which seems to have an issue programming the firmware into the Arduino:

pi@neptune:~/APPS/infinity $ ./setup_hardware_for_linuxCNC.sh
Upload LinuxCNC/EMC firmware...
pronterface: no process found
Probe for serial USB device...
Can't find '/dev/ttyCDC0'... Config makefile and drivers for '/dev/serial0'...
lrwxrwxrwx 1 root root 5 Mar 6 20:54 /dev/serial0 -> ttyS0
Hard reset Arduino...
CC /opt/arduino/hardware/arduino/avr/cores/arduino/wiring.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/wiring_analog.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/wiring_digital.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/wiring_pulse.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/wiring_shift.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/WInterrupts.c
CC /opt/arduino/hardware/arduino/avr/cores/arduino/hooks.c
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/WMath.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/WString.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/Print.cpp
CXX /opt/arduino/hardware/arduino/avr/libraries/SPI/src/SPI.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/Tone.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial0.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial1.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial2.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial3.cpp
CXX EmcArduino.cpp
CXX /opt/arduino/hardware/arduino/avr/cores/arduino/main.cpp
CXX applet/EMC-2-Arduino.elf
COPY applet/EMC-2-Arduino.hex

AVR Memory Usage
----------------
Device: atmega2560

Program: 14434 bytes (5.5% Full)
(.text + .data + .bootloader)

Data: 1073 bytes (13.1% Full)
(.data + .bss + .noinit)

text data bss dec hex filename
14332 102 971 15405 3c2d applet/EMC-2-Arduino.elf

/opt/arduino/hardware/tools/avr/bin/avrdude -D -C/opt/arduino/hardware/tools/avr/etc/avrdude.conf -patmega2560 -P/dev/serial0 -cwiring -b115200 -Uflash:w:applet/EMC-2-Arduino.hex:i
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

Makefile:274: recipe for target 'upload' failed
make: *** [upload] Error 1
Hard reset firmware for 10sec...
Restart firmware...
done!
RM applet/*
RMDIR applet/
pi@neptune:~/APPS/infinity $

I did look into the Arduino slot and there is a green and yellow LED lighting up.
Any idea what's going on here?

PS: In case you read this before it's properly formatted - I write this on the neptune directly and Midory doesn't like the rich text editor - will format the post shortly.

Joel's picture

These build scripts are meant to upload to club hardware,  toggle a pi gpio pin that controls the main power supply, and may not complete if there's a setup issue.

1. Insert the Arduino 2560 USB port cable to the pi3

2. Click green Check icon in upper right of Pi desktop screen to power up main board

3. If all 5 LEDS turn green, than the power supply is ready

  If there is still only 1 green LED on main power-on, there was a power fault requiring shutting down the OS and unplugging the power cord for 1 minute to reset the over-current protection.  Sometimes you can just hit the stop-sign icon to power down, and bring it back on 10 seconds later... but not all power supplies are the same.

  If a few LEDs are off, than a fuse may be blown or some plugs need cleaned/re-seated.

4. With all 5 Green LEDs on, than open a terminal and type:

ls -l  /dev/tty*

lsusb

This will tell you if you are running a board with a CH340 or FTDI chip, and you should see one of several serial ports listed.

Examples:

/dev/ttyUSB0

/dev/ttyCDC0

/dev/ttyACM0

5. To discover which files need the serial port string updated:

grep -lir '/dev/tty' /home/pi/linuxcnc/

grep -lir '/dev/tty' /home/pi/APPS/infinity/

6. And use nano or scite to edit the variable for your platform.

Current rc1 scripts should automate this upload port selection, and it shouldn't need this manual editing anymore. However, there are probably some edge cases we missed.

I would try powering on just using the 12v1 bus first, than try the full-power setup ;-)

Note, there is also a main always-power-on override jumper next to the 24-pin plug. However, you should certainly ensure an e-stop switch is installed first. :-)

 

Works exactly as advertised (the USB cable being the secret sauce - I should've known).

Also, this is a really great writeup - I think new users would benefit if you copy it to the Step10 instructions (or if you've already written it up somewhere else add a link to it). No further cleanup required - it's great as is!

Thanks again - I'm off to making cables for the steppers :)
Markus

PS: I tried formatting on a different computer but editing plain text posts removes all formatting - which makes it even worse.