Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


FreeRTOS on x86 without DOS?

Posted by John on December 7, 2011
I'm just starting out with FreeRTOS and I'm trying to compile it for an x86 microcontroller.

I am able to compile the provided demo "PC" with the Open Watcom compiler. This results in a .exe file. I understand I'm supposed to run this under DOS with all of the .obj files in the same directory?

I want the FreeRTOS kernel to run directly on x86 hardware without 'another' OS under it. To this end, I've started trying to write a 'port' layer so I can compile it with GCC. This effort is slow and painful.

Is my understanding of the PC demo correct? Is there any path to compile FreeRTOS to run standalone on x86? Or is the route I'm taking of writing a port layer for GCC/x86 the easiest option at this point?

RE: FreeRTOS on x86 without DOS?

Posted by Richard on December 7, 2011
The OpenWatcom port uses DOS as a launch mechanism. Once FreeRTOS is running, it replaces the DOS tick with its own, and DOS has no more control of the execution. You should be able to use most of the same port code without DOS to boot the system, but will need a method of booting into FreeRTOS.


RE: FreeRTOS on x86 without DOS?

Posted by John on December 7, 2011
I don't understand how to get anything I know how to boot out of the Open Watcom tools. The current demo spits out a .exe and several 16-bit object files. I don't have a way to massage those into a single object file I could boot. That was my primary motivation for attempting to move to GCC. I understand it's outside the scope of FreeRTOS support, but pointers on how to make that jump would be greatly appreciated.

I did try wlink specifying an ELF executable, but it complained of a missing 'clib' and eventually failed. I'm digging through their support forums as well trying to figure that side out but documentation is sparse. I have the full Open Watcom demo flow working on Windows and Linux.

It still seems like writing a GCC/x86 port layer is the easiest way to get a single object file. Is there some known stumbling block further down that path? I'm experienced in OS fundamentals and x86 asm.

RE: FreeRTOS on x86 without DOS?

Posted by John on December 7, 2011
Thank you for the help so far!

RE: FreeRTOS on x86 without DOS?

Posted by John on December 13, 2011
I've got most of the PC demo compiling under gcc (with warnings) now. I'm starting to test it on my simulator. Thanks!

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner