############ Installation ############ To be able to run TAISC on your sensor device several steps need to be taken. ******** Hardware ******** For now following (sensor) devices are supported: ================== ================ ============ **Device** **Radio** **CPU** ================== ================ ============ RM090 cc2520 MSP430f5437 Zolertia RE-Mote cc2538 (2.4Ghz) ARM Cortex-M3 system on chip (SoC) SDR Custom PHY ARM Cortex-A9 ================== ================ ============ For each of these devices, make sure to install the correct compiler: * MSP430f537 compiler .. code-block:: bash jan@DellJanWerk:~$ msp430-gcc -v gcc version 4.7.0 20120322 (mspgcc dev 20120911) (GCC) * ARM Cortex-M3 compiler .. code-block:: bash jan@DellJanWerk:~$ arm-none-eabi-gcc -v gcc version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (GNU Tools for ARM Embedded Processors 6-2017-q1-update) * ARM Cortex-A9 compiler: Install the latest Xilinx SDK .. code-block:: bash jan@DellJanWerk:~$ ./arm-none-eabi-gcc -v gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ******** Software ******** To be able to compile the TAISC object files, following packages have been installed correctly: .. code-block:: bash sudo apt-get install python3-pip sudo apt-get install tinyos-tools sudo pip install crc16 TAISC makes use of sealang, which is an extension of the libclang python package. "The C Interface to Clang provides a relatively small API that exposes facilities for parsing source code into an abstract syntax tree (AST), loading already-parsed ASTs, traversing the AST, associating physical source locations with elements within the AST, and other facilities that support Clang-based development tools. This C interface to Clang will never provide all of the information representation stored in Clang's C++ AST, nor should it: the intent is to maintain an API that is relatively stable from one release to the next, providing only the basic functionality needed to support development tools." To install sealang please execute the following instructions: .. code-block:: bash # 1. Install libclang-3.6: sudo apt-get install libclang-3.6 clang-3.6 -y sudo apt-get install zlib1g-dev libncurses5-dev -y # 3. Set environmentals by either: # 3.a. execute following commands: export LLVM_HOME=/usr/lib/llvm-3.6 export LD_LIBRARY_PATH=$LLVM_HOME/lib # 3.b. adding following lines to /etc/environment (need to be sudo) LLVM_HOME=/usr/lib/llvm-3.6 LD_LIBRARY_PATH=/usr/lib/llvm-3.6/lib # 3.c. adding following lines to $HOME/.bashrc export LLVM_HOME=/usr/lib/llvm-3.6 export LD_LIBRARY_PATH=$LLVM_HOME/lib # 4. Install sealang: pip3 install sealang To verify the installation, compare the output of following command: .. code-block:: bash jan@DellJanWerk:~$ dpkg -l | grep clang ii clang 1:3.8-33ubuntu3.1 amd64 C, C++ and Objective-C compiler (LLVM based) ii clang-3.6 1:3.6.2-3ubuntu2 amd64 C, C++ and Objective-C compiler (LLVM based) ii libclang-3.6-dev 1:3.6.2-3ubuntu2 amd64 clang library - Development package ii libclang-common-3.6-dev 1:3.6.2-3ubuntu2 amd64 clang library - Common development package ii libclang1-3.6:amd64 1:3.6.2-3ubuntu2 amd64 C interface to the clang library These steps should suffice to compile TAISC MAC protocols. ********* Debugging ********* The debugging of MAC protocols is not a straight forward process, since it is hard to know what is exactly happening (and what might be going wrong). It is possible to dump text to the serial output and print it out, but in most cases this is not helpful for debugging time-critical processes since no timings are available. For this purpose the Logic Analyser (LA) is used, which can capture digital (and analog) outputs from the wireless device together with nano-second level accurate timestamps. .. figure:: ../Images/logic_analyser.jpg :scale: 50% A logic analyser connected to a Zolertia ReMote From TAISC (and/or other modules), pins can be set and cleared when certain events occur. It is also possible (via software SPI) to efficiently capture data on the LA. For ease of use, an interface has been provided which makes it easier to toggle pins on the device. To make use of this interface, following steps need to be taken: #. Connect the LA cables onto the device. If you make use of a Logic Pro 16, make sure that per cluster of cables at least one ground is connected. For instructions on how to connect the device, please refer to: * **Zolertia ReMote revision a**: platform/zoul/remote-reva/Platform_go2LA.h * **Zolertia ReMote revision b**: platform/zoul/remote-revb/Platform_go2LA.h * **Xilinx Zedboard (sdr)**:platform/sdr/Platform_go2LA.h * **RM090**: platform/rm090/Platform_go2LA.h #. Enable the LA in the Makefile: .. code-block:: make # This will enable the toggling of pins: LA_DEBUG=1 # This will enable fot TAISC to print out instruction id’s over SPI: LA_DEBUG_TAISC_WITH_COMMAND_IDS=1