This is a bit of nebulous area, IANAL but I am not sure I would want to develop _open_ source medical device firmware.
Medical devices have a lot of strict regulations from multiple certification bodies (most famous one being FDA). Under IEC 62304, any RTOS becomes a SOUP item (Software Of Unknown Provenance). In practice this means that you would have to provide beyond reasonable evidence that the RTOS will do what you say it does, consistently. This is a long and expensive regulatory endeavor.
If you are going through the certification process and selling a medical device and then choose to open source its firmware, then more power to you.
However if you are thinking of publishing _open_ source firmware that will work on either 3rd party or open hardware, in my opinion you are setting yourself up for a world of litigation that very few individual persons can afford.