CARTOS: A Charging-Aware Real-Time Operating System for Intermittent Batteryless Devices (IEEE Transactions on Emerging Topics in Computing, 2025)