This week I am working on dummy contiki OS to be compile using RISC V compiler. During compilation, there are a lot errors prone. Most of the errors happened during typo occur in the code, such as #if but without #endif, without semicolon in the ending code and so on. Besides that, there are quite interesting error occur, which is variable conflict happen during compilation RISC V on contiki system. This error occur due to both RISC V and contiki core system are exactly using two same variable name but in different type of declaration. Compiler is unable to identify the variable manner. So, I have to decide which type of declaration is more suitable to the code and make slightly changes to the contiki core code. After trying hard to solve errors using trial and error method, finally my dummy contiki OS is successful compiled by using RISC V compiler.

In this project, we are require to develop a system running in 32 bits. So that, the compiler flag and linker flag are played important role on this declaration. An -march=RV32I flag is added to the compiler and linker to specify it compile in 32 bits. The elf file I first obtained are in strip manner. The stripped elf file is hard to be analyse for the beginner like me. So, Dr Shawn help me to disable the strip function. The elf file be stripped because “-s” is stated in the linker flag. It used to remove all symbol table and relocation information on the executable.

On following week, I have to one by one adding the function into my dummy contiki OS. To make sure my function is correct in manner. Objdump is apply on the generated elf file to view the executable in assembly form. It is used to make sure my testing project event able to run in my contiki OS.


0 Comments

Leave a Reply

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