µC/OS-II Release Notes

Posted xiaokangkp0602

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了µC/OS-II Release Notes相关的知识,希望对你有一定的参考价值。

官方网址:https://doc.micrium.com/pages/viewpage.action?pageId=12851586

V2.92.14

Release Date

December 8, 2017

New Features

  • [200] Added a new port for the RISC-V architecture

Bug Fixes

  • [259] Cortex-A50 port used improper data width when writing to OSRunning.

V2.92.13

Release Date

August 17, 2017

New Features

  • [69] Added a new port for the Synopsys ARC EM6
  • [70] Added a new port for the ARM Cortex-A50 family
  • [71] Added SystemView Trace support.

Improvements

  • [73] Cortex-M0 and Cortex-M ports reworked to match the uCOS-III ports.
  • [107] Added app_hooks.c and app_cfg.h templates.
  • [175] Added trace support to the Cortex-M port.
  • [186] Added trace support to the RX port.

Deprecation

  • [176] Removed ARM-Cortex-A8 port (Replaced by ARM-Cortex-A).
  • [176] Removed ARM-Cortex-A9 port (Replaced by ARM-Cortex-A).
  • [176] Removed ARM-Cortex-R4 port (Replaced by ARM-Cortex-A).
  • [176] Removed ARM-Cortex-M3 port (Replaced by ARM-Cortex-M).
  • [176] Removed ARM-Cortex-M4 port (Replaced by ARM-Cortex-M).
  • [176] Removed RX-FPU port (Replaced by ARM-Cortex-RX).
  • [176] Removed RX200 port (Replaced by ARM-Cortex-RX).
  • [176] Removed RX600 port (Replaced by ARM-Cortex-RX).
  • [176] Removed RX610 port (Replaced by ARM-Cortex-RX).
  • [176] Removed RX62N port (Replaced by ARM-Cortex-RX).

V2.92.12

New Features & Improvements

  • ARM-Cortex-M Port: Added Generic port forARMCortex-M3,M4andM7devices.
  • ARM-Cortex-M0 Port: Added support for ARM Cortex-M0+ devices.
  • MSP430x Port: Added CCS toolchain support for MSP430x5xx devices.
  • RL78 Port: Added GNURL78 toolchain support.
  • TI C2000 (C28x) Port: Added support for Piccolo and Delfino devices.

Bug Fixes

  • Core: OSSafetyCritical Flag now checked in all OS???Create() and OS???Del() functions.

Ports

  • ARM-Cortex-A Generic: FP execution context now properly restored.
  • ARM-Cortex-M0: Stack usage is now AAPCS-compatible.
  • ARM-Cortex-M3: Stack usage is now AAPCS-compatible and port no longer wastes stack space for every task.
  • ARM-Cortex-M4: Port no longer wastes stack space for every task.

V2.92.11

Releasedate:2014/04/16

This is a minor release as it contains only a few items that were not caught prior to releasing V2.92.10.

CHANGES

1)        OS_TASK.C:

            In OSTaskResume(), fixed resuming a task that was suspended while multi-pending.

V2.92.10

Releasedate:2013/12/27

This is a minor release as it contains only a few items that were not caught prior to releasing V2.92.09.

CHANGES

1)        OS_TLS.C:

            Fixed compilation errors when using the full IAR DLIB library.

V2.92.09

Releasedate:2013/08/19

This is a minor release as it contains only a few items that were not caught prior to releasing V2.92.08.

CHANGES

1)        OS_CORE.C:

            In OS_EventTaskRemove(),ptcb->OSTCBEventPtr is now set to (OS_EVENT *)0 before exiting. This created problems when changing the priority of a task made ready to run but hasn’t been scheduled yet.

V2.92.08

Releasedate:2013/03/31

This is a minor release and only contains the addition of one feature: Thread Local Storage (TLS)

ADDED FEATURES

Thread Local Storage (TLS) allows each task to have task specific variables that are typically required by compilers and their run-time library.  TLS is optional and only currently available for a couple of compilers (CCES from Analog Devices and Embedded Workbench from IAR).  TLS requires that you enable this feature by setting the TLS table size (see the MicroC/OS-II user’s manual) through the #define OS_TLS_TBL_SIZE and, if defined, must be greater than 0.

 

