BIOS v6.33 Real-time Operating System User's Guide (Rev. K)(5)

北有孤酒 分享 2022-05-09 下载文档

overview.

SYS/BIOS provides the following benefits:

?

All SYS/BIOS objects can be configured statically or dynamically. ?

To minimize memory size, the APIs are modularized so that only those APIs that are used by the program need to be bound into the executable program. In addition, statically-configured objects reduce code size by eliminating the need to include object creation calls.?

Error checking and debug instrumentation is configurable and can be completely removed from production code versions to maximize performance and minimize memory size.?

Almost all system calls provide deterministic performance to enable applications to reliably meet real-time deadlines.?

To improve performance, instrumentation data (such as logs and traces) is formatted on the host.?

The threading model provides thread types for a variety of situations. Hardware interrupts, software interrupts, tasks, idle functions, and periodic functions are all supported. You can control the priorities and blocking characteristics of threads through your choice of thread types.?

Structures to support communication and synchronization between threads are provided. These include semaphores, mailboxes, events, gates, and variable-length messaging.?

Dynamic memory management services offering both variable-sized and fixed-sized block allocation.?

An interrupt dispatcher handles low-level context save/restore operations and enables interrupt service routines to be written entirely in C.

?System services support the enabling/disabling of interrupts and the plugging of interrupt vectors,

including multiplexing interrupt vectors onto multiple sources.

1.2How is SYS/BIOS Different from DSP/BIOS?

This book describes SYS/BIOS 6.x, a release that introduced significant changes from DSP/BIOS 5.x. If you have used previous versions, you will encounter these major changes to basic functionality:

?

The name DSP/BIOS has been changed to SYS/BIOS to reflect the fact that it can be used on processors other than DSPs.?

SYS/BIOS uses the configuration technology in XDCtools. For more information, see Section 1.3 of this book.

?The APIs have changed. A compatibility layer ensures that DSP/BIOS 5.4x or earlier applications will

work unmodified. However, note that the PIP module is no longer supported. For details, see the

Migrating a DSP/BIOS 5 Application to SYS/BIOS 6 (SPRAAS7A) application note.

In addition, significant enhancements have been made in the areas that include the following:

?Up to 32 priority levels are available for both tasks and software interrupt (Swi) threads.

SPRUEX3K—December 2011About SYS/BIOS 13Submit Documentation Feedback 9f752a73f46527d3240ce0a5

How are SYS/BIOS and XDCtools Related?

?

A new timer module is provided that enables applications to configure and use timers directly rather than have time-driven events limited to using the system tick.?

All kernel objects may be created statically or dynamically.?

An additional heap manager, called HeapMultiBuf, enables fast, deterministic variable-sized memory allocation performance that does not degrade regardless of memory fragmentation.?

A more flexible memory manager supports the use of multiple, concurrent heaps and enables developers to easily add custom heaps.?

A new Event object enables tasks to pend on multiple events, including semaphores, mailboxes, message queues, and user-defined events.?

An additional Gate object supports priority inheritance.?

Hook functions are supported for hardware and software interrupt objects as well as tasks.?

An option is provided to build the operating system with parameter checking APIs that assert if invalid parameter values are passed to a system call.

? A standardized method allows SYS/BIOS APIs to handle errors, based on an error block approach.

This enables errors to be handled efficiently without requiring the application to catch return codes.

In addition, you can easily have the application halted whenever a SYS/BIOS error occurs, because

all errors now pass through a single handler.

?The system log and execution graph in the Real-Time Analysis (RTA) tools support both dynamically

and statically-created tasks.

?More powerful logging functions include a timestamp, up to 6 words per log entry, and the ability for

logging events to span more than one log if additional storage is required.

?

Per-task CPU load is now supported in addition to total CPU load.1.3How are SYS/BIOS and XDCtools Related?

XDCtools is a separate software component provided by Texas Instruments that provides the underlying tooling needed by SYS/BIOS. You must have both XDCtools and SYS/BIOS installed in order to use SYS/BIOS. The SYS/BIOS release notes in the top-level SYS/BIOS installation directory provide

information about the versions of XDCtools that are compatible with your version of SYS/BIOS. Typically, when you install a new version of SYS/BIOS, you will also need to install a new version of XDCtools.XDCtools is important to SYS/BIOS users because:

?

XDCtools provides the technology that users use to configure the SYS/BIOS and XDCtools modules used by the application. See Section 1.3.2.?

