docs: Provide additional information on "make flash" failures

Add some additional information on "make flash" problems.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-12-11 17:28:59 -05:00
parent 4a5801bb2e
commit 319221ee23
4 changed files with 28 additions and 3 deletions

View File

@ -4,7 +4,9 @@
# Note that the "make flash" command does not work with Melzi
# boards. The boards are typically flashed with this command:
# avrdude -p atmega1284p -c avrisp -P /dev/ttyUSB0 -U flash:w:out/klipper.elf.hex
# avrdude -p atmega1284p -c avrisp -P /dev/ttyUSB0 -U out/klipper.elf.hex
# or on some boards with:
# avrdude -p atmega1284p -c arduino -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See the example.cfg file for a description of available parameters.

View File

@ -29,6 +29,29 @@ serial: /dev/serial/by-id/usb-UltiMachine__ultimachine.com__RAMBo_12345678912345
Be sure to copy-and-paste the name from the "ls" command above as the
name will be different on each printer.
### The "make flash" command doesn't work.
The code attempts to flash the device using the most common method for
each platform. Unfortunately, there is a lot of variance in flashing
methods, so the "make flash" command may not work on all boards.
If you're having an intermittent failure or you do have a standard
setup, then double check that Klipper isn't running when flashing
(sudo service klipper stop), make sure Octoprint isn't trying to
connect directly to the device (open the Connection tab in the web
page and click Disconnect if the Serial Port is set to the device),
and make sure FLASH_DEVICE is set correctly for your board (see the
[question above](#when-i-restart-my-micro-controller-the-device-changes-to-devttyacm1)).
However, if "make flash" just doesn't work for your board, then you
will need to manually flash. See if there is a config file in the
[config directory](../config) with specific instructions for flashing
the device. Also, check the board manufacturer's documentation to see
if it describes how to flash the device. Finally, on AVR devices, it
may be possible to manually flash the device using
[avrdude](http://www.nongnu.org/avrdude/) with custom command-line
parameters - see the avrdude documentation for further information.
### Can I run Klipper on something other than a Raspberry Pi?
Klipper only requires Python running on a Linux (or similar)

View File

@ -24,6 +24,6 @@ $(OUT)klipper.elf.hex: $(OUT)klipper.elf
$(Q)$(OBJCOPY) -j .text -j .data -O ihex $< $@
flash: $(OUT)klipper.elf.hex
@echo " Flashing $(FLASH_DEVICE) via avrdude"
@echo " Flashing $^ to $(FLASH_DEVICE) via avrdude"
$(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi
$(Q)avrdude -p$(CONFIG_MCU) -cwiring -P"$(FLASH_DEVICE)" -D -U"flash:w:$(OUT)klipper.elf.hex:i"

View File

@ -30,6 +30,6 @@ $(OUT)klipper.bin: $(OUT)klipper.elf
$(Q)$(OBJCOPY) -O binary $< $@
flash: $(OUT)klipper.bin
@echo " Flashing $(FLASH_DEVICE) via bossac"
@echo " Flashing $^ to $(FLASH_DEVICE) via bossac"
$(Q)stty -F "$(FLASH_DEVICE)" 1200
$(Q)bossac -i -p "$(FLASH_DEVICE:/dev/%=%)" -R -e -w -v -b $(OUT)klipper.bin