In this paper, we propose a context-oriented programming (COP) framework for embedded software based on C++. The framework aims to enable us to apply COP to embedded systems. The next generation of software systems such as the internet of things or Industry 4.0 requires the ability to dynamically adapt to various contexts such as the changes in their surrounding environment. COP is an approach that is suitable for such software development. COP treats context explicitly and provides mechanisms to adapt dynamically to the changes in the context at runtime. The currently existing COP languages are extensions of Java, Smalltalk, etc. However, these programming languages are not suitable for embedded systems. Even now, numerous embedded software packages are developed with C or C++; thus, it is important to extend C++ for COP. Our COP framework named RTCOP exhibits mechanisms of method dispatching and layer activation for implementation of COP. Furthermore, to achieve adequate performance for embedded systems, the framework demonstrates the following features. (1) It is configurable for reducing memory, (2) the speed of method dispatching and layer activation is within a practical range. In this paper, we describe our proposal of the COP framework.