XDCtools provides the tools used to build the configuration file. This build step generates source code files that are then compiled and linked with your application code. See Section 1.3.2.

?XDCtools provides a number of modules and runtime APIs that SYS/BIOS leverages for memory

allocation, logging, system control, and more. See Section 1.3.3.

XDCtools is sometimes referred to as "RTSC" (pronounced "rit-see"—Real Time Software Components), which is the name for the open-source project within the 9f752a73f46527d3240ce0a5 ecosystem for providing reusable software components (called "packages") for use in embedded systems. For documentation about

XDCtools modules, see the online help within CCS. For information about packaging of reusable

software components and details about the tooling portion of XDCtools, see the RTSC-pedia web site .

14About SYS/BIOS SPRUEX3K—December 2011Submit Documentation Feedback How are SYS/BIOS and XDCtools Related?

9f752a73f46527d3240ce0a5

1.3.1SYS/BIOS as a Set of Packages

SYS/BIOS and XDCtools are sets of "packages," each of which delivers a subset of the product's

functionality. XDCtools uses a naming convention for packages to aid readability and to ensure that

packages delivered from different sources don't have namespace collisions that will pose problems for the system integrator. If you are familiar with the Java package naming convention, you will find it to be quite similar.

SYS/BIOS packages conform to this convention with names that consist of a hierarchical naming pattern; each level is separated by a period ("."). Usually, the highest level of the name is the vendor ("ti"), followed by the product ("sysbios"), and then followed by the module and submodule names (for example, "knl").These names have the added benefit of reflecting the physical layout of the package within the file system where SYS/BIOS has been installed. For example, the ti.sysbios.knl package files can be found in the following folder:

See Section 1.4 for a partial list of the packages provided by SYS/BIOS and Section 1.3.3 for a partial list of the modules provided by XDCtools.

You can picture the architecture of the tools used to create applications as shown in the following figure. The xdc.runtime package provided by XDCtools contains modules and APIs your application can use along with the modules and APIs in SYS/BIOS.BIOS_INSTALL_DIR\bios_6_3#_##\packages\ti\sysbios\knl

SPRUEX3K—December 2011About SYS/BIOS 15Submit Documentation Feedback 9f752a73f46527d3240ce0a5

How are SYS/BIOS and XDCtools Related?

1.3.2Configuring SYS/BIOS Using XDCtools

Configuration is an essential part of using SYS/BIOS and is used for the following purposes:

?

It specifies the modules and packages that will be used by the application.?

It can statically create objects for the modules that are used by the application. ?

It validates the set of modules used explicitly and implicitly to make sure they are compatible.

?It statically sets parameters for the system, modules, and objects to change their runtime behavior.

An application's configuration is stored in one or more script files with a file extension of *.cfg. These are parsed by XDCtools to generate corresponding C source code, C header, and linker command files that are then compiled and linked into the end application. The following diagram depicts a build flow for a typical SYS/BIOS application.

The configuration .cfg file uses simple JavaScript syntax to set properties and call methods provided by objects. The combination of JavaScript and the script objects provided by XDCtools is referred to as an XDCscript.

You can create and modify a configuration file in two different ways:

?

Writing the textual .cfg file directly with a text editor or the XDCscript Editor in CCS.

?

Using the visual configuration tool (XGCONF) embedded in CCS.

16About SYS/BIOS SPRUEX3K—December 2011Submit Documentation Feedback How are SYS/BIOS and XDCtools Related?

9f752a73f46527d3240ce0a5

The following figure shows the XGCONF configuration tool in CCS being used to configure a static

SYS/BIOS Task instance. You can see this configuration for yourself in the "Static Example" SYS/BIOS project template in CCS. See Section 2.1 for how to create a CCS project using a SYS/BIOS template.The Task instance named "task0" set up in the configuration tool corresponds to the following XDCscript code:var Task = 9f752a73f46527d3240ce0a5eModule('ti.sysbios.knl.Task');Task.numPriorities = 16;

Task.idleTaskStackSize = 1024;var tskParams = new Task.Params;

BIOS v6.33 Real-time Operating System User's Guide (Rev. K)(5).doc 将本文的Word文档下载到电脑

下一篇:pep四年级下册英语期中测试卷-最新精品

相关推荐
相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7 元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xxxxxx QQ:xxxxxx