Arguably, what ultimately brought Palm down was their early success and the huge library of existing shareware and freeware tools:
They desperately needed to try something new (Palm OS was just showing its age as a single-threaded, in-RAM, non-virtual-memory-based OS), but couldn't, since it would have alienated long-time fans by stranding their existing software libraries.
They could never work their way through that chicken-and-egg problem (and all of the split ups (OS vs. hardware), forks/spin-offs (Handspring), and re-mergers didn't help either) until it was too late: Cobalt OS never saw any devices, and the Pre was an ambitious new start but would have had a tough time against the iPhone even if it would have launched earlier than that.