EmbeddedRelated.com
Forums

Keil RTX Real Time Kernel

Started by Widita Budhysutanto October 13, 2008
Hi All,

I am now in the need for a real time kernel and interested in porting
FreeRTOS to LPC2888, but until now still has not succeeded, but in the mean
time I found out that a real time kernel (ARM-RTX) was included in my Keil
MDK license,

As the kernel bundled with the MDK does not come with the source code and
all the examples are built for LPC2129, LPC2103 and LPC2138,
is it possible to use the kernel on LPC2888 without having the source code?

Actually I tried to compile the kernel for LPC2888, but as soon as I changed
the header file for LPC21xx.h with LPC288x.h, there are some unidentified
identifier, which I think was a platform specific identifier, like:

> RTX_Config.c(242): error: #20: identifier "T1IR" is undefined
> RTX_Config.c(242): error: #20: identifier "VICSoftIntClr" is undefined
> RTX_Config.c(242): error: #20: identifier "VICVectAddr" is undefined
>
which came from a function named OS_TIACK();

> RTX_Config.c(265): error: #20: identifier "T1MR0" is undefined
> RTX_Config.c(265): error: #20: identifier "T1MCR" is undefined
> RTX_Config.c(265): error: #20: identifier "T1TCR" is undefined
> RTX_Config.c(265): error: #20: identifier "VICDefVectAddr" is undefined
> RTX_Config.c(265): error: #20: identifier "VICVectAddr15" is undefined
> RTX_Config.c(265): error: #20: identifier "VICVectCntl15" is undefined
>
which came from a function named OS_TINIT();

The problem is I can't do modification because I can't find those identifier
in the files supplied with the Keil MDK.
Kind Regards,
Widita

An Engineer's Guide to the LPC2100 Series

> Hi All,
>
> I am now in the need for a real time kernel and interested in
> porting FreeRTOS to LPC2888, but until now still has not
> succeeded,

There are very few modifications required to move from one ARM7 to another.

+ Check the linker script is correct.
+ Check the startup code allocates stacks for IRQ and Supervisor modes as a
minimum.
+ Check the startup code calls main() from Supervisor mode.
+ Check prvSetupTimerInterrupt() in port.c uses a timer that is available on
the LPC2888 device.

Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.

Hi,

