Software-defined networking (SDN) is making their way into the fifth generation of mobile communications. For example, 3GPP is embracing the concept of control-user plane separation (a cornerstone concept in SDN) in the 5G core and the radio access network (RAN). In this paper, we introduce a flexible, programmable, and open-source SDN platform for heterogeneous 5G RANs. The platform builds on an open protocol that abstracts the technology-dependent aspects of the radio access elements, allowing network programmers to deploy complex management tasks as policies on top of a programmable logically centralized controller. We implement the proposed solution as an extension to the 5G-EmPOWER platform and release the software stack (including the southbound protocol) under a permissive APACHE 2.0 license. Finally, the effectiveness of the platform is assessed through three reference use cases: 1) active network slicing; 2) mobility management; and 3) load-balancing.