New port for Keil

nobody wrote on Monday, February 26, 2007:

I am trying to learning how the Freertos works. After seeing the instruction, I downloaded the Keil development kits,but it seems not to work with Keil port(I mean Philips ARM7 with the Keil development tools). So could you give me a updated version of this port, I will be very appreciate for the help.

PS: the problem now is when I tried to build target of the project, the development kit displayed the error message:can’t execute ‘C:\Keil\ARM\BIN\CA’

Thanks a lot

rtel wrote on Monday, February 26, 2007:

The Keil demo uses the Keil compiler - which is now defunct.  Keil ship the ARM compiler in its place.  This unfortunately requires different syntax.

Send me an email to r (dot) barry [at], and I can send you a third party demo that was created for the Keil/ARM combo.


jra01 wrote on Wednesday, March 07, 2007:

Is there any plan for adding the Realview port to the distro? Can I help somehow?

If the "third party demo" mentioned is the one I sent to Richard, here is a correction to make in the sam7.s file:


                LDR     R0, =  Heap_Mem
                LDR     R1, =(Stack_Mem + USR_Stack_Size + SVC_Stack_Size)    ; start in SVC mode!
                LDR     R2, = (Heap_Mem +      Heap_Size)
                LDR     R3, = Stack_Mem
                BX      LR

(It works anyway, but the stack sizes will be mixed up if this is not fixed.)


rtel wrote on Wednesday, March 07, 2007:

Hi - yes it is my intention to include it in the distribution.  I was so busy on the SafeRTOS project for the last few months my todo list got a bit out of hand!  I will be releasing a new WEB server demo soon so can include it then.

The Keil/ARM debugger (whatever it is called now) has a major disadvantage in that the evaluation edition only permits a total data size (ROM + RAM) of 16K.  This limits the heap size that can be allocated unless using the full version.  The Cortex M3 Keil demo gets around this by allocating the heap simply as a pointer at the end of the data section (this was an idea sent in by a contributor, maybe you?) rather than as an array.  This gets around the data size limit but means there is no warning if you run out of heap, unless you change the heap_x.c files to have an absolute memory check.

I would be grateful if you could send me the zip file again with the above fix included to make sure I have everything straight.  I appreciate your contribution to the project.


rtel wrote on Wednesday, March 07, 2007:

Sorry - just read your fix in the post.  It mentions the heap_mem thing is covered already.


jra01 wrote on Thursday, March 08, 2007:

I just sent the zip file by mail.

Since I have a full version I did not notice the limit you mentioned. It will be a very limited demo to stay within those limits!


rtel wrote on Thursday, March 08, 2007:

Got it - thanks :wink:


megcyc wrote on Thursday, September 06, 2007:


I’m new to the FreeRTOS and would really need help here.
I’m been trying out on the FreeRTOS with the Keil uVision 3 Realview Arm compiler on the demo Arm7 LPC2129 Keil and I’ve had great difficulties getting the compilation through.

The last message I had was this

compiling main.c…
c:\FreeRTOS\Source\include\…\…\Source\portable\Keil\ARM7\portmacro.h(94): error:  #52: expected a macro parameter name

assembling Startup.s…
Startup.s(1): error: A1167E: Invalid line start

Can anyone help me on this?


rtel wrote on Thursday, September 06, 2007:

The Keil port in the download is configured to use the Keil ARM compiler - which is not defunct.  If you have a new version of the Keil tools then you will have, not the Keil compiler (that would be too obvious), but the RVDS compiler.   This is not compatible.

If you send me an email to r (_dot_) barry =at_ then I can send you a SAM7 project that is configured to use the RVDS compiler, but is rather out of date.


megcyc wrote on Thursday, September 06, 2007:

Received ok. Will go and try out now.

megcyc wrote on Thursday, September 06, 2007:


Compilation looks good except for this statement

compiling USBSample.c…
USB\USBSample.c(1169): error:  #20: identifier "AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE" is undefined

Can’t seem to find the above identifier anywhere in the project folder. Could you help on that?


megcyc wrote on Thursday, September 06, 2007:


I manage to get it working with the at91sam7s64.h file… Thanks

karelvergauwe wrote on Thursday, October 04, 2007:

Hello, where dit you put this file to get the project working???