Graphics Component
Version 6.32.3
MDK Middleware for Graphical User Interfaces
|
The Graphics component supports only one execution model (for more information please refer to User and Reference Guide - 15. Execution Model: Single Task/Multitask):
A CMSIS-RTOS is used, and multiple tasks call Graphics functions. This works without a problem as long as the software is made thread-safe, which is done by enabling multitask support in the configuration and adapting the kernel interface routines. An user code template is available for this execution model (GUI_MultiThread.c). You can add it to a project by right-clicking on the Source Group and selecting Add New Item to Group. Under the Graphics component, you will find the emWin GUI Thread for Multi-Tasking Execution Model.
In this file, a GUIThread
is defined with a stack size of 2048
bytes. This value is based on the stack requirements as described in the User and Reference Guide - 35.2.2 Stack Requirements. As stated there, you can reduce this stack size by 200 bytes if no memory devices are used and an additional 600 bytes if the Window Manager is not used. Additionally, two threads are defined with a stack size of 600 bytes that will call this GUIThread
.
In case RTX v5 is used no changes to RTX settings are necessary as all resources are allocated statically. In case RTX v4 is used you need to change following settings in file: