Browse Source

mk: add 'upload' target to copy fresh ELF to Linux board using SCP

`make pxf upload` builds ELF and copy it to target
device using scp.

Target hostname should be specified in BOARD_LINUX_HOST variable
master
Eugene Agafonov 10 years ago committed by Andrew Tridgell
parent
commit
dd22b19ddd
  1. 1
      mk/board_linux.mk
  2. 11
      mk/upload_firmware.mk

1
mk/board_linux.mk

@ -5,3 +5,4 @@ include $(MK_DIR)/find_tools.mk @@ -5,3 +5,4 @@ include $(MK_DIR)/find_tools.mk
# Linux build is just the same as SITL for now
LIBS = -lm -lpthread -lrt
include $(MK_DIR)/board_native.mk
include $(MK_DIR)/upload_firmware.mk

11
mk/upload_firmware.mk

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
ifneq ($(BOARD_LINUX_HOST),)
upload: $(SKETCHELF).timestamp-upload
$(SKETCHELF).timestamp-upload: $(SKETCHELF)
scp $(SKETCHELF) $(BOARD_LINUX_HOST):
touch $@
else
upload:
@echo Check your config.mk: BOARD_LINUX_HOST should be defined to upload firmware
exit 1
endif
Loading…
Cancel
Save