Add the sniff make target

We can now run make sniff and this will provide correct command line arguments for all supported devices.
This commit is contained in:
George Oikonomou 2016-12-04 18:51:57 +00:00
parent 44edc187bc
commit 7ef5902c3d

View file

@ -23,3 +23,23 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../..
include $(CONTIKI)/Makefile.include
PYTHON ?= python
SENSNIFF = $(CONTIKI)/tools/sensniff/sensniff.py
ifeq ($(BAUDRATE),)
BAUDRATE = 460800
endif
SENSNIFF_FLAGS += -b $(BAUDRATE)
ifneq ($(PORT),)
SENSNIFF_FLAGS += -d $(PORT)
endif
sniff:
ifeq ($(wildcard $(SENSNIFF)), )
$(error Could not find the sensniff script. Did you run 'git submodule update --init' ?")
else
$(PYTHON) $(SENSNIFF) $(SENSNIFF_FLAGS)
endif