aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-11-30 10:42:27 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-11-30 10:42:27 +0100
commitd16d66f990664481cb8ef6dddd038c575fe16380 (patch)
tree346667859389d0b3166d26db1c0fbe1d5489c3f2 /Makefile
parent20973d603cc80c75dab50e9a9d1ca9376c8b1cde (diff)
downloadpx4-firmware-d16d66f990664481cb8ef6dddd038c575fe16380.tar.gz
px4-firmware-d16d66f990664481cb8ef6dddd038c575fe16380.tar.bz2
px4-firmware-d16d66f990664481cb8ef6dddd038c575fe16380.zip
Enabled UART3, added JTAG make target for IO, removed potentially problematic usleep
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 801256cfe..d9469bb49 100644
--- a/Makefile
+++ b/Makefile
@@ -114,10 +114,21 @@ endif
upload: $(FIRMWARE_BUNDLE) $(UPLOADER)
@python -u $(UPLOADER) --port $(SERIAL_PORTS) $(FIRMWARE_BUNDLE)
-
+
+#
+# JTAG firmware uploading with OpenOCD
+#
+ifeq ($(JTAGCONFIG),)
+JTAGCONFIG=interface/olimex-jtag-tiny.cfg
+endif
+
upload-jtag-px4fmu:
@echo Attempting to flash PX4FMU board via JTAG
- @openocd -f interface/olimex-jtag-tiny.cfg -f ../Bootloader/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx/nuttx" -c "flash write_image erase ../Bootloader/px4fmu_bl.elf" -c "reset run" -c shutdown
+ @openocd -f $(JTAGCONFIG) -f ../Bootloader/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx/nuttx" -c "flash write_image erase ../Bootloader/px4fmu_bl.elf" -c "reset run" -c shutdown
+
+upload-jtag-px4io: all
+ @echo Attempting to flash PX4IO board via JTAG
+ @openocd -f $(JTAGCONFIG) -f ../Bootloader/stm32f1x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx/nuttx" -c "flash write_image erase ../Bootloader/px4io_bl.elf" -c "reset run" -c shutdown
#
# Hacks and fixups