Download presentation
Presentation is loading. Please wait.
1
Programming Embedded Systems in C++
C++ & a Real-Time Operating System 21 May 2014 Colin Walls, Mentor Graphics
2
[ # ] This is what a question slide will look like. Please answer in the chat. Also, questions to me start with ?
3
Agenda Monday: C++ for Embedded Programming Tuesday: C to C++ Migration Strategy Wednesday: C++ and a Real Time Operating System Thursday: Case study #1 Friday: Case Study #2
4
[ 1 ] Are you using an RTOS? If so, which one?
5
Today’s Topics Hiding the RTOS API Thread local data Paired operations
Using classes to encapsulate the API Thread local data Paired operations Dynamic memory management
6
Today’s Topics Hiding the RTOS API Thread local data Paired operations
Using classes to encapsulate the API Thread local data Paired operations Dynamic memory management
7
C++ and an RTOS Benefits: Wide range of possibilities
application programmers do not need detailed knowledge of RTOS code portability Wide range of possibilities
8
Task/Object Creation Encapsulate API using classes Task example:
have base class for generic task constructor/destructor – task creation empty virtual main() application task defined by deriving class instantiate to create tasks note separation of definition from creation
9
Task/Object Creation class task { unsigned taskID; public: virtual void main(); task() taskID = task_create(main); } ~task() task_delete(taskID); ... };
10
To view the rest of this course, visit the full version on Design News.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.