5

How could I compile the FreeRTOS Source Code and run it (possibly on qemu) on Ubuntu 11.04?

1

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.

2

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.

  • I forgot to mention it in my answer, but it's very easy to install the pthread version and get FreeRTOS up and running the samples on linux. Just download the zip-file and import it as an Eclipse-project.. and that's it! :) There's also a make chain so you can keep it in the console. – Morten Jensen May 26 '12 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.