From 319221ee235bf01674eb014a9dcb0a062acf48d3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 11 Dec 2017 17:28:59 -0500 Subject: [PATCH] docs: Provide additional information on "make flash" failures Add some additional information on "make flash" problems. Signed-off-by: Kevin O'Connor --- config/generic-melzi.cfg | 4 +++- docs/FAQ.md | 23 +++++++++++++++++++++++ src/avr/Makefile | 2 +- src/sam3x8e/Makefile | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/config/generic-melzi.cfg b/config/generic-melzi.cfg index 449f966d..ea5521c4 100644 --- a/config/generic-melzi.cfg +++ b/config/generic-melzi.cfg @@ -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. diff --git a/docs/FAQ.md b/docs/FAQ.md index 6fb69b1e..76307d96 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -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) diff --git a/src/avr/Makefile b/src/avr/Makefile index 364d53f8..651b90ac 100644 --- a/src/avr/Makefile +++ b/src/avr/Makefile @@ -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" diff --git a/src/sam3x8e/Makefile b/src/sam3x8e/Makefile index 5cf805e8..fb42fc61 100644 --- a/src/sam3x8e/Makefile +++ b/src/sam3x8e/Makefile @@ -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