I am starting on integrating the ChibiOS RTOS with MP.
I would like to get some feedback on what would be more beneficial: MP as a library or ChibiOS as a library.
Either modules can be compiled as a static library.

Here are some thoughts to consider:
1. ChibiOS implements drivers for just about all peripherals of a large collection of MCUs, so MP can take advantage of these low level drivers and porting to multiple platforms could be made relatively fast. Some features of the RTOS could be disabled and will not interfere with the MP. But that would require an application dependent configuration file (already provided) and a library rebuild.
2. There might be a need to merge the two projects, and might require some Makefile changes, perhaps the current file layout or project architecture might be impacted. Building ChibiOS as library could be just a simple link from MP, but it depends on the objectives here.
3. The are some files that needs to be addressed: main, vectors, linker files, startup files.
4. A thread interface/module could be created to take advantage of the RTOS capabilities...

That should be simple enough to enable/disable with the configuration files.
I can try it, but I believe that the RTOS can be totally disabled unless you wish to use its drivers in a single thread environment.
I think it makes sense to have the RTOS be built as a static library.

I am starting on integrating the ChibiOS RTOS with MP.
I would like to get some feedback on what would be more beneficial: MP as a library or ChibiOS as a library.
Either modules can be compiled as a static library.

Woohoo! I was sorta trying to do something like this early in the summer (pestered dhylands on IRC a lot, thanks for all the help) but then dropped it due to lack of time.

I basically would like to have MP as library so that I can kick up a thread running MP (load script from flash or sdcard, interactive python shell launched from chibios shell would be nice but not required) while keeping everything else business-as-usual for ChibiOS.

I managed to get the ChibiOS as a library that links from the MP Makefile in stmhal.
I figured since the main.c is in MP then better to make ChibiOS as a library.
I got to a point where everything builds cleanly but could not get the ChibiOS to initialize the hardware correctly, with MP it is very difficult to debug startup code without attaching a JTAG debugger, which I have but requires another set of tools running on Windows (Ride7 IDE).
I also had issues with the STM library, there are conflicts due to the fact that MP is running the latest from ST but ChibiOS is lacking behind.
Eventually I found that that was taking long. But I would be ready to work on it again.
I think that would be the ultimate integration, as ChibiOS implements multiple platforms and multiple drivers and it would be a nice thing to port MP and ChibiOS on any of those platforms (with sufficient RAM/FLASH of course).

I am not sure what is the best way to integrate and to proceed perhaps you can throw some ideas, and by the way I am not a GIT addict, so may need some input here.