The M4 should have sufficient resources to run a light weight OS. I wouldn't consider anything with lots of drivers. Android or light weight Linux should work. I'd consider Free RTOS for non-dynamically loaded applications.
As we unveil EE Times’ 2015 Silicon 60 list, journalist & Silicon 60 researcher Peter Clarke hosts a conversation on startups in the electronics industry. Panelists Dan Armbrust (investment firm Silicon Catalyst), Andrew Kau (venture capital firm Walden International), and Stan Boland (successful serial entrepreneur, former CEO of Neul, Icera) join in the live debate.