Protocols for sensor networks are commonly coupled to the specific operating system (OS), for instance TinyOS, involving some drawbacks. First, programmers must learn OS architecture, programming guidelines, sometimes a new programming language, etc. Second, protocols run on the specific OS only, i.e. on the hardware supported by the OS. Third, only selected network simulators, mostly provided by OS, can execute the OS-coupled code.To tackle the problems with interoperability we examined the idea of cross-platform protocol development for sensor networks, i.e. software running on several OSs, and share our experience in this paper.Our primary cross-platform MAC protocol runs on two OSs and on a hardware platform supporting the C programming language. To achieve interoperability we decoupled MAC from OS calls and provided a hardware abstraction layer (HAL) for each OS. We discovered that such an approach does not result in a significant penalty in terms of occupied memory (e.g. smaller by 3 kB than the TinyOSdedicated version) and consumed energy (additional overhead smaller by three orders of magnitude from total tx energy).