Recent trends in embedded systems indicate a growing importance of the software component of these systems, and the concomitant increase in the importance of formal design and development of embedded software. In this paper we share our experience with designing and offering courses related to embedded software in the Department of Computer Science and Engineering at the Hong Kong University of Science and Technology. We give a detailed overview of the courses, the structure and the teaching/learning methodology followed in our courses, followed by some discussion and reflections on the courses.