How to porting uC/OS-II into M16C MPU
Written by :  Ataya P
Date :
24 May 2007

Introduction
      After 3 days that I couldn't sleep. Finally ,I could porting microC OS II into m16c OAKS board successfully.It's not  too hard but still using more patient  and  use some trick to made it working.Most of functions are working fine. Anyway I still can not use of interrupt function.May be next time I will write more about  this after I could find the  point of problem.(^-^)/"


Before cooking
     Ok.First of all. We need some ingredients  for making this project work. Here is a list
 - Hardware
    PC : my  PC is desknote VIA cpu 500 MHz RAM 256MByte Window 2000 --little bit slow.
    Hardware : M16C OAKS board with LCD support board also.
- Software
   HEW  version 4.2 up with m16c C compiler and flash download program.
   

Making time
     
I  just download  porting file for M16C Renesas from uC/OS-II  official website.Anyway , Some files has been lost or not include in the zip packet.So, I download another porting file of M16C LCD project from the same website and just copy the lost file form M16C LCD project to normal M16C  project directory.(Please look at  AN-1019.pdf for more detail)

uC/OS-II file list

Pic 1 : uC/OS-II project file list

          From picture above.You need to include all files on the list.Anyway, I didn't use LCD from the original LCD porting project.So, I just include my own M16C LCD api that I made for a long time ago(Not in galaxy far far away (-_-)) into the project.
 After you prepared all files already.Just open HEW and choose new workspace.select M16C/R8 type mpu and never forget to select startup file option for USER  (because you will use your own startup file .Right ?)
          After finish generate new workspace.Open Build-> M16C Renasas Standard toolchain and Include all directory about this project into include file directory and  just click on Link tab. Select  Relocatetable file  and add your startup file in to this dialog  box.

Select User startup file
Pic 2 : Select your own startup file

            Finally,We already to compile uC/OS-II project.So,I try to compiled it.It compiled without problem but when I flashed this one on my board. ......Nothing  moving !!  After thinking about one day and night.I figured out that somethings must be wrong for startup file. So,I just copy address value from another M16C project into uC/OS-II startup file. It's working !!!(Well,not for interrupt yet.Sorry)
           I try to use Semaphore,Mailbox and Message Queue. It 's working fine but for user interrupt  it still something that I could not understand yet.May be if I have some time.I will fix this problem.Ok.Hoping you enjoy this article.See ya next time (^_^)
 

I did it !!!

File and sourcecode :
>>ucos.zip<< : uC/OS-II All source file with HEW workspace.You need to config directory again.

Useful links
uC/OS-II project
http://www.renesas.com/ for HEW and M16C datasheet
http://www.oaks-ele.com/  for data about M16C board
http://www.micrium.com/ for uC/OS-II original source



Others
This page is  Made with Nvu
All pictures are Graphics by GIMP

>> Back to home page <<
                                            


© All stuffs that appear in this website are reserved for Lemongrass-studio (Ataya P)Since 2004 AD .