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:
parent
44edc187bc
commit
7ef5902c3d
|
@ -23,3 +23,23 @@ all: $(CONTIKI_PROJECT)
|
||||||
|
|
||||||
CONTIKI = ../..
|
CONTIKI = ../..
|
||||||
include $(CONTIKI)/Makefile.include
|
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
|
||||||
|
|
Loading…
Reference in a new issue