Homepage  
Homepage | FAQ

FreeRTOS FAQ - Ports

Will FreeRTOS run under Windows?
Is there an ARM port?
Is there a ColdFire port?
Are the XXX development tools supported?
How do I create a new port?

FAQ Top



Will FreeRTOS run under Windows?

Yes! - the x86 port will run in a DOS emulation box [but you will not get the correct real time response] and the ARM7 Keil port can be completely simulated under windows. You can even step through the code with both.

To try the Keil ARM7 port see the ARM7 Keil WEB pages.

To try the x86 port:

  1. Obtain the Open Watcom development tools and the latest FreeRTOS code.
  2. Open the Open Watcom project in the FreeRTOS/Demo/PC directory - it is called rtosdemo.wpj.
  3. Attach a loopback connector to COM1: of your PC. This is not required to run the demo but if it is missing the communications test tasks will report a failure. See the Demo Application documentation for more information.
  4. To build the code to run from a DOS box, select "Use Release Switches" from the "Targets | Target Options" menu within the Open Watcom IDE and build the code. Then execute the resulting rtosdemo.exe file.
  5. To build and run a debug version of code select "Use Development Switches" from the "Target | Target Options" menu within the Open Watcom IDE and build the code. Next open the debugger using the "Targets | Debug" menu item. The debugger will open and load the application. If you try debugging a release build the program will start automatically and you will not be able to stop it!
Important Notes for the x86 demo:



Is there an ARM port?

V2.4.0 is the first release to contain an ARM port. Both ARM and THUMB mode are supported.



Is there a ColdFire port?

An independently submitted ColdFire port is available - but due to a lack of the required development tools and hardware it is untested and cannot be directly supported. It is however well documented. See the ColdFire sections of "Ports and Tools" on this site for more details and to obtain the source code.



Are the XXX development tools supported?

Each RTOS port is for a particular microcontroller architecture using a particular development tool. Currently x86 is the only architecture for which two ports are available - one that uses the Open Watcom compiler, and one that uses the Borland compiler.

The "Ports and Tools" section of the WEB site documents the development tools used on each architecture. Only the tools listed in that section are currently supported - but others will be added so email me if you would like to make any suggestions.

Ports that use free or open source tools will always be provided first wherever possible.



How do I create a new port?

First, read the "How FreeRTOS works" section - a link to which can be found on the left menu frame - then ...

  1. Create a path to your new port under Source/portable. To be consistent, this should take the form of Source/portable/[compiler_name]/[architecture].
  2. Create a new file called port.c and place it in the new directory.
  3. Source/include/portable.h contains prototypes for all the C functions your new port.c file must implement. Each existing port contains a port.c file that can be used as an example. I generally place the code to setup the RTOS tick ISR within sPortStartScheduler().
  4. Copy Source/portable/GCC/ATMega323/portmacro.h into the new directory - it is easier to start with an existing file than to create it from scratch. Examine the portmacro.h file and edit where necessary - in particular the portENTER_CRITICAL(), portEXIT_CRITICAL(), portENABLE_INTERRUPTS() and portDISABLE_INTERRUPT() definitions will require some consideration.
  5. Edit Source/include/portable.h so your new portmacro.h file gets included when the new port gets built. You will see how this is done for the existing ports.
  6. Use the RTOS tasks defined in the demo application files to test your new port - as easy as that ...

This process was well documented by the authors of the ColdFire FreeRTOS port. See the ColdFire RTOS implementation report for more information and a good example.





Copyright (C) 2003 - 2008 Richard Barry
Any and all data, files, source code, html content and documentation included in the FreeRTOS distribution or available on this site are the exclusive property of Richard Barry. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Richard Barry.