This week I having more explore on Contiki OS. Dr. Shawn explained on our processor architecture which gave me clearer picture what I need to do my project. Besides that, he also explained on the concept of RTOS system.

The first two days, I trying to run a “Hello world” program in Contiki OS using AVR cpu. In the build process of “Hello world”, I had more understand on Contiki programming style. Which is I need to declare when the program begin and when to program end which are a little bit different from normal programming. Other than that, the simple “Hello world” program are depend on the cpu and platform used to build a Contiki system program. My project is to work on these two files for porting our processor to Contiki OS.

In cpu file there are clock, interrupt, rtimer, watchdog, processor start up code and makefile need to be build to for porting a processor to Contiki OS. Whereby in platform file, there are contiki-main file, few types of drivers file and makefile need to be build.

 

clock: This is to implement the contiki clock system to our processor

rtimer: Is used for timing the critical feature

start up code: Initialize coding for processor.

makefile: Used during compilation for complex system.

contiki-main: Handle sleeping or start process of a system.

driver file: The hardware such as LED or UART driver code is in the platform file.

 

After that, I used AVR cpu and platform as a reference for my project. Now I facing problem by using AVR file as a reference because it used avr-gcc for compilation. But for our system I require to used RISC V to compile. There are conflicts occur during compilation.

In addition, I also learning how to use makefile for compilation. There are few rules need to be obey when writing a makefile. Besides that, there are also symbols are I am not familiar too, such as $@ and $<. There are a lot simple makefile tutorials in internet but by refer to the AVR file’s makefile I feel that is a bit complex. So I feel a bit difficulty while modify on it at the beginning. This week I also learnt the correct method to using gitflow.

Next week, I need to make sure my cpu and platform able to compile completely by using RISC V compiler.

 


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.