TLS is mandatory if you use non-reentrant library functions that are not protected by either a mutex or a semaphore. Forexamplethe‘strtok()’ function needs to keep a copy of a pointer forfurtherinvocationsofstrtok().  This local pointer is now saved as part of the TLS management when TLS is enabled and thus does not require that you protect the non-reentrant code with a mutex or a semaphore.

 

1)  A number of ‘internal’ functions have been added to support TLS.  However, as the user, you only need to:

  1. Include ‘os_tls.c’ in your build
  2. Set the value of OS_TLS_TBL_SIZE to a size sufficiently large as required by the tool vendor support by this TLS implementation. 
  3. Enable semaphores (set OS_SEM_EN to 1 in os_cfg.h).

V2.92.07

Releasedate:2010/09/20

This is a minor release as it contains only a few items that were not caught prior to releasing V2.92.

ADDED FEATURES

1) Added OSTaskRegGetID() which allows your application to obtain a task register dynamically (i.e. at run-time) instead of using #define to set task register IDs. It’s important that you either use ‘dynamic task register ID allocation’ or ‘static register ID allocation’ but not both.  The preferred method is to use OSTaskRegGetID() throughout your code.

2)  Added #define MICRIUM_SOURCE to all the .C files to identify that the files contain Micrium source files.

3)  Version numbering now contains 3 fields: X.YY.ZZ where X is the version of the kernel (μC/OS-II is 2), YY is the major release number (92) and ZZ is a minor release number (07).  Calling OSVersion() will return the version number multiplied by 10000.  In other words, V2.92.07 will be returned as 29207.

CHANGES

1)        OS_CORE.C:

            In OSSchedUnlock(), moved the test to check if called from an ISR before the test of the lock nesting level.

2)        OS_FLAG.C:

            Added ‘pend_stat’ to OS_FlagTaskRdy() to allow OSFlagDel() to returns OS_ERR_PEND_ABORT when called with the OS_DEL_ALWAYS option.

3)        OS_MBOX.C:

            OSMboxDel() now returns OS_ERR_PEND_ABORT when called with the OS_DEL_ALWAYS option.

4)        OS_MUTEX.C:

            Changed PIP to PCP to reflect that the mutex services implement a ‘Priority Ceiling Protocol’ instead of a ‘Priority Inheritance Protocol’.

            Added an option to OSMutexCreate() to allow to disable the priority ceiling protocol making the mutex behave like a plain binary semaphore.  This is done by specifying ‘OS_PRIO_MUTEX_CEIL_DIS’ for the ‘prio’ argument.

5)        OS_Q.C:

            OSQDel() now returns OS_ERR_PEND_ABORT when called with the OS_DEL_ALWAYS option.

6)        OS_SEM.C:

            OSSemDel() now returns OS_ERR_PEND_ABORT when called with the OS_DEL_ALWAYS option.

7)        OS_TASK.C:

Added OSTaskRegGetID() to dynamically assign task IDs instead of assigning task IDs statically through #define constants.  It’s important that you either use ‘dynamic task register ID allocation’ or ‘static register ID allocation’ but not both.  The preferred method is to use OSTaskRegGetID() throughout your code.

 

You now need to allocate an INT8U variable for each task register IDs and use those variables to specify the desired task register.  In other words:

 

INT8U  MyTaskRegID;

:

:

    MyTaskRegID = OSTaskRegGetID(&err);

:

:

7)        uCOS_II.H:

            Added OS_PRIO_MUTEX_CEIL_DIS

Changed OS_ERR_PIP_LOWER to OS_ERR_PCP_LOWER

Added OS_ERR_NO_MORE_ID_AVAIL

Changed OSMutexPIP to OSMutexPCP in the OS_MUTEX_DATA structure.

Added the variable OSTaskRegNextAvailID

Added the prototype for OSTaskRegGetID()

V2.92

Releasedate:2010/09/20

This is a minor release as it contains only a few items that were not caught prior to releasing V2.90.

CHANGES

1)        OS_TASK.C:

            Corrected error description in OSTaskCreateExt() and OSTaskCreate() for return error OS_ERR_PRIO_EXIST.

2)        OS_TASK.C:

            Added safety critical check for ‘perr’ argument in OSTaskRegGet() and OSTaskRegSet().

3)        OS_TASK.C:

            Changed OSTaskStkChk() to return used/free stack space in number of entries.

