RT2MQX Real Time Programming
Real-time programming applied to the MQX operating system
|
Objectives
|
- Convenient course material with space for taking notes
- Example code, labs and solutions
- A PC under Windows XP for two trainees
- A NXP Kinetis K60 (Cortex/M4) with CodeWarrior IDE
- Familiarity with embedded C concepts and programming
- Basic knowledge of embedded processors
- Any embedded systems engineer or technician with the above prerequisites.
- The prerequisites indicated above are assessed before the training by the technical supervision of the traineein his company, or by the trainee himself in the exceptional case of an individual trainee.
- Trainee progress is assessed in two different ways, depending on the course:
- For courses lending themselves to practical exercises, the results of the exercises are checked by the trainer while, if necessary, helping trainees to carry them out by providing additional details.
- Quizzes are offered at the end of sections that do not include practical exercises to verifythat the trainees have assimilated the points presented
- At the end of the training, each trainee receives a certificate attesting that they have successfully completed the course.
- In the event of a problem, discovered during the course, due to a lack of prerequisites by the trainee a different or additional training is offered to them, generally to reinforce their prerequisites,in agreement with their company manager if applicable.
Course Outline
- MQX overview
- Organization of MQX
- MQX directory structure
- RTOS directory
- PSP, BSP, I/0 and others source subdirectories
- Initializing and starting MQX
- Developing with NXP CodeWarrior Development Studio
- Build projects
- PSP build-project
- BSP build-project
- Post-build processing
| Exercise: | Creating a simple MQX (only one task) project using NXP CodeWarrior Development Studio | |
- Base real time concepts
- The Real Time constraints
- Multi-task and real time
- Need for specific data structures
- Thread safe data structures
- Linked lists
- Circular lists
- FIFOs
- Stacks
- Data structures integrity proofs
- Assertions
- Pre and post-conditions
| Exercise: | Build a general purpose thread safe doubly linked list | |
- Memory management algorithms
- Buddy System
- Best fit
- First Fit
- Pools Management
- Understand how MQX RTOS Manages Memory
- Memory with variable-size blocks
- Lightweight memory with variable-size blocks
- Memory with fixed-size blocks
- Creating partitions
- Allocating and freeing partition blocks
- Memory management errors
- Stack monitoring
- Controlling caches and MMU Overview (not present on K60 MCU)
| Exercise: | Write a simple, thread safe, buddy system memory manager | |
| Exercise: | Write a generic, multi-level, memory manager | |
| Exercise: | Enhance the memory manager for memory error detection | |
| Exercise: | Detect stack overflow | |
- Tasks and Task Descriptors
- Content of the task descriptor
- List of task descriptors
- Context Switch
- Task Scheduling and Preemption
- Tick based or tickless scheduling
- Scheduling systems and schedulability proof
- Fixed priorities scheduling
- RMA and EDF scheduling
- Managing Tasks
- Creating tasks
- Managing task errors
- Terminating tasks
- Scheduling
- FIFO scheduling
- Round Robin scheduling
| Exercise: | Creating your first multi-task project | |
- Time components
- Timers
- Lightweight timers
- Watchdogs
- Hardware Timer on Cortex-M4
| Exercise: | Turn a LED on and off using software timers | |
- Need for interrupts in a real time system
- Software Interrupt
- Time Interrupts
- Device Interrupts
- Level or Edge interrupts
- Hardware and Software acknowledge
- Interrupt vectoring
- Interrupts and scheduling
- Handling Interrupts and Exceptions in MQX RTOS
- Initializing interrupt handling
- Restrictions on ISRs
- Handling exceptions
- Handling ISR exceptions
- Handling task exceptions
- Handling Interrupts on Cortex-M4
| Exercise: | Synchronize Interrupts with tasks | |
- Waiting and waking up tasks
- Semaphores
- Events
- Semaphores and Events through MQX RTOS
- Events
- Lightweight events
- Lightweight semaphores
- Semaphores
| Exercise: | Synchronizing a task with another | |
- Mutual Exclusion
- Spinlocks and interrupt masking
- Mutex or Semaphore
- Recursive or not recursive mutexes
- Priority inversion problem
- Priority inheritance (the automatic answer)
- Priority ceiling (the design centric answer)
- Mutexes and condition variables
- Mutual Exclusion through MQX RTOS
- Priority inversion
- Priority inheritance
- Priority protection
- Mutexes
- Mailboxes
- Using Mailboxes through MQX RTOS
- Messages
- Queues
- Task Queues
| Exercise: | Implement mutual exclusion between two tasks | |
| Exercise: | Synchronizing tasks using queues | |
- Parallel programming problems
- Uncontrolled parallel access
- Deadlocks
- Livelocks
- Starvation
| Exercise: | The producer-consumer problem, illustrating (and avoiding) concurrent access problems | |
| Exercise: | The philosophers dinner problem, illustrating (and avoiding) deadlock, livelock and starvation | |
- Instrumentation
- Logs
- Lightweight logs
- Kernel logs
- Stack usage utilities
- Run-Time Testing
- Embedded Debug
| Exercise: | Debug an application with the log component | |
- Selecting a Baseline BSP
- Modifying Source Code
- USB Host/Device Library Description
- USB Host/Device Stack Directory Structure
- USB Host and USB Device APIs Overview
| Exercise: | Run a NXP USB HID Example | |
- MFS at a Glance
- MFS API Overview
| Exercise: | Use of MFS accessing the SPI-connect SD Card | |
- Shell Library Overview
- RTCS Library Overview
- Setting up the RTCS
- Using Sockets
- RTCS API Overview
- RTCS Applications
| Exercise: | Shell Command line providing microprocessor state information Demo | |
| Exercise: | Simple Web Server Demo | |
- eGUI Library Overview
- Graphic Object Description
- Structure of Project with eGUI
- Driver API Overview
| Exercise: | Embedded GUI Demo | |
More
To book a training session or for more information, please contact us on info@ac6-training.com.
Registrations are accepted till one week before the start date for scheduled classes. For late registrations, please consult us.
You can also fill and send us the registration form
This course can be provided either remotely, in our Paris training center or worldwide on your premises.
Scheduled classes are confirmed as soon as there is two confirmed bookings. Bookings are accepted until 1 week before the course start.
Last update of course schedule: 23 February 2026
Booking one of our trainings is subject to our General Terms of Sales
Related Courses
MC4
Multi-Core Programming with OSEK/VDX and AutoSAR
NR3
NXP + FreeRTOS + West
NR6
NXP + ThreadX + West
NRF5
nRF Connect SDK Programming
RT1
Real Time and Multi-Core programming
RT3
FreeRTOS Real Time Programming
RT5
Zephyr RTOS Programming
RT6
Real Time Programming with Eclipse ThreadX
RT7
Real Time Programming with RT-Thread
RTW
West, MCUXpresso SDK and Kconfig