rtel wrote on Tuesday, May 29, 2007:
Currently the FreeRTOS.org download does not contain any ports for the Keil IDE with the ARM compiler, although there are ports for the Keil IDE with the old (and now defunct) Keil compiler.
I do plan to include support for the new Keil/ARM combination when time allows. I’m currently working on a couple of new things, so it will be a week or two before I get the chance. In the mean time I have some code written by a third party that uses the Keil/ARM tools on a SAM7 that I can provide if required. The SAM7 is also ARM7 based so converting this to run on an LPC2368 is quite straight forward.
One of the problems in supporting the Keil/ARM tools is the limitations of the evaluation version. You can only create applications that have a *combined* code *and* data size of 16KBytes of less. This is not adequate to do anything interesting with TCP/IP.
If you would like a copy of the code then email me at r _dot_ barry [at] freertos.org. Do not use a SourceForge email address as binary attachments will get stripped off.
Converting from SAM7 to LPC would involve:
1) Changing the prvSetupTimerInterrupt() function to use the LPC timer in place of the SAM7 timer. You can use the CrossWorks port as an example of how to do this (should just be able to copy the function out of the CrossWorks port).
2) Changing the interrupt setups to use the LPC VIC in place of the SAM7 AIC.
3) Changing the startup code to use the Keil assembler syntax. Make sure stacks are setup for Supervisor and IRQ modes (as a minimum) and that main() is called from Supervisor mode. There is no need to setup a stack for User mode as the kernel does this for you when you create tasks.
If you download the demo version of CrossWorks then you can open the existing uIP project to see which files need to be included to run the WEB server demo. uIP requires some structures to be packed, and the syntax to do this is compiler dependent. The macro portPACK_STRUCT_END is provided for this purpose. In GCC you set this to __attribute__((packed)), I’m not sure what the Keil equivalent is.