4)        OS_TMR.C:

            Overwrite timer name to ‘?’ if a NULL ‘pname’ argument is passed to OSTmrCreate() to prevent statistics and kernel awareness to try to de-reference a NULL pointer.

5)        OS_CORE.C:

            Added extended argument check for NULL pointer passed to OS_StrLen().

6)        OS_CORE.C:

            Corrected comment on OS_TaskStatStkChk() to reflect used stack space stored in number of entries.

7)        uCOS_II.H:

            Corrected comment on OS_STK_DATA to reflect used/free stack space in number of entries.

8)        All Files:

            Added return statements following all OS_SAFETY_CRITICAL_EXCEPTION() macros to allow custom implementation to continue execution.

V2.90

Releasedate:2010/05/18

This is a minor release as it contains only a few items that were not caught prior to releasing V2.89.

CHANGES

1)        OS_CORE.C:

            Added OSSafetyCriticalStart() to indicate that all initialization has been completed and that kernel objects are no longer allowed to be created.

2)        All Files:

            Modified the source code to reduce the number of MISRA-C 2004 rules not respected:

                   8.5 - there shall be no definition of objects or functions in a header file

                 14.7 - a function should have a single point of exit

                 15.2 - every non-empty case clause in a switch statement shall be terminated
with a break statement

                 15.4 - only one case - a switch expression should not represent a Boolean value

                 17.4 - array indexing shall only be applied to objects defined as an array type

                 17.4 - pointer arithmetic should not be used

3)        uCOS_II.H:

            Corrected compilation error when OS_EVENT_EN is disabled and OS_FLAG_EN is enabled.

4)        OS_FLAG.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSFlagCreate().

5)        OS_MBOX.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSMboxCreate().

6)        OS_MEM.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSMemCreate().

7)        OS_MUTEX.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSMutexCreate().

8)        OS_Q.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSQCreate().

9)        OS_SEM.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSSemCreate().

10)      OS_TASK.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSTaskCreateExt() and OSTaskCreate().

11)      OS_TMR.C:

            Replaced safety critical test to check OSSafetyCriticalStartFlag set by OSSafetyCriticalStart() on OSTmrCreate().

V2.89

Releasedate:2009/06/09

This is a minor release as it contains only a few items that were not caught prior to releasing V2.88.

CHANGES

1)        All Files:

            Added ‘u’ as a suffix to all constant values to denote that these numbers are unsigned.  This was done to satisfy one of the MISRA-C:2004 rules.

            Added cast to (INT8U *) for all constants strings.

2)        OS_CORE.C:

            The ‘pname’ argument of OSEventNameGet() needed to be a ‘**pname’ instead of ‘*pname’.

            If OS_TASK_SUSPEND_EN is not set to 0 then OS_TaskStat() will call OSTimeDly(OS_TICKS_PER_SEC) if OSIdleCtrMax is zero.

3)        OS_MEM.C:

            The ‘pname’ argument of OSMemNameGet() needed to be a ‘**pname’ instead of ‘*pname’.

4)        OS_MUTEX.C:

            Needed to set OSPrioCur to ‘prio’ in internal function OSMutex_RdyAtPrio().

5)        OS_TASK.C:

            The ‘pname’ argument of OSTaskNameGet() needed to be a ‘**pname’ instead of ‘*pname’.

            Added OS_TaskReturn() to catch tasks from returning without deleting themselves.  This function requires that a newhookfunctionbedeclared: OSTaskReturnHook().

6)        OS_TASK.C:

            The ‘pname’ argument of OSTaskNameGet() needed to be a ‘**pname’ instead of ‘*pname’.

V2.88

Releasedate:2009/01/21

This is a minor release as it contains only a few items that were not caught prior to releasing V2.87.

CHANGES

1)        OS_CORE.C:

            OSIntExit() and OS_Sched() have changed slightly because of a boundary condition found with the Cortex-M3 port. Specifically, we needed to move the statement:

OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy];

Before testing for the priority.

2)        uCOS_II.H:

            The function prototype for OSEventPendMulti() incorrectly declared the timeout as an INT16U instead of an INT32U since we changed all time delays and timeouts to nowuse32-bit values.

3)        All Files:

            Changed the way functions are declared to be consistent with the prototypes in ucos_ii.h.

