# New port for Keil

**URL:** <https://forums.freertos.org/t/new-port-for-keil/2792>\
**Category:** Kernel\
**Created:** [February 26, 2007, 4:18pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792 "2007-02-26T16:18:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 26, 2007, 4:18pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/1 "2007-02-26T16:18:52Z")

</div>

**nobody** wrote on [Monday, February 26, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556):

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

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [February 26, 2007, 4:43pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/2 "2007-02-26T16:43:26Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, February 26, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/fd8b):

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

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

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 7, 2007, 9:26am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/3 "2007-03-07T09:26:46Z")

</div>

**[jra01](https://sourceforge.net/u/jra01/)** wrote on [Wednesday, March 07, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/af66):

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:

\_\_user\_initial\_stackheap

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDR&nbsp;&nbsp;&nbsp;&nbsp; R0, =&nbsp; Heap\_Mem  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDR&nbsp;&nbsp;&nbsp;&nbsp; R1, =(Stack\_Mem + USR\_Stack\_Size + SVC\_Stack\_Size)&nbsp;&nbsp;&nbsp; ; start in SVC mode!  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDR&nbsp;&nbsp;&nbsp;&nbsp; R2, = (Heap\_Mem +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Heap\_Size)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDR&nbsp;&nbsp;&nbsp;&nbsp; R3, = Stack\_Mem  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LR

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

Regards

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 7, 2007, 5:59pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/4 "2007-03-07T17:59:51Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Wednesday, March 07, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/af66/0e50):

Hi - yes it is my intention to include it in the distribution.&nbsp; I was so busy on the SafeRTOS project for the last few months my todo list got a bit out of hand!&nbsp; 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.&nbsp; This limits the heap size that can be allocated unless using the full version.&nbsp; 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.&nbsp; 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.&nbsp; I appreciate your contribution to the project.

Regards.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 7, 2007, 6:01pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/5 "2007-03-07T18:01:36Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Wednesday, March 07, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/af66/0e50/9143):

Sorry - just read your fix in the post.&nbsp; It mentions the heap\_mem thing is covered already.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 8, 2007, 1:52pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/6 "2007-03-08T13:52:01Z")

</div>

**[jra01](https://sourceforge.net/u/jra01/)** wrote on [Thursday, March 08, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446):

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!

regards

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 8, 2007, 2:01pm UTC](https://forums.freertos.org/t/new-port-for-keil/2792/7 "2007-03-08T14:01:57Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, March 08, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540):

Got it - thanks 😉

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 6, 2007, 5:44am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/8 "2007-09-06T05:44:55Z")

</div>

**[megcyc](https://sourceforge.net/u/megcyc/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540/d430):

Hi,

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:&nbsp; #52: expected a macro parameter name  
…

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

Can anyone help me on this?

Thanks

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [September 6, 2007, 7:26am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/9 "2007-09-06T07:26:55Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540/d430/16d1):

The Keil port in the [FreeRTOS.org](http://FreeRTOS.org) download is configured to use the Keil ARM compiler - which is not defunct.&nbsp; 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.&nbsp;&nbsp; This is not compatible.

If you send me an email to r (\_dot\_) barry =at\_ [freertos.org](http://freertos.org) then I can send you a SAM7 project that is configured to use the RVDS compiler, but is rather out of date.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 6, 2007, 8:23am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/10 "2007-09-06T08:23:14Z")

</div>

**[megcyc](https://sourceforge.net/u/megcyc/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540/d430/16d1/0a17):

Received ok. Will go and try out now.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 6, 2007, 9:02am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/11 "2007-09-06T09:02:52Z")

</div>

**[megcyc](https://sourceforge.net/u/megcyc/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540/d430/16d1/0a17/ab4d):

Hi,

Compilation looks good except for this statement

compiling USBSample.c…  
USB\USBSample.c(1169): error:&nbsp; #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?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 6, 2007, 9:10am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/12 "2007-09-06T09:10:23Z")

</div>

**[megcyc](https://sourceforge.net/u/megcyc/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/9446/6540/d430/16d1/0a17/ab4d/1d95):

Ok,

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

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 4, 2007, 7:41am UTC](https://forums.freertos.org/t/new-port-for-keil/2792/13 "2007-10-04T07:41:07Z")

</div>

**[karelvergauwe](https://sourceforge.net/u/karelvergauwe/)** wrote on [Thursday, October 04, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/7c5e0b57/#1556/665d):

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

thanks
