Integrated Approach to Provide Security of Cyber-Physical Systems Based on Microcontrollers