Rapid and low-cost context-switch through embedded processor customization for real-time and control applications