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
This commit is contained in:
Eugene Agafonov 2014-12-03 23:49:23 +03:00 committed by Andrew Tridgell
parent d4daf19151
commit dd22b19ddd
2 changed files with 12 additions and 0 deletions

View File

@ -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 Normal file
View File

@ -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