V2.87

Releasedate:2009/01/07

This is a major release as it contains changes to some of the elements of data structures as well as #define configuration constants.  Also, some of the functionality has changed but this should not have any significant impact.

If you are using a Kernel Awareness plug-in for some of the debuggers, you will need to obtain a newer version of the Kernel Awareness plug-in which is compatible with V2.87 or higher. This is because ASCII strings for names are now referenced by using a pointer instead of storing the ASCII name in the kernel object.

UPGRADING TO V2.87

You should follow these steps in order to upgrade from a previous version to V2.87.

1)        OS_CFG.H:

            You no longer need to specify the ‘size’ of ASCII strings used for names.  That’s because we now store a pointer to the name instead of actually allocating storage for it in the corresponding kernel object.  This was done to significantly reduce the amount of RAM needed in your application.  You will need to enable this feature.  Follow the following table:

This #define …

Changed to

OS_EVENT_NAME_SIZE

OS_EVENT_NAME_EN

OS_TASK_NAME_SIZE

OS_TASK_NAME_EN

OS_FLAG_NAME_SIZE

OS_FLAG_NAME_EN

OS_MEM_NAME_SIZE

OS_MEM_NAME_EN

OS_TMR_CFG_NAME_SIZE

OS_TMR_CFG_NAME_EN

 

            The new value of these #defines are either 0 (to disable naming the object) or 1 (to enable naming the object).

2)        OS_TIME.C:

            OSTimeDly() now accepts a 32-bit argument instead of a 16-bit argument.  This was done to allow longer time delays and also to simplify OSTimeDlyHMSM().  In most cases, you will not need to change anything in your code.

3)        OS_CORE.C:

            OS_StrCopy() has been eliminated since it’s no longer used by μC/OS-II.  You should not have been using this function in your code since it was meant to be an internal function.  This change should thus not cause any problem.

4)        OS_CORE.C:

            Added task specific registers.  You can have as many as OS_TASK_REG_TBL_SIZE 32-bit unsigned registers for each task.  These registers ARE NOT the same as the CPU registers; they are more like task specific variables.  These ‘registers’ are typically used for such things as ‘error codes’ (orerrno in other operating systems).  You can also communicate information to tasks via these registers.

5)        OS_MBOX.C:

            Timeouts on OSMboxPend() are now 32-bit values.

6)        OS_MUTEX.C:

            Timeouts on OSMutexPend() are now 32-bit values.

7)        OS_Q.C:

            Timeouts on OSQPend() are now 32-bit values.

8)        OS_SEM.C:

            Timeouts on OSSemPend() are now 32-bit values.

9)        OS_TASK.C:

            You can set and get task registers (see item 4 above) by calling OSTaskRegSet() and OSTaskRegGet(), respectively.  Again, task registers ARE NOT the same as CPU registers.

10)      OS_TMR.C:

            OSTmr_Lock() and OSTmr_Unlock() have been replaced with OSSchedLock() and OSSchedUnlock(), respectively.  Now, timers no longer need to rely on semaphores being available.  Also, this allows you to call other timer services from the timer callback.

V2.86

Releasedate:2007/09/12

This is a major release as it contains a new feature called ‘Multi-Pend’ (implemented in OSEventPendMulti()) whichallowsatasktopendonmultipleobjects(semaphores, mailboxes or queues).  If any one of those objects is posted to, the function returns and indicates which (or all) events posted. 

Multi-pend is the only feature added in this version and a number of changesthroughoutthecodehasbeenimplementedinorder to support this new feature.

Details on how to use OSEventPendMulti() can be found in the μC/OS-II reference manual.

UPGRADING TO V2.86

You should follow these steps in order to upgrade from a previous version to V2.86.  Even though only Multi-Pend was added in V2.86, some of the items below are repeated from previous versions because they are important to follow. 

1)        Timer Manager:

            Timers MUST now be created by OSTmrCreate() before they can be used.  In V2.82, a timer was created and started when you called OSTmrStart().  Now you MUST call OSTmrCreate() and then OSTmrStart() to create and start the timer, respectively.

            It is now your responsibility to delete a timer when it is no longer being used.

            The Timer Manager user-available functions are now:

     OSTmrCreate()

     OSTmrDel()

     OSTmrNameGet()

     OSTmrRemainGet()

     OSTmrStart()

     OSTmrStop()

            To create and start a timer, you need to call OSTmrCreate() and then OSTmrStart().  When you are done using a timer, you can delete it by calling OSTmrDel().

