Skip to content

Commit 2250790

Browse files
Merge pull request #33 from abhijit-mahajani-imgtec/add_channel_pan_id
Add channel and pan_id
2 parents 6392de9 + 75955d2 commit 2250790

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

platform/mikro-e/Makefile.mikro-e

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
4949
ifdef NODE_ID
5050
CFLAGS += -DNODE_ID=${NODE_ID}
5151
endif
52+
53+
CHANNEL?=26
54+
PAN_ID?=0xabcd
55+
CFLAGS += -DRF_CHANNEL=$(CHANNEL)
56+
CFLAGS += -DIEEE802154_CONF_PANID=$(PAN_ID)
57+
5258
include $(CONTIKI)/cpu/pic32/Makefile.pic32

platform/mikro-e/Readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ environment variables and compile an example, say "Hello World" which is include
3434

3535
$ export PATH=$PATH:/opt/microchip/xc32/v1.34/bin/
3636

37-
Platform mikro-e makefile has been updated to build either for cc2520 or for ca8210 depending the build option USE_CC2520 or USE_CA8210. The application e.g. Hello World can be built for Mikro-E Clicker and HEX file can be generated to flash on the board as per below:
37+
Platform mikro-e makefile has been updated to build either for cc2520 or for ca8210 depending the build option USE_CC2520 or USE_CA8210. 6lowpan channel(default 26) and pan_id(default 0xabcd) can be passed from makefile options. For debugging purposes, UART3 will be used by default, but USE_SERIAL_PADS can be selected for UART2.The application e.g. Hello World can be built for Mikro-E Clicker and HEX file can be generated to flash on the board along with possible build options as per below:
3838

3939
For clicker boards using CA8210:
4040

4141
$ cd examples/hello-world
42-
$ make TARGET=mikro-e USE_CA8210=1
42+
$ make TARGET=mikro-e USE_CA8210=1 CHANNEL=26 PAN_ID=0xabcd USE_SERIAL_PADS=1
4343
$ /opt/microchip/xc32/v1.34/bin/xc32-bin2hex hello-world.mikro-e
4444

4545
For clicker boards using CC2520:
4646

4747
$ cd examples/hello-world
48-
$ make TARGET=mikro-e USE_CC2520=1
48+
$ make TARGET=mikro-e USE_CC2520=1 CHANNEL=26 PAN_ID=0abcd USE_SERIAL_PADS=1
4949
$ /opt/microchip/xc32/v1.34/bin/xc32-bin2hex hello-world.mikro-e

0 commit comments

Comments
 (0)