MC68HC908JL16 - porting to ucos2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC68HC908JL16 - porting to ucos2

1,991 Views
popup
Contributor I
Hi,
 
My project needs to run on a operating system, as HC908 is a 8-bit uc, I choose the ucos2.
 
The 908JL16 uc has 16K flash-rom and 512B ram. Will this meet the least requirment for ucos2?
 
I downloaded the ucos2 source file from http://<removed>and now I need to modify the souce file to port it to JL16 uc.
 
I am now confusing how can I work this out, I mean which file needs to be modified and how?
 
 
--
Alban removed wrong link.


Message Edited by Alban on 2007-05-23 03:42 PM
Labels (1)
0 Kudos
5 Replies

463 Views
peg
Senior Contributor IV
Hi,
 
The above link seems to be wrong. I get a link page and a popup for topless Brittany Spears.
 
0 Kudos

463 Views
popup
Contributor I
Hi, peg
 
The URL should be  http://www.ucos-ii.com and it appears to be unreachable now.
I upload the file downloaded from this site, it is porting to freescale 908GP32 using CW complier.
I want to know how to modify the code to port it to JL16 or other 908mcu.
 
 
I use CW5.1.
 
0 Kudos

463 Views
rocco
Senior Contributor II
Hi, Popup:

I took a quick look at the code, and there is no reason that it couldn't work on the JL16:

The version that you want to use was written for the GP32, and you have the same amount of ram within the JL16.

The size of the .s19 file is only 2k, so it should fit with your application in the 16k of flash within the JL16.

The OS only uses only one of the JL16's two timers, so there is one left for your application. Also, it appears like the OS does not use the timer pins or channels, only the overflow (but I did not look close enough to be sure).
As for porting to the JL16, you could start by taking the file "IOGP32.H" and create an "IOJL16.H" from it. This is where all of the hardware address definitions are handled. You would then change the project to include your new .h file in place of the GP32 version.

If you are lucky, that is all that needs to be done. I believe the timers are identical between the GP32 and JL16 (but I could be wrong), so the timer code might not need to change.

HTH
0 Kudos

463 Views
popup
Contributor I
Hi, rocco
 
I will try what you advise me.
 
However the code from ucos-ii website was build under CW3.1 and couldn't pass the compilation in CW5.1. I don't have CW3.1.
 
Here is a snapshot. There are 51 errors and 17 warnings. I don't change the files at all, and I don't know why there are so many mistakes and how to solve this?
 
0 Kudos

463 Views
Alban
Senior Contributor II
Hello,

The errors are because of double declarations.
You should make sure that register declarations are #include only once.
The file #included should have
#ifndef XXXXXXX
#define XXXXXXX
code
#endif
in order to avoid double declaration.

Also, you may be able to pass linking by compiling in a certain order, but it's not a clean job.

Cheers,
Alban.


Message Edited by Alban on 2007-05-23 03:47 PM
0 Kudos