Real-time control software and hardware is essential for operating modern quantum systems. In particular, the software plays a crucial role in bridging the gap between applications and real-time operations on the quantum system. Unfortunately, real-time control software is an often underexposed area, and many well-known software engineering techniques have not propagated to this field. As a result, control software is often hardware-specific at the cost of flexibility and portability. In this presentation we will present techniques and tools that enable the development of reliable, flexible, and portable control software for real-time control systems. We present a modular software architecture for real-time control software and show that modular control software can reduce kernel execution time overhead by 63.3% on average. Our code portability analysis shows that two distinctly different systems can share between 49.8% and 91.0% of code statements. Additionally, we will cover testing and simulation tools for real-time control software. We show that our kernel simulator is 6.9 times faster on average compared to execution on hardware while the position of the timeline cursor is simulated with an average accuracy of 97.9%.