1. Unlike some other well-known embedded operating systems, the startup process of Uc/os-ii in a single chip microcomputer system is relatively simple, unlike some operating systems that require the kernel to be compiled into an image file written to Rom, power-on reset, and then load the file into RAM from the ROM before running the application. The kernel of UC/OS-II is compiled into a file with the application, the user only need to convert this file into hex format, write ROM on it, power up, will be like ordinary microcontroller program run.
The transplant of 2.uc/os-ii is also a worthwhile work to pay attention to. If there are no existing porting instances, you must write the porting code yourself. Although only two files need to be changed, but still need to be familiar with the corresponding microprocessor, it is best to refer to the existing migration instance. In addition, even if you have a porting instance, it's best to read it before programming because it involves a stack operation. when writing an interrupt service program, the order in which the registers are pushed into the stack must correspond to the order in which the code is migrated.
Some features of 3.UC/OS-II in SCM system embedding UC/OS-II will enhance the reliability of the system and make the debugging procedure simple. In the past, the traditional SCM development work often encountered the program to run or fall into a dead cycle. Can use the watchdog solution to run the problem, and for the latter case, especially when involved in complex mathematical calculations, only set breakpoints, a lot of time to slowly analyze. If you embed uc/os-ii in your system, it's a lot easier. The whole program can be divided into many tasks, each task is relatively independent, and then set the timeout function in each task, after the time runs out, the task must hand over the use of the CPU. Even if a task has a problem, it does not affect the operation of other tasks. This brings both the reliability of the system and the ease with which the debug program is made.
4. Priority reversal
In Uc/os-ii, called priority inversion, a high-priority task must wait for the completion of a low-priority task. In these cases, a priority reversal between the two tasks is unavoidable. Therefore, when using UC/OS-II, it is necessary to understand the developed system in order to determine whether a semaphore is used for a shared resource.
Uc/os operating System (RPM)