How could I compile the FreeRTOS Source Code and run it (possibly on qemu) on Ubuntu 11.04?
From the look of it, as a starting point, you need to load up one of their their demo project (uP specific) and build the code from there.
I had a look at the PIC project, and it does include all files necessary for building the code and preproc defines also.
They also say that they have developped their code to be as much as possible compliant with std C. So if you have the right tool-chain, and are building on a supported uP, have a go at building one of their demo project.
The question is always: How exact do you want to emulate the target system? :)
There is a FreeRTOS project ported to pthreads, so you'll be able to run FreeRTOS as a normal threaded application. This should do what you are asking for ?
Hard real time-constraints are no more, but as it says on the page:
"This is a port that allows FreeRTOS to act as a scheduler for pthreads within a process. It is designed to allow for development and testing of code in a Posix environment. It is considered a simulator because it will not keep real-time but it will retain the same deterministic task switching."
At work I find that it's worth the efforts to maintain an x86 port/mock/simulation of your system. That way I can make a better first prototype when the new hardware arrives. Of course you need to do some designing upfront and choose a fit level of abstraction, but that rewards itself in clarity, maintainability and testability, in my experience at least.
I am also looking into FreeRTOS in a QEMU Cortex-M3 environment. I'll keep posting if I work out something.