Friday, December 2, 2016

Using Contiki with linux CCS

Creating Contiki/CETIC based IPv6 border router solution (6LBR) with BeagleBone Black and using TI SensorTag2 with SLIP to connect 6LoWPAN mesh network is one thing. Debugging node from linux is another. Let's see how it works :)

Getting Contiki git repo and compiling web-demo for TI Sensortag in linux works quite well. Flashing it not so. Recommended way is to
transfer image to windows and flash from there, but it's possible to flash from linux commandline also. Using Code Composer Studio (CCS) makes job much easier, and you can also debug your code, at least in theory.

CCS can import project with makefile-style compiling (File -> Import -> C/C++ -> Existing Code as Makefile Project). Unfortunately it only can understand simple Makefile and Contiki uses include etc. Even when you can compile image, CCS will complain lot's of errors and warnings. It's quite bizarre situation. One way to 'fix' it, is defining things in makefiles to headers so CCS known what is actually defined when compiling. Like adding to project-conf.h:

/* for CCS as it can't detect this from Makefile.include */
#define NETSTACK_CONF_WITH_IPV6 1
/* CCS uses wrong button-sensor.h */
#ifndef BUTTON_SENSOR_VALUE_DURATION
#define BUTTON_SENSOR_VALUE_DURATION 1
#endif


Also finding source files can be a bit tricky. Adding whole contiki would be simple way so solve this but CCS don't like adding parent of project. Way around is adding links (to project) to needed subdirectories:
project -> properties -> c/c++ general -> Paths.. -> Source Location -> Link Folder
apps, cpu/cc26xx-cc13xx, core, platform/stf06-cc26xx
Also in c/c++ build -> settings you can enable gnu-versions of parsers.

You can also add Makefile.include from top, but it only makes editing easier (project -> Add Files -> Link).

Also you need to get debug-symbols to elf, so add Makefile:
CFLAGS+=-g
LDFLAGS+=-g

Nice. Now it doesn't complain and (most) code it shows is actually right one. To debug you need to create .ccxml target configuration file (project -> New).

Note that when you connected Debug DevPack to PC, it shouldn't have SensorTag2 connected to it. After board have booted (green led on) connect SensorTag2. Also when debugging first time, Debug DevPack firmware is updated to newest one.

Start debugger. Change Debug -> .ccxml -> Edit.. -> Program -> Cortex_M3_0 Project to project root and Program to .elf file. Check that run to symbol main is set. Next start of debug should then automagically load & run to main(). If it doesn't automatically load image to SensorTag2, you can choose Load & select elf.

Unfortunately good things stops there. For some reason JTAG connection to SensorTag2 seems to disconnect really often. Even dropping it's speed from 2.5MHz to 100kHz doesn't help :( This is probably due eclipse blocking and emulation package then misses something from JTAG/Debug DevPack. Hopefully future update fixes (some of) this.

Debugging active and ready to run
Jari Vanhala, Senior SW Designer, Ixonos

15 comments:

  1. is that same setting applicable for CCS in windows.
    Do i need make use of cygwin. kindly help me in this area if you know. i want to build example of contiki os for CC26XX launcpad

    ReplyDelete
  2. is there any way to compile whole contiki os in code composer studio

    ReplyDelete
  3. Sometimes the solution is easy, but cannot be seen because your focus is fixed on the symptoms or side-effects of a problem.https://iturbu.com

    ReplyDelete
  4. K Homes Realtors provides the Home Buying agents in Linden NJ for best home buying services. check out these services.

    ReplyDelete
  5. I must say that this is an excellent post, and I appreciate the details about Linux CSS. You expressly make reference to one of the issues raised during the 18 Years Scale discussion. Your arguments are so strong that I want to read more of your views. However, I'm looking for the cheap assignment writing service UK right now for a school assignment. I gain from this, and I finish my duty more swiftly. The vast material on the website is useful to all students.

    ReplyDelete
  6. As a school School Pickup and Drop Off in Dubai ovider in Dubai, we are committed to ensuring the safety, comfort, and convenience of students traveling to and from school. Our team of professional drivers are trained to adhere to strict safety protocols and are equipped with modern vehicles to ensure a smooth and hassle-free transportation experience for both students and parents.

    ReplyDelete
  7. Using Contiki with Linux CCS brings together the power of Contiki OS and the convenience of Linux CCS (Code Composer Studio) for embedded systems development. This combination offers developers a versatile and efficient platform for creating IoT applications. Whether it's building wireless sensor networks or implementing smart home solutions, leveraging Contiki with Linux CCS provides a cost-effective approach to developing reliable and scalable IoT solutions. With affordable web design services, businesses can showcase their Contiki-based IoT solutions and create visually appealing websites that effectively communicate the value and capabilities of their products or services.

    ReplyDelete
  8. You delivered clearly information for the development of embedded systems has undergone a revolution because to Contiki, an open-source operating system created for the Internet of Things (IoT). It is the perfect option for devices with limited resources because to its light weight and efficiency in terms of energy use as well as It is important to keep in mind that the cost of a power bank 10000mah price in pakistan might vary based on the brand, features, and extra capabilities. But in recent years, the price of power banks has decreased, making them more reasonable and available to a wider range of people.

    ReplyDelete
  9. When it comes to using Contiki with Linux CCS (Continuous Collection System), you can seamlessly navigate through the vast sea of possibilities. Contiki, a lightweight operating system for the Internet of Things (IoT), paired with Linux CCS, empowers developers to efficiently manage and control connected devices on a Dhow cruise in Dubai. With Contiki's robust features and Linux CCS's flexibility, you can sail smoothly through the technological waters, unlocking new horizons for IoT development while enjoying the mesmerizing Dhow cruise Dubai offers.

    ReplyDelete
  10. The quality of this post is unparalleled. To learn more about us and the services we provide, please visit: Business Loan Leads are potential borrowers seeking financing solutions for their enterprises. These leads are crucial for lenders to connect with businesses aiming to grow and meet their financial objectives. Effective lead generation strategies facilitate successful conversions, unlocking opportunities for business expansion and success.

    ReplyDelete
  11. Travellers will rejoice at the availability of global IoT SIM cards. The capacity to link IoT devices without interruption across international borders is revolutionary. These International IoT SIM card are revolutionising worldwide communication in a variety of ways, from baggage tracking to remote monitoring of machinery.

    ReplyDelete
  12. Creating a 6LBR with BeagleBone Black and TI SensorTag2 for an IPv6 border router solution is a complex task. Debugging nodes from Linux adds another challenge. Master Thesis Writing Help In US can provide valuable guidance and support for students struggling with their thesis projects.

    ReplyDelete
  13. Exciting news for our tech enthusiasts! We've been delving into the fascinating realm of Contiki integration with Linux CCS, and the journey has led us to discover the incredible potential of AA1419081-E6. This innovative module, with its cutting-edge features, has become an integral part of our exploration. Our commitment to pushing the boundaries of technology is evident in every step we take. Stay tuned for more updates as we continue to navigate the dynamic intersection of Contiki and Linux CCS.

    ReplyDelete
  14. Not so, flashing it. The recommended method is to transfer the image to Windows and flash it from there, although it is also feasible to flash from the linux command line. Using Code Composer Studio (CCS) simplifies your work and, in principle, allows you to debug your code.Thank you for sharing your knowledge! Keep up the good job! Continue to spread the word. Please take a peek at my website.
    motorcycle accident lawyer near me

    ReplyDelete
  15. Obtaining the Contiki git repository and building the web demo for the TI Sensortag on Linux is very successful. Nevertheless, flashing the device is not as simple. The preferred approach is to move the image onto Windows and flash it from there, although flashing can also be done from the Linux command line. In theory, utilizing Code Composer Studio (CCS) greatly simplifies the process and enables you to debug your code. If you are in search of high-quality screen printing services, there are excellent choices to consider.

    ReplyDelete