Two main embedded software components, application software and platform software, i.e., the real-time operating system (RTOS), interact with each other in order to achieve the functionality of the system. However, they are so different in behaviors that one behavior modeling language is not sufficient to model both styles of behaviors and to reason about the characteristics of their individual behaviors as well as their parallel behavior and interaction properties. In this paper, we present a formal approach to the synthesis of the application software and the RTOS behavior models. In this approach, each of them is modeled with its adequate modeling language and then is composed into a system model for analysis. Moreover, this paper also presents a consistent way of analyzing the application software with respect to both functional requirements and timing requirements. To show the effectiveness of the approach, a case study is conducted, where ARINC 653 and its application are modeled and verified against timing requirements. Using our approach, application software can be constructed as a behavioral model independently from a specific platform and can be verified against various platforms and timing constraints in a formal way.