Basically most of the undefinded #defines could be added easily. Keil
tends to rename the common registers from family to family a bit
different, which is very uncomfortable, but others do the same :-(

But when you do not have the sources, adding the #defines only will
not help, as the way interrups are working is different on LPC2888
and LPC2138. I assume that the latest version of ARM-RTX *will*
support the LPC2888 as well.

Herbert

At 11:10 13.10.2008 +0200, you wrote:
>Hi All,
>
>I am now in the need for a real time kernel and interested in porting
>FreeRTOS to LPC2888, but until now still has not succeeded, but in the mean
>time I found out that a real time kernel (ARM-RTX) was included in my Keil
>MDK license,
>
>As the kernel bundled with the MDK does not come with the source code and
>all the examples are built for LPC2129, LPC2103 and LPC2138,
>is it possible to use the kernel on LPC2888 without having the source code?
>
>Actually I tried to compile the kernel for LPC2888, but as soon as I changed
>the header file for LPC21xx.h with LPC288x.h, there are some unidentified
>identifier, which I think was a platform specific identifier, like:
>
> > RTX_Config.c(242): error: #20: identifier "T1IR" is undefined
> > RTX_Config.c(242): error: #20: identifier "VICSoftIntClr" is undefined
> > RTX_Config.c(242): error: #20: identifier "VICVectAddr" is undefined
> >
>which came from a function named OS_TIACK();
>
> > RTX_Config.c(265): error: #20: identifier "T1MR0" is undefined
> > RTX_Config.c(265): error: #20: identifier "T1MCR" is undefined
> > RTX_Config.c(265): error: #20: identifier "T1TCR" is undefined
> > RTX_Config.c(265): error: #20: identifier "VICDefVectAddr" is undefined
> > RTX_Config.c(265): error: #20: identifier "VICVectAddr15" is undefined
> > RTX_Config.c(265): error: #20: identifier "VICVectCntl15" is undefined
> >
>which came from a function named OS_TINIT();
>
>The problem is I can't do modification because I can't find those identifier
>in the files supplied with the Keil MDK.
>Kind Regards,
>Widita
>
>
Hello,

Yes, you are right,
I can't just exchange the LPC21xx.h with LPC288x.h on RTX_Config.c but I
need a really different RTX_Config.c
But does Keil provide us with that configuration file?
Kind Regards,
Widita

On Mon, Oct 13, 2008 at 11:18 AM, Ankit wrote:

> Hello
>
> I think you enter the proper header file for LPC2888 than these errors will
> go away.
>
> This identifiers has nothing to do with RTX_Config.c. You should add the
> proper file RTX_Config.c for the device LPC2888 only.
>
> It should be supplied by keil only.
>
> Regards,
>
> Ankit Thakkar
>
> Excellent Contact Private Limited
>
> _____

Hi,

In deed, The ARM-RTX I used is quite old,
* Name: RTX_CONFIG.C
* Purpose: Configuration of RTX Kernel for Philips LPC21xx
* Rev.: V3.04 / 10-jan-2007

Has anyone used ARM-RTX from newer RTX Kernel on LPC2888?

Kind Regards,
Widita

On Mon, Oct 13, 2008 at 11:33 AM, Herbert Demmel wrote:

> Hi,
>
> Basically most of the undefinded #defines could be added easily. Keil
> tends to rename the common registers from family to family a bit
> different, which is very uncomfortable, but others do the same :-(
>
> But when you do not have the sources, adding the #defines only will
> not help, as the way interrups are working is different on LPC2888
> and LPC2138. I assume that the latest version of ARM-RTX *will*
> support the LPC2888 as well.
>
> Herbert
> At 11:10 13.10.2008 +0200, you wrote:
> >Hi All,
> >
> >I am now in the need for a real time kernel and interested in porting
> >FreeRTOS to LPC2888, but until now still has not succeeded, but in the
> mean
> >time I found out that a real time kernel (ARM-RTX) was included in my Keil
> >MDK license,
> >
> >As the kernel bundled with the MDK does not come with the source code and
> >all the examples are built for LPC2129, LPC2103 and LPC2138,
> >is it possible to use the kernel on LPC2888 without having the source
> code?
> >
> >Actually I tried to compile the kernel for LPC2888, but as soon as I
> changed
> >the header file for LPC21xx.h with LPC288x.h, there are some unidentified
> >identifier, which I think was a platform specific identifier, like:
> >
> > > RTX_Config.c(242): error: #20: identifier "T1IR" is undefined
> > > RTX_Config.c(242): error: #20: identifier "VICSoftIntClr" is undefined
> > > RTX_Config.c(242): error: #20: identifier "VICVectAddr" is undefined
> > >
> >which came from a function named OS_TIACK();
> >
> > > RTX_Config.c(265): error: #20: identifier "T1MR0" is undefined
> > > RTX_Config.c(265): error: #20: identifier "T1MCR" is undefined
> > > RTX_Config.c(265): error: #20: identifier "T1TCR" is undefined
> > > RTX_Config.c(265): error: #20: identifier "VICDefVectAddr" is undefined
> > > RTX_Config.c(265): error: #20: identifier "VICVectAddr15" is undefined
> > > RTX_Config.c(265): error: #20: identifier "VICVectCntl15" is undefined
> > >
> >which came from a function named OS_TINIT();
> >
> >The problem is I can't do modification because I can't find those
> identifier
> >in the files supplied with the Keil MDK.
> >
> >
> >Kind Regards,
> >Widita
> >
> >
> >
> >
> >
> >
> >
> >
Hi,

I asked for the RTX_Config.c from keil official support, but they don't have
a specific RTX_Config.c for LPC2888,
And I tried to change the configuration by myself,

But I am confused with some definitions:

1. #define OS_TOVF (TIMx(IR) & 1) /* Overflow
Flag */
Because I can't find where I can read the overflow flag on LPC2888 timer
2. #define OS_TIACK()
VICVectAddr = 0;
Because I can't find the replacement register for VICVectAddr on LPC2888
interrupt controller
3. VICDefVectAddr = (U32)os_def_interrupt;
Because I can't find the replacement register for VICDefVectAddr on
LPC2888 interrupt controller
4. And I am troubled in assigning the ISR handler for the Timer Interrupt

It turns out that the timer and interrupt controller differs greatly between
LPC21xx and LPC288x series.

Can someone please help me finishing this configuration file?
Thanks
Regards,
Widita

On Mon, Oct 13, 2008 at 11:54 AM, Ankit wrote:

> Hello
>
> You can ask to keil official support. I think they provide RTX_Config.c
> file
> for LPC288x.h.
>
> If they don't provide than you have to configure the file for your device.
>
> Otherwise ask for the development board vendor or company for the support.
> Regards,
>
> Ankit Thakkar
>
> Excellent Contact Private Limited
>
> _____
>
> From: l... [mailto:
> l... ] On Behalf Of
> Widita Budhysutanto
> Sent: Monday, October 13, 2008 3:11 PM
> To: l...
> Subject: Re: [lpc2000] Keil RTX Real Time Kernel
>
> Hello,
>
> Yes, you are right,
> I can't just exchange the LPC21xx.h with LPC288x.h on RTX_Config.c but I
> need a really different RTX_Config.c
> But does Keil provide us with that configuration file?
>
> Kind Regards,
> Widita
>
> On Mon, Oct 13, 2008 at 11:18 AM, Ankit > >
> er.com> wrote:
>
> > Hello
> >
> > I think you enter the proper header file for LPC2888 than these errors
> will
> > go away.
> >
> > This identifiers has nothing to do with RTX_Config.c. You should add the
> > proper file RTX_Config.c for the device LPC2888 only.
> >
> > It should be supplied by keil only.
> >
> > Regards,
> >
> > Ankit Thakkar
> >
> > Excellent Contact Private Limited
> >
> > _____
> >
> >
>
>
>
>
>

Hi Richard,
I tried to convert the demo project "ARM7_LPC2129_Keil", and it seems there
is something wrong with the portmacro.h, it can't be compiled...

here is the compilation error messages:

Build target 'LPC2888'
assembling Startup.s...
compiling main.c...
..\..\Source\include\..\..\Source\portable\Keil\ARM7\portmacro.h(112):
error: #52: expected a macro parameter name

portmacro.h line 112:
__asm{ LDR LR, [LR, #+60] }; /* Restore the return address. */
\
And here is the IDE-Version of my Keil UV3

> IDE-Version:
> Vision3 V3.50
> Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2007
>
> Tool Version Numbers:
> Toolchain Path: C:\Keil\ARM\BIN30\
> C Compiler: ARMCC.Exe V3.0.0.951
> Assembler: ARMASM.Exe V3.0.0.951
> Linker/Locator: ARMLINK.Exe V3.0.0.951
> Librarian: ARMAR.Exe V3.0.0.951
> Hex Converter: FROMELF.Exe V3.0.0.951
> CPU DLL: SARM.DLL V3.04
> Dialog DLL: DARMP.DLL V1.13
> Target DLL: BIN\UL2ARM.DLL V1.26
> Dialog DLL: TARMP.DLL V1.11f
>

My question is, are we using different compiler? because it seems that those
errors is shown because of the compiler is treating the code differently?
and indeed, when I tried to compile using the original project file
(rtosdemo_ARM.Uv2), it said about cannot find the compiler.

What should I do to compile these project files?
Thanks in advance,
Regards,
Widita

On Mon, Oct 13, 2008 at 10:32 AM, FreeRTOS.org Info wrote:

> > Hi All,
> >
> > I am now in the need for a real time kernel and interested in
> > porting FreeRTOS to LPC2888, but until now still has not
> > succeeded,
>
> There are very few modifications required to move from one ARM7 to another.
>
> + Check the linker script is correct.
> + Check the startup code allocates stacks for IRQ and Supervisor modes as a
> minimum.
> + Check the startup code calls main() from Supervisor mode.
> + Check prvSetupTimerInterrupt() in port.c uses a timer that is available
> on
> the LPC2888 device.
>
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> 17 official architecture ports, more than 6000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>
>
>