Freescale MQX™ RTOS Reference Manual

Freescale MQX™ RTOS Reference Manual

Freescale MQX™ RTOS Reference Manual Document Number: MQXRM Rev. 0 1/2009 How to Reach Us: Home Page: www.freescale.com E-mail: [email protected] USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, CH370 1300 N. Alma School Road Chandler, Arizona 85224 +1-800-521-6274 or +1-480-768-2130 [email protected] Europe, Middle East, and Africa: Information in this document is provided solely to enable system and Freescale Halbleiter Deutschland GmbH software implementers to use Freescale Semiconductor products. There are Technical Information Center no express or implied copyright licenses granted hereunder to design or Schatzbogen 7 fabricate any integrated circuits or integrated circuits based on the 81829 Muenchen, Germany information in this document. +44 1296 380 456 (English) +46 8 52200080 (English) Freescale Semiconductor reserves the right to make changes without further +49 89 92103 559 (German) notice to any products herein. Freescale Semiconductor makes no warranty, +33 1 69 35 48 48 (French) representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability [email protected] arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or Japan: incidental damages. “Typical” parameters that may be provided in Freescale Freescale Semiconductor Japan Ltd. Semiconductor data sheets and/or specifications can and do vary in different Headquarters applications and actual performance may vary over time. All operating ARCO Tower 15F parameters, including “Typicals”, must be validated for each customer application by customer’s technical experts. Freescale Semiconductor does 1-8-1, Shimo-Meguro, Meguro-ku, not convey any license under its patent rights nor the rights of others. Tokyo 153-0064, Japan Freescale Semiconductor products are not designed, intended, or authorized 0120 191014 or +81 3 5437 9125 for use as components in systems intended for surgical implant into the body, [email protected] or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could Asia/Pacific: create a situation where personal injury or death may occur. Should Buyer Freescale Semiconductor Hong Kong Ltd. purchase or use Freescale Semiconductor products for any such unintended Technical Information Center or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and 2 Dai King Street distributors harmless against all claims, costs, damages, and expenses, and Tai Po Industrial Estate reasonable attorney fees arising out of, directly or indirectly, any claim of Tai Po, N.T., Hong Kong personal injury or death associated with such unintended or unauthorized +800 26668334 use, even if such claim alleges that Freescale Semiconductor was negligent [email protected] regarding the design or manufacture of the part. For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado 80217 1-800-441-2447 or 303-675-2140 Fax: 303-675-2150 Freescale™ and the Freescale logo are trademarks of Freescale [email protected] Semiconductor, Inc. ARC, the ARC logo, ARCangel, ARCform, ARChitect, ARCompact, ARCtangent, BlueForm, CASSEIA, High C/C++, High C++, [email protected] iCon186, MetaDeveloper, MQX, Precise Solution, Precise/BlazeNet, Precise/EDS, Precise/MFS, Precise/MQX, Precise/MQX Test Suites, Precise/RTCS, RTCS, SeeCode, TotalCore, Turbo186, Turbo86, V8 µ RISC, V8 microRISC, and VAutomation are trademarks of ARC International. High C and MetaWare are registered under ARC International. All other product or service names are the property of their respective owners. © 1989, 1992, 1994, 1996, 1998–1999, 2001–2005 ARC™ International. All rights reserved. © Freescale Semiconductor, Inc. 2009. All rights reserved. Document Number: MQXRM Rev. 0 1/2009 Chapter 1 Before you begin 1.1 About MQX The MQX™ real-time operating system has been designed for uniprocessor, multiprocessor, and distributed-processor embedded real-time systems. MQX is a runtime library of functions that programs use to become real-time multitasking applications. The main features are its scalable size, component-oriented architecture, and ease of use. MQX supports multiprocessor applications and can be used with flexible embedded I/O products for networking, data communications, and file management. Throughout this book, we use MQX as the short name for MQX. 1.2 About this book This book contains alphabetical listings of MQX function prototypes and alphabetical listings of data type definitions. Use this book in conjunction with MQX User’s Guide, which covers the following general topics: • MQX at a glance • using MQX • rebuilding MQX • developing a new BSP • frequently asked questions • glossary of terms As well, you might want to refer to: • Getting Stared with MetaDeveloper—describes how to install the MetaDeveloper™ integrated embedded-development platform from MQX Embedded, verify your setup, and create MQX applications. • MQX Host Tools User’s Guide—describes how to use MetaDeveloper plugins, including the Design Tool rapid-prototyping tool, the MQX Builder user-configurable MQX-porting tool (for ARCtangent processors only), the Performance Tool analyzer, the MQX™ EDS™ Client remote monitoring tool, and Task Aware Debug for SeeCode™ and other debuggers. Freescale MQX™ Reference Manual, Rev. 0 Freescale Semiconductor 3 Before you begin 1.3 Conventions Tips Tips point out useful information. TIP The most efficient way to allocate a message from an ISR is to use _msg_alloc(). Notes Notes point out important information. NOTE Non-strict semaphores do not have priority inheritance. Cautions Cautions tell you about commands or procedures that could have unexpected or undesirable side effects or could be dangerous to your files or your hardware. CAUTION If you modify MQX data types, some MQX™ Host Tools from MQX Embedded might not operate properly. Freescale MQX™ Reference Manual, Rev. 0 4 Freescale Semiconductor Chapter 2 MQX functions and macros Component Prefix Cache-control macros for data cache _DCACHE_ Cache-control macros for instruction cache _ICACHE_ EDS Server _eds_ Endian conversion macros MSG_ Events _event_ Interprocessor communication _ipc_ Interrupt handling _int_ Kernel log _klog_ Lightweight events _lwevent_ Lightweight logs _lwlog_ Lightweight memory with variable-size blocks _lwmem_ Lightweight semaphores _lwsem_ Logs (user logs) _log_ Memory with fixed-size blocks (partitions) _partition_ Memory with variable-size blocks _mem_ Messages _msg_ _msgpool_ _msgq_ Miscellaneous _mqx_ MMU and virtual memory control _mmu_ Mutexes _mutatr_ _mutex_ Names _name_ Partitions _partition_ Queues _queue_ Scheduling _sched_ Semaphores _sem_ String functions _str Task management _task_ Task queues _taskq_ Freescale MQX™ Reference Manual, Rev. 0 Freescale Semiconductor 5 MQX functions and macros Timers _timer_ Timing _time_ Virtual memory control _mmu_ Watchdogs _watchdog 2.1 How to read prototype definitions As you read this chapter, use the following example as a guide. Freescale MQX™ Reference Manual, Rev. 0 6 Freescale Semiconductor MQX functions and macros example_function A short description of what example_function() does. Synopsis return_type example_function( type_1 parameter_1, ... type_n parameter_n) Parameters parameter_1 [IN, OUT, or IN/OUT] Short description of parameter_1 ... ... ... Returns • Return value (success) • Return value (failure) now is the time for all good men to come to the Traits Any of the following that might apply for the function: • it blocks, or conditions under which it might block • it must be started as a task • it creates a task • it disables and enables interrupts • pre-conditions that might not be obvious • any other restrictions or special behavior See also • For functions that are listed, see descriptions in this chapter • For data types that are listed, see “Chapter 3, “MQX data types.” Description Any pertinent information that is not specified in the preceding table or short description. Freescale MQX™ Reference Manual, Rev. 0 Freescale Semiconductor 7 MQX functions and macros _DCACHE_DISABLE If the PSP supports disabling the data cache, the macro calls a PSP-specific function to do so. Synopsis source\psp\cpu_family\cpu.h #include <psp.h> _DCACHE_DISABLE(void) Parameters — Returns — Traits — See also _DCACHE_ENABLE Freescale MQX™ Reference Manual, Rev. 0 8 Freescale Semiconductor MQX functions and macros _DCACHE_ENABLE If the PSP supports enabling the data cache, the macro calls a PSP-specific function to do so. Synopsis source\psp\cpu_family\cpu.h #include <psp.h> _DCACHE_ENABLE( uint_32 flags) Parameters flags [IN] CPU-type-specific flags that the processor needs to enable its data cache Returns — Traits — See also _DCACHE_DISABLE Freescale MQX™ Reference Manual, Rev. 0 Freescale Semiconductor 9 MQX functions and macros _DCACHE_FLUSH If the PSP supports flushing the data cache, the macro calls a PSP-specific function to do so. Synopsis source\psp\cpu_family\cpu.h #include <psp.h> _DCACHE_FLUSH(void) Parameters — Returns — Traits — See also _DCACHE_FLUSH_LINE, _DCACHE_FLUSH_MLINES Description The macro flushes the entire data cache.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    438 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us