Skip to content

Getting Started with Zolertia products

amejias edited this page Dec 10, 2018 · 6 revisions

Quickstart Guide

Here it is what you need to get started:

Hardware

  • At least 2 RE-Mote platforms or similar (Firefly, etc.) Check out the Platform page for more information on available platforms, and of course, check out Zolertia Store for products and offers.

  • One or two Micro USB cables

Firmware

Linux

#Install the toolchain

zolertia@vm:~$ sudo apt-get update
zolertia@vm:~$ sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi

Note: In Ubuntu 18.x gdb-arm-none-eabi could not be avaliable. Instead of this, install gdb-multiarch. But we do not recommend this distribution for our products (at moment last stable version was 16.04).

Clone Contiki repository

http://i.imgur.com/KEybBBs.jpg

  • First Step: Clone the repository.
zolertia@vm:~/Desktop$ git clone https://github.com/contiki-os/contiki.git ContikiOS
  • Second Step: Update the repository with dependencies
zolertia@vm:~/Desktop$ cd ContikiOS
zolertia@vm:~/Desktop/ContikiOS$ git submodule update --init

Note:

zolertia@vm:~/Desktop/ContikiOS$ cd examples/zolertia/zoul/

zolertia@vm:~/Desktop/ContikiOS/examples/zolertia/zoul$ make TARGET=zoul BOARD=remote-revb zoul-demo.upload && ../../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
  CC        ../../../cpu/cc2538/./ieee-addr.c
  CC        ../../../cpu/cc2538/cc2538.lds
  CC        ../../../cpu/cc2538/./startup-gcc.c
  CC        ../../../platform/zoul/dev/tsl256x.c
  .
  .
  .
  CC        ../../../dev/cc1200/cc1200.c
  CC        zoul-demo.c
  LD        zoul-demo.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff zoul-demo.elf zoul-demo.bin
Flashing /dev/ttyUSB0
Opening port /dev/ttyUSB0, baud 460800
Reading data from zoul-demo.bin
Firmware file: Raw Binary
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 00:12:4B:00:09:DF:2C:32
Erasing 524288 bytes starting at address 0x00200000
    Erase done
Writing 516096 bytes starting at address 0x00202000
Write 8 bytes at 0x0027FFF8F00
    Write done                                
Verifying by comparing CRC32 calculations.
    Verified (match: 0x8be9dab7)
rm obj_zoul/startup-gcc.o zoul-demo.co

Contiki-3.x-3209-g99402348e
Zolertia RE-Mote revision B platform
CC2538: ID: 0xb964, rev.: PG2.0, Flash: 512 KiB, SRAM: 32 KiB, AES/SHA: 1, ECC/RSA: 1
System clock: 16000000 Hz
I/O clock: 16000000 Hz
Reset cause: External reset
Rime configured with address 2c:32
 Net: Rime
 MAC: CSMA
 RDC: nullrdc
Zoul test application
-----------------------------------------
Counter = 0x00000000
VDD = 3047 mV
Temperature = 24524 mC
ADC1 = 3632 raw
ADC3 = 3608 raw
Button pressed
...and released!
Button pressed
...and released!

Change between interfaces

Now we want to change the communication interface in the same program, automatically the predefined interface is 2.4GHz and now to reach a greater distance we need change to SUB-GHz. For do this only we just have to add the next lines in project-conf.h located in project's folder.

#undef  NETSTACK_CONF_RADIO
#define NETSTACK_CONF_RADIO         cc1200_driver
#define CC1200_CONF_USE_GPIO2       0
#define CC1200_CONF_USE_RX_WATCHDOG 0
#define ANTENNA_SW_SELECT_DEF_CONF  ANTENNA_SW_SELECT_SUBGHZ

And make sure that in Makefile is defined. DEFINES+=PROJECT_CONF_H=\"project-conf.h\"

The next step is clean the last compilation like this:

zolertia@vm:~/Desktop/ContikiOS/examples/zolertia/zoul$ make clean
using saved target 'zoul'
rm -f *~ *core core *.srec \
	*.lst *.map \
	*.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \
	*.ce *.co
rm -rf *.zoul symbols.c symbols.h *.d *.elf *.hex
rm -rf obj_zoul

And going to Third step for burning the new binary.

Looking for more projects and examples?

Community projects in Hackster

I'm done with the basics, now onto something more

Clone this wiki locally