2)        TRUE and FALSE changed to OS_TRUE and OS_FALSE:

            μC/OS-II now uses and returns OS_TRUE and OS_FALSE instead of TRUE and FALSE.  If you were using TRUE and FALSE in your application you will either need to define TRUE and FALSE yourself or change those to OS_TRUE and OS_FALSE.

3)        Create APP_CFG.H:

            As of V2.81, you need to create a file called APP_CFG.H which would reside in your project.  APP_CFG.H is used to hold configuration information about your project.  Specifically, we expect that you place task priorities, task stack sizes and other application related configuration information.  The following page shows an example of the contents of APP_CFG.H.

4)        Include OS_TMR.C in your project:

            As of V2.81, you need to include OS_TMR.C in your builds in order to obtain the new services provided in OS_TMR.C and avoid compiler warnings/errors.

5)        New #defines are needed in OS_CFG.H:

            You will need to include the following #defines (they are found in OS_CFG_R.H, the reference file for OS_CFG.H).  See also the configuration manual:

     OS_APP_HOOKS_EN

     OS_EVENT_MULTI_EN

     OS_TMR_EN

     OS_TMR_CFG_MAX

     OS_TMR_CFG_NAME_SIZE

     OS_TMR_CFG_WHEEL_SIZE

     OS_TMR_CFG_WHEEL_SIZE

     OS_MBOX_PEND_ABORT_EN

     OS_Q_PEND_ABORT_EN
OS_SEM_PEND_ABORT_EN

6)        Add OS_TASK_TMR_STK_SIZE:

            If you use the timer manager, you will need to define the size of the timer task stack, i.e. OS_TASK_TMR_STK_SIZE.  This is declared in your project’s OS_CFG.H.

7)        Add OS_TASK_TMR_PRIO:

            If you use the timer manager, you will need to define the priority of the timer manager task, i.e. OS_TASK_TMR_PRIO.  This is declared in your project’s APP_CFG.H.

8)        Place prototypes in OS_CPU.H:

            As of V2.81, it’s IMPORTANT that you place the prototypes for OSCtxSw(), OSIntCtxSw() and OSStartHighRdy() in OS_CPU.H.  Typically, these functions would be prototyped as follows but, depending on the compiler, they may need to be different:

void  OSStartHighRdy(void);

void  OSIntCtxSw(void);

void  OSCtxSw(void);

9)        Start using OS_ERR_??? as error return values:

We recommend that you start using the new #define constants for error return values.  All error return values start with OS_ERR_ for consistency.

10)      OS????NameGet() and OS????NameSet() not callable from ISRs:

Since OS????NameGet() and OS????NameSet() can no longer be called from ISRs, make sure your code didn’t make use of those in ISRs.

11)      OSMutexAccept() returns a BOOLEAN:

Since OSMutexAccept() now returns a BOOLEAN make sure you change your code accordingly.

CHANGES

os_core.c

OSEventPendMulti() was added.

Optimized OS_EventTaskRdy() and added support for multi-pend.

Optimized OS_EventTaskWait().

Removed OS_EventTOAbort() and added OS_EventTaskWaitMulti(), OS_EventTaskRemove() and OS_EventTaskRemoveMulti().

Optimized OS_TaskStat().

os_mbox.c

Rearranged OSMboxPend() to support multi-pend.

os_mutex.c

Rearranged OSMutexPend() for consistency.

os_q.c

Rearranged OSQPend() to support multi-pend.

os_sem.c

Rearranged OSSemPend() to support multi-pend.

os_task.c

Made cosmetic changes to OSTaskChangePrio() and added support for multi-pend.

Added support for multi-pend in OSTaskDel().

ucos_ii.h

            Added support for multi-pend.  

以上是关于µC/OS-II Release Notes的主要内容,如果未能解决你的问题,请参考以下文章

μC/OS-II 信号量集

μC/OS-II中使用软件定时器

μC/OS-II的实验内容简介

μC/OS-II 创建一个任务的流程

μC/OS-II 任务的同步与通信 --- 消息队列

大数据篇:DolphinScheduler-1.2.0.release安装部署