From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- Documentation/RTOS/html/_using_o_s.html | 134 -------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 Documentation/RTOS/html/_using_o_s.html (limited to 'Documentation/RTOS/html/_using_o_s.html') diff --git a/Documentation/RTOS/html/_using_o_s.html b/Documentation/RTOS/html/_using_o_s.html deleted file mode 100644 index 7f85ccd..0000000 --- a/Documentation/RTOS/html/_using_o_s.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - -Using a CMSIS-RTOS Implementation -CMSIS-RTOS: Using a CMSIS-RTOS Implementation - - - - - - - - - - - - -
-
- - - - - - - -
-
CMSIS-RTOS -  Version 1.02 -
-
CMSIS-RTOS API: Generic RTOS interface for Cortex-M processor-based devices.
-
-
- -
-
    - -
-
- - -
-
- -
-
-
- -
-
-
-
Using a CMSIS-RTOS Implementation
-
-
-

A CMSIS-RTOS implementation is typically provided as a library. To add the RTOS functionality to an existing CMSIS-based application, the RTOS library (and typically a configuration file) needs to be added. The available functionality of the RTOS library is defined in the header file cmsis_os.h that is specific for each CMSIS-RTOS implementation.

-
-CMSIS_RTOS_Files.png -
-CMSIS-RTOS File Structure
-

Depending on the CMSIS-RTOS implementation, execution may start with the main function as the first thread. This has the benefit that an application programmer may use other middleware libraries that create threads internally, but the remaining part of the user application just uses the main thread. Therefore, the usage of the RTOS can be invisible to the application programmer, but libraries can use CMSIS-RTOS features.

-

Once the files are added to a project, the user can start working with the CMSIS-RTOS functions. A code example is provided below:

-

Code Example

-
#include "cmsis_os.h" // CMSIS-RTOS header file
-
-
void job1 (void const *argument) { // thread function 'job1'
-
while (1) {
-
: // execute some code
-
osDelay (10); // delay execution for 10 milliseconds
-
}
-
}
-
-
osThreadDef(job1, osPriorityAboveNormal, 1, 0); // define job1 as thread function
-
-
void job2 (void const *argument) { // thread function 'job2'
-
osThreadCreate(osThread(job1),NULL); // create job1 thread
-
while (1) {
-
: // execute some code
-
}
-
}
-
-
osThreadDef(job2, osPriorityNormal, 1, 0); // define job2 as thread function
-
-
void job3 (void const *argument) { // thread function 'job3'
-
while (1) {
-
: // execute some code
-
osDelay (20); // delay execution for 20 milliseconds
-
}
-
}
-
-
osThreadDef(job3, osPriorityNormal, 1, 0); // define job3 as thread function
-
-
int main (void) { // program execution starts here
-
osKernelInitialize (); // initialize RTOS kernel
-
: // setup and initialize peripherals
- - -
osKernelStart (); // start kernel with job2 execution
-
}
-
-
- - - - -- cgit