forked from Archive/PX4-Autopilot
This commit is contained in:
parent
705172d302
commit
c9f27cbdc9
6
Makefile
6
Makefile
|
@ -114,6 +114,10 @@ endif
|
||||||
|
|
||||||
upload: $(FIRMWARE_BUNDLE) $(UPLOADER)
|
upload: $(FIRMWARE_BUNDLE) $(UPLOADER)
|
||||||
@python -u $(UPLOADER) --port $(SERIAL_PORTS) $(FIRMWARE_BUNDLE)
|
@python -u $(UPLOADER) --port $(SERIAL_PORTS) $(FIRMWARE_BUNDLE)
|
||||||
|
|
||||||
|
upload-jtag-px4fmu:
|
||||||
|
@echo Attempting to flash PX4FMU board via JTAG
|
||||||
|
@openocd -f interface/olimex-jtag-tiny.cfg -f Tools/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
|
||||||
|
|
||||||
#
|
#
|
||||||
# Hacks and fixups
|
# Hacks and fixups
|
||||||
|
@ -129,7 +133,7 @@ endif
|
||||||
# a complete re-compilation, 'distclean' should remove everything
|
# a complete re-compilation, 'distclean' should remove everything
|
||||||
# that's generated leaving only files that are in source control.
|
# that's generated leaving only files that are in source control.
|
||||||
#
|
#
|
||||||
.PHONY: clean
|
.PHONY: clean upload-jtag-px4fmu
|
||||||
clean:
|
clean:
|
||||||
@make -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
@make -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||||
@make -C $(ROMFS_SRC) -r $(MQUIET) clean
|
@make -C $(ROMFS_SRC) -r $(MQUIET) clean
|
||||||
|
|
|
@ -263,8 +263,8 @@ class uploader(object):
|
||||||
print("program...")
|
print("program...")
|
||||||
self.__program(fw)
|
self.__program(fw)
|
||||||
|
|
||||||
print("verify...")
|
#print("verify...")
|
||||||
self.__verify(fw)
|
#self.__verify(fw)
|
||||||
|
|
||||||
print("done, rebooting.")
|
print("done, rebooting.")
|
||||||
self.__reboot()
|
self.__reboot()
|
||||||
|
@ -290,18 +290,7 @@ while True:
|
||||||
|
|
||||||
# create an uploader attached to the port
|
# create an uploader attached to the port
|
||||||
try:
|
try:
|
||||||
if "linux" in _platform:
|
up = uploader("\\\\.\\COM2", args.baud)
|
||||||
# Linux, don't open Mac OS and Win ports
|
|
||||||
if not "COM" in port and not "tty.usb" in port:
|
|
||||||
up = uploader(port, args.baud)
|
|
||||||
elif "darwin" in _platform:
|
|
||||||
# OS X, don't open Windows and Linux ports
|
|
||||||
if not "COM" in port and not "ACM" in port:
|
|
||||||
up = uploader(port, args.baud)
|
|
||||||
elif "win" in _platform:
|
|
||||||
# Windows, don't open POSIX ports
|
|
||||||
if not "/" in port:
|
|
||||||
up = uploader(port, args.baud)
|
|
||||||
except:
|
except:
|
||||||
# open failed, rate-limit our attempts
|
# open failed, rate-limit our attempts
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
|
|
Loading…
Reference in New Issue