diff --git a/.gitignore b/.gitignore
index f73e2846..60e0b71c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
*.lib
*.a
*.elf
+*.err
*.hex
*.exe
*.EXE
@@ -19,9 +20,23 @@
*.tmp
*.log
*.chm
+*.zip
+*.ncb
+*.suo
+*.chw
+*.sfr
+*.user
*.avrsuo
+*.Debug
+*.Release
+lint*.out
+*.Miro
+*.bak
+3rd_party/
+doc/
test/
+test_ports/
dbg/
rel/
spy/
diff --git a/COPYING b/COPYING
index bd5c0db4..7f5624b3 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+Copyright (C) Quantum Leaps, LLC. All rights reserved.
This program is open source software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
@@ -21,6 +21,5 @@ along with this program. If not, see .
Contact information:
--------------------
-Quantum Leaps Web sites: http://www.quantum-leaps.com
- http://www.state-machine.com
-e-mail: info@quantum-leaps.com
+Web: http://www.state-machine.com
+Email: info@state-machine.com
diff --git a/GPL.txt b/GPL.txt
index 94a9ed02..818433ec 100644
--- a/GPL.txt
+++ b/GPL.txt
@@ -1,674 +1,674 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/README.txt b/README.txt
new file mode 100644
index 00000000..e762960f
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,73 @@
+About AP/C
+==========
+QP/C (Quantum Platform in C) is a lightweight, open source software framework
+for building responsive and modular real-time embedded applications as
+systems of cooperating, event-driven active objects (actors). The QP/C
+framework is a member of a larger family consisting of QP/C, QP/C++, and
+QP-nano frameworks, which are all strictly quality controlled, thoroughly
+documented, and commercially licensable.
+
+All QP frameworks can run on bare-metal single-chip microcontrollers,
+completely replacing a traditional Real-Time Operating System (RTOS).
+Ports and ready-to-use examples are provided for major CPU families.
+
+QP/C can also work with many traditional RTOSes and desktop OSes (such as
+Windows, Linux including embedded Linux).
+
+The behavior of active objects is specified in QP by means of hierarchical
+state machines (UML statecharts). The frameworks support manual coding of
+UML state machines in C or C++ as well as fully automatic code generation
+by means of the free graphical QM modeling tool.
+
+The QP frameworks are used in millions of products worldwide in aerospace,
+medical devices, consumer electronics, wired and wireless telecommunications,
+industrial automation, transportation, robotics, and many more. The QP
+frameworks and the QM modeling tool receive over 40,000 downloads a year.
+
+The book, Practical UML Statecharts in C/C++, 2nd Edition provides a detailed
+design study of the QP frameworks and explains all the related concepts.
+
+***
+NOTE: For more information about QP/C, please visit:
+http://www.state-machine.com/qp/qpc
+****
+
+
+Licensing QP/C
+==============
+QP/C is licensed under the increasingly popular dual licensing model, in
+which both the open source software distribution mechanism and traditional
+closed source software distribution models are combined.
+
+Note
+If your company has a policy forbidding open source in your product, all
+QP frameworks can be licensed commercially, in which case you don't use any
+open source license and you do not violate your policy.
+
+Open Source Projects:
+--------------------
+If you are developing and distributing open source applications under the
+GNU General Public License (GPL), as published by the Free Software
+Foundation, then you are free to use the Quantum Leaps software under the
+GPL version 3 of the License, or (at your option) any later version. Please
+note that GPL requires that all modifications to the original code as well
+as your application code (Derivative Works as defined in the Copyright Law)
+must also be released under the terms of the GPL open source license.
+
+Closed Source Projects:
+-----------------------
+If you are developing and distributing traditional closed source
+applications, you can purchase one of Quantum Leaps commercial licenses,
+which are specifically designed for users interested in retaining the
+proprietary status of their code. All Quantum Leaps commercial licenses
+expressly supersede the GPL open source license. This means that when you
+license Quantum Leaps software under a commercial license, you specifically
+do not use the software under the open source license and therefore you are
+not subject to any of its terms.
+
+
+Contact Information:
+====================
+Quantum Leaps, LLC
+Web: www.state-machine.com
+Email: info@state-machine.com
diff --git a/README.url b/README.url
new file mode 100644
index 00000000..98097fde
--- /dev/null
+++ b/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/index.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile
index ae0941c1..89a8df9e 100644
--- a/doxygen/Doxyfile
+++ b/doxygen/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.5
+# Doxyfile 1.8.9.1
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@@ -17,53 +17,6 @@
# Project related configuration options
#---------------------------------------------------------------------------
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use + S
-# (what the is depends on the OS and browser, but it is typically
-# , /
" \
+ "description=\par Description\n" \
+ "hint=\par Hint\n" \
"usage=@par Usage\n"
# This tag can be used to specify a number of word-keyword mappings (TCL only).
@@ -283,7 +246,7 @@ TCL_SUBST =
# members will be omitted, etc.
# The default value is: NO.
-OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_FOR_C = NO
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
@@ -310,11 +273,14 @@ OPTIMIZE_OUTPUT_VHDL = NO
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
#
-# Note For files without extension you can use no_extension as a placeholder.
+# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
@@ -333,8 +299,8 @@ MARKDOWN_SUPPORT = YES
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
# The default value is: YES.
AUTOLINK_SUPPORT = YES
@@ -374,7 +340,7 @@ SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# The default value is: NO.
@@ -439,7 +405,7 @@ LOOKUP_CACHE_SIZE = 0
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
# documentation are documented, even if no documentation was available. Private
# class members and static file members will be hidden unless the
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
@@ -449,35 +415,35 @@ LOOKUP_CACHE_SIZE = 0
EXTRACT_ALL = NO
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = NO
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
EXTRACT_PACKAGE = NO
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
# included in the documentation.
# The default value is: NO.
EXTRACT_STATIC = YES
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
# only classes defined in header files are included. Does not have any effect
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local methods,
+# This flag is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
# included.
# The default value is: NO.
@@ -502,21 +468,21 @@ HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
+# (class|struct|union) declarations. If set to NO, these declarations will be
# included in the documentation.
# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
+# documentation blocks found inside the body of a function. If set to NO, these
# blocks will be appended to the function's detailed documentation block.
# The default value is: NO.
@@ -530,7 +496,7 @@ HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
+# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
@@ -539,18 +505,32 @@ INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
+# their full class and namespace scopes in the documentation. If set to YES, the
# scope will be hidden.
# The default value is: NO.
HIDE_SCOPE_NAMES = NO
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
# the files that are included by a file in the documentation of that file.
# The default value is: YES.
SHOW_INCLUDE_FILES = YES
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
# files with double quotes in the documentation rather than with sharp brackets.
# The default value is: NO.
@@ -565,14 +545,15 @@ INLINE_INFO = YES
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
+# name. If set to NO, the members will appear in declaration order.
# The default value is: YES.
SORT_MEMBER_DOCS = YES
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
# The default value is: NO.
SORT_BRIEF_DOCS = NO
@@ -616,27 +597,25 @@ SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
# The default value is: YES.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
# The default value is: YES.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
# list. This list is created by putting \bug commands in the documentation.
# The default value is: YES.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
# the deprecated list. This list is created by putting \deprecated commands in
# the documentation.
# The default value is: YES.
@@ -661,8 +640,8 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
# The default value is: YES.
SHOW_USED_FILES = YES
@@ -710,8 +689,7 @@ LAYOUT_FILE =
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
+# search path. See also \cite for info how to create references.
CITE_BIB_FILES =
@@ -727,7 +705,7 @@ CITE_BIB_FILES =
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
# this implies that the warnings are on.
#
# Tip: Turn warnings on while writing the documentation.
@@ -735,7 +713,7 @@ QUIET = NO
WARNINGS = YES
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: YES.
@@ -752,8 +730,8 @@ WARN_IF_DOC_ERROR = YES
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
# The default value is: NO.
WARN_NO_PARAMDOC = NO
@@ -784,16 +762,26 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
-INPUT = ./qpcpp.txt \
- ./qpcpp_rev.txt \
- ./qp_macros.h \
- ./qpcpp_metrics.txt \
- ../include \
- ../qep/source \
- ../qf/source \
- ../qk/source \
- ../qs/source \
- ../ports/lint
+INPUT = \
+ modules.dox \
+ about.dox \
+ design.dox \
+ exa.dox \
+ exa_apps.dox \
+ exa_native.dox \
+ exa_rtos.dox \
+ exa_os.dox \
+ exa_mware.dox \
+ ports.dox \
+ ports_native.dox \
+ ports_rtos.dox \
+ ports_os.dox \
+ history.dox \
+ macros.h \
+ metrics.dox \
+ ../include \
+ ../source \
+ ../ports/lint
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -813,16 +801,19 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
-FILE_PATTERNS = *.txt \
- *.h \
- *.c \
- *.cpp
-
+FILE_PATTERNS = \
+ *.dox \
+ *.h \
+ *.c \
+ *.cpp \
+ *.s \
+ *.asm
+
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
# The default value is: NO.
-RECURSIVE = YES
+RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
@@ -831,15 +822,16 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = ../include/qs_dummy.h \
- ../ports/lint/MISRA_Exemplar_Suite_test
+EXCLUDE = \
+ ../include/qs_dummy.h \
+ ../ports/lint/MISRA_Exemplar_Suite_test
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
# The default value is: NO.
-EXCLUDE_SYMLINKS = NO
+EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
@@ -848,7 +840,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -859,13 +851,18 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS = QP_IMPL
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = snippets
+EXAMPLE_PATH = \
+ snippets \
+ ../include \
+ ../source \
+ ../ports \
+ ../examples
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -885,7 +882,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH = images
+IMAGE_PATH = images
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
@@ -914,7 +911,7 @@ INPUT_FILTER =
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
+# INPUT_FILTER) will also be used to filter the input files that are used for
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
# The default value is: NO.
@@ -965,16 +962,16 @@ STRIP_CODE_COMMENTS = YES
# function all documented functions referencing it will be listed.
# The default value is: NO.
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = NO
# If the REFERENCES_RELATION tag is set to YES then for each documented function
# all documented entities called/used by that function will be listed.
# The default value is: NO.
-REFERENCES_RELATION = YES
+REFERENCES_RELATION = NO
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
# link to the documentation.
# The default value is: YES.
@@ -1021,8 +1018,8 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
@@ -1070,7 +1067,7 @@ IGNORE_PREFIX =
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.
GENERATE_HTML = YES
@@ -1081,7 +1078,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_OUTPUT = html
+HTML_OUTPUT = ../../doc/qpcpp
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
@@ -1130,18 +1127,20 @@ HTML_FOOTER = footer.html
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET = stylesheet.css
+HTML_STYLESHEET =
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_STYLESHEET = ql.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@@ -1154,7 +1153,7 @@ HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
+# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
@@ -1189,7 +1188,7 @@ HTML_COLORSTYLE_GAMMA = 80
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_TIMESTAMP = YES
+HTML_TIMESTAMP = NO
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
@@ -1240,7 +1239,7 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_BUNDLE_ID = com.state-machine.qm
# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
@@ -1256,29 +1255,55 @@ DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE = ../../doc/qpcpp.chm
+
# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
# doxygen will try to run the HTML help compiler on the generated index.hhp.
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
@@ -1391,7 +1416,7 @@ DISABLE_INDEX = YES
# index structure (just like the one that is generated for HTML Help). For this
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
# further fine-tune the look of the index. As an example, the default style
# sheet generated by doxygen has an example that shows how to put an image at
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
@@ -1417,9 +1442,9 @@ ENUM_VALUES_PER_LINE = 4
# Minimum value: 0, maximum value: 1500, default value: 250.
# This tag requires that the tag GENERATE_HTML is set to YES.
-TREEVIEW_WIDTH = 190
+TREEVIEW_WIDTH = 180
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
# external symbols imported via tag files in a separate window.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1448,7 +1473,7 @@ FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
# to it using the MATHJAX_RELPATH option.
@@ -1495,13 +1520,34 @@ MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use + S
+# (what the is depends on the OS and browser, but it is typically
+# , /
diff --git a/doxygen/history.dox b/doxygen/history.dox
new file mode 100644
index 00000000..4ad09b47
--- /dev/null
+++ b/doxygen/history.dox
@@ -0,0 +1,1457 @@
+namespace QP {
+
+/**
+\page history Revision History
+
+\section qpcpp_5_4_0 Version 5.4.0, 2015-05-14
+
+This release changes the basic philosophy of distributing the QP frameworks by **combining** the "QP/C++ Baseline Code" with all currently available "QP/C++ Development Kits" (QDK/C++). This is done to eliminate any potential mistakes in downloading and installing separate pieces of code.
+
+Additionally, this release changes the basic philosophy of building your embedded applications with the QP/C++ framework. Starting with this release, all @ref exa "examples" for embedded boards include the QP/C++ framework as **source code** within the projects, instead of statically linking with a QP/C++ library. (**NOTE:** It is still possible to use QP/C++ as a library, but you need to build such libraries yourself, as they are no longer provided in the QP/C++ distribution.)
+
+The move to building QP/C++ from sources ensures the consistent toolset version and compiler options applied to the application code as well as the QP/C++ framework code. (**NOTE:** The QP/C++ examples for "big operating systems", like @ref exa_win32 "Windows" or @ref exa_posix "Linux", still use QP/C++ as a pre-compiled library that is statically linked with the application code.)
+
+@note
+Even though the QP/C++ source has been re-packaged in this release, the changes have minimal impact on the existing QP/C++ applications. The biggest difference is that "opaque" pointers to active objects derived from QMActive now need to be also typed QMActive (as opposed to QActive), because QMActive is no longer a subclass of QActive and the automatic upcast no longer applies.
+
+The changes in basic approach to distributing and building the framework have also the following ripple effects:
+
+1. The QP/C++ source code has been simplified and has been re-packaged into a much smaller number of source files. The whole QP/C++ source code now resides in the single source folder. Additionally, the source code files have now the **read-only** protection to prevent inadvertent changes to the QP/C++ source code that is part of your projects.
+
+2. It is no longer necessary to define the **QPCPP environment variable** to build the QP/C++ examples. All directories and files referenced by example projects are **relative** to the project folder. This change reflects the fact that most development tools add source files to the project using relative paths (and now the projects contain QP/C++ source code, not just the QP library).
+
+3. The QP/C++ @ref ports folder has been reorganized to contain all currently available QP/C++ ports. The ports are organized into three categories: @ref ports_native "native QP/C++ ports" ("bare-metal"), @ref ports_rtos "ports to 3rd-party RTOSes", and @ref ports_os "ports to big operating systems" (Windows and Linux).(**NOTE**: the ports are now documented in the this QP/C++ Reference Manual. Each port sub-directory contains a README link to the corresponding page in the online documentation)
+
+5. The QP/C++ @ref exa folder has been reorganized to reduce the repetitions and contains all currently available QP/C++ examples. The folder includes four categories of examples: @ref exa_native "native QP/C++ examples" ("bare-metal"), @ref exa_rtos "examples for 3rd-party RTOSes", @ref exa_os "examples for big operating systems" (Windows and Linux), and @ref exa_mware "examples for 3rd-party Middleware". As mentioned before, all example projects for embedded systems use QP/C++ as source code and not as a library. The examples folder has been expanded to contain all currently available QP/C++ examples, many of them are new in this release. (**NOTE**: the currently available examples are now documented in the QP/C++ Reference Manual. Each example sub-directory contains a README link to the corresponding page in the online documentation)
+
+6. A new 3rd_party folder created to contain the Third-Party code used in the QP/C++ ports and examples, such as MCU register files, low-level startup code, device drivers, etc. The 3rd_party folder avoids the need to repeat such code in every project. Also, the separation of the Third-Party components helps to clearly indicate code that comes from various sources, and to which Quantum Leaps, LLC expressly makes **no claims of ownership**. The Third-Party software components included in this "3rd_party" folder are licensed under a variety of different licensing terms that are defined by the respective owners of this software and are spelled out in the README.txt or LICENSE.txt files included in the respective sub-folders.
+
+7. This release also comes with the much expanded online QP/C++ Reference Manual, which is cross-linked with the ports and examples.
+
+
+Changes in detail:
+
+1. Renamed the "Vanilla" scheduler to the @ref comp_qv "QV cooperative kernel" for symmetry with the @ref comp_qk "QK preemptive kernel". Renamed QF::onIdle() callback to QV::onIdle().
+
+2. Removed class QFsm (which is now deprecated). Legacy state machines coded in the "QFsm-style" will continue to work, but will use the QHsm implementation internally. There is no longer any efficiency advantage in using the "QFsm-style" state machines.
+
+3. Applied a slight performance improvement to the ARM Cortex-M port to the QK preemptive kernel. The QK port now checks for ISR context by looking at the IPSR register, instead of incrementing and decrementing the `QK_intNest_` up-down counter.
+
+4. Updated @ref exa_arm-cm "ARM Cortex-M examples" and provided new examples for NXP mbed-LPC1768, and STM32 NUCLEO-L053R8, and NUCLEO-L152RE boards. All examples now use the latest CMSIS (V4.3.0). All ARM Cortex-M exampels are provided for the ARM-KEIL, GNU-ARM, and IAR-ARM toolsets.
+
+5. Added the native @ref arm7-9 "port" and @ref exa_arm7-9 "examples" to the @ref arm7-9 "classic ARM7/9" with AT91SAM7S-EK board and the IAR-ARM toolset.
+
+6. Added the native @ref avr "port" and @ref exa_avr "examples" to the AVR (AVRmega) with GNU-AVR and IAR-AVR toolsets. The @ref exa_avr "examples" are provided for the Arduino-UNO board.
+
+7. Added the native @ref msp430 "port" and @ref exa_msp430 "examples" to MSP430 with TI CCS-430 and IAR-430 toolsets. The @ref exa_msp430 "examples" are provided for the MSP430 LauchPad boards (the MSP-EXP430G2 and MSP-EXP430F5529LP for the "classic" MSP430 and "extened" MSP430X, respectively).
+
+8. Added port to @ref cmsis-rtx "CMSIS-RTOS RTX". Examples are available for TI EK-TM4C123GLX, STM32 NUCLEO-L053R8, and NUCLEO-L152RE boards with ARM-KEIL, GNU-ARM, and IAR-ARM toolsets.
+
+9. Updated port to @ref embos "embOS". Examples are available for STM32 STM32F4-Discovery board with IAR-ARM toolset.
+
+10. Updated port to @ref freertos "FreeRTOS" for the latest version 8.2.1. Examples are available for TI EK-TM4C123GLX board with GNU-ARM and IAR-ARM toolsets.
+
+11. Added @ref threadx "port to Thread-X". Example is available for the Thread-X demo with Visual Studio on Windows.
+
+12. Updated port to @ref ucos-ii "uC/OS-II" for the latest version v2.92. Examples are available for TI EK-TM4C123GLX and STM32 NUCLEO-L152RE boards with ARM-KEIL and IAR-ARM toolsets.
+
+13. Updated @ref win32 "port to Win32" (Windows). Modified the port to apply a generous "fudge factor" in over-sizing QP event queues and event pools, to minimize the risk of overflowing queues/pools due to non-deterministic Windows behavior.
+
+14. Updated the @ref qt "QP-Qt Port" (QP/C++ port to the Qt cross-platform GUI framework).
+
+15. Added new @ref win32-qv "port to Win32-QV" (Windows with cooperative "Vanilla" scheduler, previously known as Win32-1T).
+
+16. Updated the @ref lwip_ek-lm3s6965 "lwIP-QP example for EK-LM3S6965 board".
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_3_1 Version 5.3.1, 2014-09-20
+
+\note QP/C++ 5.3.1 remains backwards-compatible with all QP/C++ ports
+and applications
+
+This release fixes the following bugs:
+
+1. QMsm::isInState() returns invalid result (bug #105)
+
+2. QF::gc() doc typo (bug #102)
+
+3. POSIX-port Makefile error (bug #65)
+
+4. Problematic friendship to extern "C" function in qf.h (bug #106)
+
+
+Also, this release updates the PC-Lint options and removes all the remaining PC-Lint warnings for the latest PC-Lint 9.00k.
+
+Additionally, this release improves the uC/OS-II port in that it is now generic and applicable for any CPU, for which uC/OS-II port exists. Specifically, all references to DOS or x86 have been removed from the QP port and any CPU-specific dependencies have been placed in the separate part of the port.
+
+Finally, this release improves the "QP/C++ Reference Manual" generated by Doxygen and available both inside the QP/C++ baseline distribution (qpcpp.chm file) and online at: http://www.state-machine.com/qp/qpcpp
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_3_0 Version 5.3.0, 2014-04-14
+
+This release adds the "transition to history" (deep history) feature to
+both QHsm and QMsm state machines and their subclasses. This QP/C++
+release matches the new QM modeling tool version 3.1.0, which now
+supports the "transition to history" connector and the corresponding
+code generation for transitions to history.
+
+\note QP/C++ 5.3.0 remains backwards-compatible with QP/C++ applications
+developed for QP/C++ 4.x and QP/5.x. However, any QM models created for
+the previous QP/C++ versions require re-generating the code with QM 3.1.0.
+
+This release adds new QS (Quantum Spy) instrumentation for tracing
+transitions to history as well as entry and exit points in submachines.
+All these features require the matching QSPY host application included
+in Qtools 5.3.0.
+
+Additionally, the QMsm state machine has been extended to add
+implementation of the reusable submachine states and submachines with
+entry points and exit points. The reusable submachines in QP/C++ 5.3.0
+lay the groundwork for providing reusable submachine states and
+submachine diagrams in the next upcoming QM version.
+
+This release also uses the C99 data types uint_fast8_t and uint_fast16_t
+instead of the non-standard uint_t.
+
+Finally, this QP/C++ release brings deep changes in the source code
+comments and the doxygen documentation generated from the source code.
+All comments have now more consistent structure, and every function is
+now documented in the implementation file (.cpp file), whereas the
+interface (.h files) contain only the brief descriptions of the
+functions. This re-structuring of documentation is performed as part of
+the validation and verification effort that has begun to provide a
+certification package for QP/C++ for safety standards, such as IEC 61508
+and ISO 62304 (FDA 510(k)).
+
+
+Changes in detail:
+
+1. Moved detailed documentation of functions from the header files (.h)
+to implementation files (.cpp).
+
+2. Removed the header file "qevt.h" and merged its contents into "qep.h"
+
+3. Added macros: trace records QS_QEP_TRAN_HIST, QS_QEP_TRAN_EP, and
+QS_QEP_TRAN_XP to "qs.h"
+
+4. Added macros: Q_TRAN_HIST(), QM_TRAN_HIST(), QM_TRAN_EP(),
+QM_TRAN_XP(), and QM_SUPER_SUB() to "qep.h"
+
+5. Added attributes entryAction and initAction to the QMState struct in
+"qep.h" (needed for transition to history).
+
+6. Added attribute act to the QMAttr union in "qep.h" (needed for
+transitions to entry point in submachine states).
+
+7. Changed the QState return type from action/state handler functions to
+uint_fast8_t.
+
+8. Added QM models to the "Transition to History" design pattern example
+(directory qpcpp\examples\win32\mingw\history) and also added an example
+for "Transition to History" with the QMsm class (see
+qpcpp\examples\win32\mingw\history_qm).
+
+9. Changed the m_prio attribute of QActive to uint_fast8_t.
+
+10. Changed the type of prio argument to uint_fast8_t and qlen/stkSize
+to uint_fast16_t in the signature of QActiveVtbl.start function pointer
+and QActive::start_() implementation.
+
+11. Changed the type of the tickRate argument in QTimeEvt constructor
+and QP::QF::tickX_(), and QP::QF::noTimeEvtsActiveX() to uint_fast8_t.
+
+12. Changed the type of the poolSize argument in QP::QF::poolInit() to
+uint_fast16_t.
+
+13. Changed arguments evtSize and margin in QP::QF::newX_() to
+uint_fast16_t.
+
+14. Changed attribute bits in QPSet8 as well as bytes and bits[] in
+QPSet64 to uint_fast8_t.
+
+15. Changed the QEQueueCtr event queue counter type to uint_fast8_t.
+
+16. Changed type of arguments qLen and margin in QP::QEQueue::init() and
+QEQueue/QActive::post() to uint_fast16_t.
+
+17. Changed the return type from QK_schedPrio_() (priority) as well as
+the p argument in QK_sched_() and QK_schedExt_() to uint_fast8_t
+
+18. Added function QMsm::isInState() to "qep.h" and its implementation
+file qmsm_in.cpp. This function tests whether the QMsm state machine (or
+its subclasses like QMActive) "is in" the given state.
+
+19. Updated all make scripts for QP/C++ ports to include the new
+qmsm_in.cpp in the QP/C++ library builds.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_2_1 Version 5.2.1, 2014-01-06
+
+This release fixes two bugs.
+
+1. In file qmsm_dis.cpp added saving of the action-table into a
+temporary variable *before* exiting the current state to the transition
+source. Also, changed the signature of the QMsm::msm_tran() helper
+function to take the action table as parameter. NOTE: This bug only
+affected the Spy configuration and because of this escaped regression
+testing. The internal testing process have been updated to test all
+build configurations: Debug, Release, and Spy.
+
+2. In file qs_mem.cpp fixed an error in accounting used bytes in the QS
+trace buffer.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_2_0 Version 5.2.0, 2013-12-28
+
+This release matches the new QM 3.0.0, for which it provides model
+examples based on the new QMsm/QMActive classes. This, in turn
+demonstrates the new state machine code generation that QM3 was
+specifically designed to do.
+
+This release also provides a clearly separated API compatibility layer,
+whereas you can configure a level of backwards compatibility by means of
+the #QP_API_VERSION macro. This facilitates migrating existing QP
+applications to the newer API.
+
+An cyclomatic complexity (McCabe V(G)) analysis of this version has been
+performed and the maximum V(G) complexity per function has been reduced
+to 15 by breaking up the QHsm::dispatch() function. The code metrics
+report, including cyclomatic complexity by function as well as other
+standard code metrics (e.g., lines of code), is now included in the
+"QP/C++ Reference Manual", see
+http://www.state-machine.com/qp/qpcpp/metrics.html
+
+Also, in this release all internal QP data that were previously
+uninitialized are now explicitly initialized to zero. In other words,
+this release no longer assumes that all uninitialized data (global and
+static inside functions) is implicitly initialized to zero before the
+control is transferred to main(). This is a requirement of the C
+Standard, but some embedded startup code fails to do this.
+
+Finally, this release demonstrates safer stack allocation and safer
+exception handlers in all ARM Cortex-M examples. The techniques are
+described in the Embedded.com article "Are We Shooting Ourselves in the
+Foot with Stack Overflow?".
+
+Changes in detail:
+
+1. for backwards compatibility, in file qp_port.h defined "API
+Compatibility Layer", which is controlled by the macro #QP_API_VERSION.
+For example, specifying QP_API_VERSION=500 chooses API compatible with
+QP version 5.0.0 or newer, but excludes APIs that became deprecated in
+the earlier versions. If the macro #QP_API_VERSION is not defined by the
+user (typically on the command line for the compiler), the default value
+of 0 is assumed. This default means maximum backwards compatibility
+(from version 0.0.0). On the other hand, higher values of
+#QP_API_VERSION mean less backwards compatibility. For example
+QP_API_VERSION=9999 will specify compatibility only with the latest
+version of QP. The API Compatibility Layer for QP_API_VERSION < 500
+provides macros: postLIFO(), publish(), and tick(). These macros resolve
+to POST(), PUBLISH(), and TICK_X() respectively.
+
+2. In file qhsm_dis.cpp, broken up the function QHsm::dispatch() into
+two functions QHsm::dispatch() and a private helper QHsm::hsm_tran().
+This has reduced the cyclomatic complexity from 25 for the original
+function, to 11 and 15 for QHsm::dispatch_() and QHsm::hsm_tran(),
+respectively.
+
+3. In file qmsm_dis.cpp, broken up the function QMsm::dispatch() into
+two functions QMsm::dispatch() and a private helper QMsm::msm_tran().
+This has reduced the cyclomatic complexity from 15 for the original
+function, to 9 and 7 for QMsm::dispatch() and QMsm::msm_tran(),
+respectively.
+
+4. Changed QM models dpp.qm and game.qm to use QMActive and QMsm base
+classes instead of QActive and QHsm, to showcase the new code generation
+capabilities of QM3.
+
+5. Added the QMsmTst example application analogous to the QHsmTst to
+test the QMsm base class. The QMsmTst comes with the QM model qmsmtst.qm.
+
+6. In file qf_act.cpp added the function QF::bzero(), and in files
+qvanilla.cpp and qk.cpp added calls to QF::bzero() to explicitly clear
+the uninitialized data. Also added calls to QF::bzero() inside
+qf_psini.cpp.
+
+7. Updated all examples for ARM Cortex-M to use safer stack allocation
+and safer exception handlers in all ARM Cortex-M examples, as described
+in the Embedded.com article "Are We Shooting Ourselves in the Foot with
+Stack Overflow?".
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_1_1 Version 5.1.1, 2013-10-10
+
+This release fixes reversal of logic in the QF::noTimeEvtsActiveX()
+function as well as sleep mode transition in the ARM Cortex-M3/M4 ports
+to the cooperative Vanilla kernel. Also, the native QP event queue
+implementation has been changed to count the extra "front-event"
+location into the number of free entries, which fixes the problem of
+defer queues of depth 1. Finally, the release restores the support for
+linting (with PC-Lint) of the QP/C++ applications for ARM Cortex-M (with
+IAR and GNU compilers).
+
+Changes in detail:
+
+1. In file qf_tick.cpp reversed the logic inside QF::noTimeEvtsActiveX()
+
+2. Modified free entry accounting (nFree) in the files: qeq_init.cpp,
+qeq_fifo.cpp, qeq_get.cpp, and qeq_lifo.cpp.
+
+3. Modified free entry accounting (nFree) in the files: qa_init.cpp,
+qa_fifo.cpp, qa_get_.cpp, and qa_lifo.cpp.
+
+4. Introduced new macro QF_CPU_SLEEP() in the ARM Cortex-M Vanilla ports.
+
+5. Changed Board Support Package files (bsp.cpp) in the ARM Cortex-M
+Vanilla examples.
+
+6. Modified the CMSIS-compliant startup code in all ARM Cortex-M Vanilla
+examples.
+
+7. Modified the application examples with PC-Lint
+(qpcpp/examples/arm-cm/qk/gnu/dpp-qk_ek-lm3s811-lint and
+qpcpp/examples/arm-cm/qk/iar/dpp-qk_ek-lm3s811-lint). Updated lint files
+for the latest PC-Lint
+
+8. Ported all state pattern examples to Win32/MinGW. That way, all these
+examples can be run and modified directly on Windows, without going back
+to DOS.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_5_1_0 Version 5.1.0, 2013-10-02
+
+\note QP/C++ 5.1.0 remains backwards-compatible with the existing
+QP/C 4.x applications, except the ARM Cortex-M applications need to
+adjust the interrupt priorities. Specifically, you need to set the
+interrupt priorities equal or lower than QF_AWARE_ISR_CMSIS_PRI
+constant provided in the qf_port.h header file.
+
+The main purpose of this milestone QP/C++ release is to enable the QM
+modeling tool to generate a new type of state machine code (requires QM
+version 3.0.0, which is still in development as of this writing).
+
+This new type of state machine implementation in QP/C++ 5 is based on
+the new QP::QMsm class, which takes advantage of the QM tool as an advanced
+"state machine compiler". QM can perform optimizations that were not
+possible with the C pre-processor alone. Specifically, the QM can easily
+determine the LCA (Least-Common-Ancestor) state for every transition and
+it can generate the complete transition-sequences (sequences of
+exit/entry/initial actions) at code-generation time. The resulting code
+can be still highly human-readable, but it will no longer be
+human-maintainable. The lab tests indicate that the new "housekeeping"
+code for executing hierarchical state machines can be about twice as
+fast as the previous code based on the QP::QHsm class.
+
+The next important change introduced in QP/C++ 5 is making several
+important functions in QP/C++ base classes virtual. The new virtual
+functions include: QMsm::init() and QMsm::dispatch() and
+QActive::start(), QActive::post(), and QActive::postLIFO() perations.
+Making theses functions virtual means that all these operations can be
+overridden in sub-classes of state machines and active objects. This, in
+turn, allows a single application to use a mix of state machine classes
+derived from the new QMsm base class with state machines derived from
+the QHsm base class, each one using a different state machine
+implementation strategy. Additionally, the virtual QActive::post()
+operation could be very useful for implementing various Proxy active
+objects (e.g., for active object event posting across networks).
+
+Another big feature introduced in QP/C++ 5 are the multiple, independent
+system clock tick rates for time events. The number of system tick rates
+can be now configured in the QP/C++ ports. For example, a digital watch
+can use a "fast" clock tick rate of 100Hz and a "slow" clock tick rate
+of only 1Hz. These clock tick rates can be managed independently, so for
+example, the fast clock tick rate can be shut down in the absence of
+time events assigned to this rate. This feature allows the applications
+to implement sophisticated power-saving policies.
+
+As yet another important feature, QP/C++ adds a new "extended" API for
+non-asserting event allocation and posting. This feature is intended for
+situations, where an application is hammered with external events that
+at times arrive too fast for processing, but that can be ignored under
+the overload conditions. In those cases firing an assertion inside the
+framework is undesirable. The non-asserting API allows a designer to
+request a safety-margin when allocating or posting an event. The event
+is not allocated/posted if the safety margin cannot be satisfied at the
+time of the call. On the other hand, the safety margin allows the
+application to still use the regular (asserting) event allocation and
+posting, because the event pools and event queues are guaranteed to
+maintain a minimal margin for safe operation.
+
+Finally, this QP/C++ release brings significant improvements to the QS
+software tracing implementation and also brings important changes the
+ARM Cortex-M port. Changes in detail are as follows:
+
+0. Removed the conditional compilation of the QP:: namespace based on
+the macro Q_NNAMESPACE. The namespace QP:: is now enabled permanently,
+which is a requirement of MISRA-C++:2004 and is also is part of the QM
+code generation for QP/C++. Also, the use of explicit QP:: namespace
+improves the doxygen documentation (QP/C++ Reference Manual).
+
+1. Added the new QMsm class to qep.h. Changed the inheritance tree by
+deriving QHsm and QFsm from the QMsm base class.
+
+2. Added new source files qmsm_ini.cpp and qmsm_dis.cpp to the QEP. These
+files implement the QMsm::init() and QMsm::dispatch() functions, respectively.
+
+3. Added the new QMActive class to qf.h. Extended the inheritance
+tree to derive QMActive from QActive.
+
+4. Added the multiple system clock tick rates feature in qf.h:
+ - added new configuration macro #QF_MAX_TICK_RATE, which specifies
+ the number of clock tick rates. This macro is to be defined in
+ the QF ports (in the qf_port.h header file). If the macro is
+ undefined, the default value is 1 (one clock tick rate).
+ - renamed and re-implemented the QF::tick() function as the
+ "extended" QF::tickX() function with the argument 'tickRate' for
+ processing time events allocated to different clock rates. The
+ application must call QF::tickX(0), QF::tickX(1), ... at the
+ specified tick rates from ISRs or *tasks*.
+ - added an "extended" time event constructor, which assigns a time
+ event to a specific tick rate as well as specific active object.
+ - renamed and re-implemented the internal function QTimeEvt::arm_()
+ to a public function QTimeEvt::armX() for arming time events
+ initialized with the "extended" constructor. The QTimeEvt::armX()
+ function is the new recommended API for arming time events, both
+ one-shot and periodic.
+ - re-implemented QTimeEvt::disarm() and QTimeEvt::rarm().
+ - renamed QF::noTimeEvtsActive() to the "extended" version
+ QF::noTimeEvtsActiveX(), which checks time events assigned to the
+ given tick rate.
+
+5. Added the new non-asserting API to qf.h:
+ - renamed internal function QF::new_() to QF::newX_(), the latter one
+ taking the argument 'margin' for allocating events. The function
+ returns NULL if the event pool has less free events than the
+ specified margin. The function asserts if the margin is zero and
+ the event can't be allocated.
+ - added function QActive::post() to post an event to the given
+ active object. The function does not post the event if the target
+ event queue has less free slots than the specified margin. The
+ function asserts if the margin is zero and the event can't be
+ posted.
+ - added "extended" macro Q_NEW_X() for allocating events with a
+ margin.
+ - added "extended" macro POST_X() for posting events with a
+ margin.
+
+6. Modified the QActive::defer() function to return the status of the
+ defer operation (true==success), instead of asserting when the defer
+ queue overflows.
+
+7. Modified QS (Quantum Spy) software tracing implementation:
+ - Optimized the internal QS implementation of all functions that
+ insert trace data into the trace buffer. The general idea of the
+ optimization is to extensively use automatic variables instead of
+ global variables (such as buffer head and tail indexes, the
+ running checksum, etc.).
+ - Reduced the number of QS global filters from 256 to 124 (0x7C).
+ This enables the code to avoid escaping the trace record numbers
+ - added additional tick rate byte to the trace records QS_QF_TICK
+ and QS_QFF_TIMEEVT_*.
+ - An empty QS record and the QS_RESET record are now inserted
+ automatically into the trace buffer in the function
+ QS::initBuf(). The empty QS record/QS_RESET pair provides a clean
+ start of a session and allows the QSPY host application to
+ re-synch with the data stream.
+ - added new trace records #QS_QF_ACTIVE_POST_ATTEMPT,
+ #QS_QF_EQUEUE_POST_ATTEMPT, and #QS_QF_MPOOL_GET_ATTEMPT for the
+ "extened" non-asserting event allocation and posting.
+ - added new trace records QS_TEST_RUN and QS_TEST_FAIL for future
+ support for unit testing.
+ - added new QS source file qs_dict.cpp with functions QS_*_dict() to
+ generate various dictionary entries. Changed the macros
+ QS_*_DICTIONARY() to call these functions. This was done to
+ significantly reduce the amount of tracing code needed to send the
+ dictionaries from applications.
+ - grouped together the various QS variables (such as filters, trace
+ buffer indexes, etc.) in a single struct, which results in a more
+ efficient code for various QS operations.
+
+8. Changed the structure of the ARM Cortex-M ports
+ - renamed the sub-directory for ARM Cortex-M ports and examples
+ from "arm-cortex" to "arm-cm". This is done to avoid confusion
+ with other ARM Cortex variants, such as Cortex-A/R, which very
+ different from Cortex-M.
+ - Changed the policy of disabling interrupts for Cortex-M3/M4.
+ For these cores, QP 5.1.0 never completely disables interrupts,
+ even inside the critical sections. The QP port disables
+ interrupts selectively using the BASEPRI register. (NOTE: The
+ BASEPRI register is not implemented in the ARMv6-M architecture
+ (Cortex-M0/M0+), so Cortex-M0/M0+ need to use the PRIMASK
+ register to disable interrupts globally).
+
+ - removed the CMSIS (Cortex Microcontroller Software Interface
+ Standard) directories from the Cortex-M examples and moved it to
+ the common location in the %QPC%\ports\arm-cm\cmsis\ directory.
+ Upgraded the CMSIS to the latest version 3.20.
+ - added the ARM Cortex-M ports and examples with Keil/ARM MDK to
+ the QP Baseline Code.
+ - upgraded ARM Cortex-M ports with IAR to the latest IAR EWARM 6.60
+ - upgraded ARM Cortex-M ports with Sourcery CodeBench to the latest
+ version 2013.05-53.
+
+9. Added the requested simple "Blinky" example for Windows and ARM
+ Cortex-M (with the GNU, IAR, and Keil toolsets).
+ - Added "Getting Started with QP/C++" guide based on the Blinky
+ example.
+
+10. Updated the Doxygen documentation (QP/C++ Reference Manual)
+ - removed the outdated tutorial section
+ - updated and added documentation and code samples
+ - added search box and tree-view panel to the HTML documentation
+
+
+\note This new policy of disabling interrupts in ARM Cortex-M divides
+interrupts into "kernel-unaware" interrupts, which are never disabled,
+and "kernel-aware" interrupts, which are disabled in the QP critical
+sections. Only "kernel-aware" interrupts are allowed to call QP
+services. "Kernel-unaware" interrupts are *NOT* allowed to call any QP
+services and they can communicate with QP only by triggering a
+"kernel-aware" interrupt (which can post or publish events).
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_5_04 Version 4.5.04, 2013-02-10
+
+The main purpose of this release is adding support for the ARM Cortex-M4F
+processors with the hardware Floating-Point Unit (FPU). The QP/C ports
+to Cortex-M4F take full advantage of the "lazy stacking" feature of the
+FPU registers, and by doing so offer the most efficient preemptive
+multitasking on this processor.
+
+Changes in detail:
+
+1. Added ports and examples for ARM Cortex-M4F with the EK-LM4F120XL
+board (Stellaris Launchpad).
+
+2. Added the macro QF_LOG2(), which can be re-implemented in the QP ports,
+if the CPU supports special instructions, such as CLZ (count leading zeros
+in Cortex-M3/M4). If the macro is not defined in the QP port, the default
+implementation uses a lookup table.
+
+3. Updated all ARM Cortex-M ports and examples to the latest IAR EWARM
+6.50 and Sourcery CodeBench 2012.09-85.
+
+4. Updated App Notes "QP and ARM Cortex-M with IAR" and "QP and ARM
+Cortex-M with GNU".
+
+5. Updated the PC-Lint support files (include\lib-qpcpp.lnt, au-misra2.lnt)
+to the latest PC-Lint 9.00j.
+
+6. Updated the Application Note: "QP/C++ MISRA-C:2004 Compliance Matrix".
+
+7. Spell-checked the comments in all QP/C++ source files and removed
+several typos.
+
+8. Removed the Qt ports and examples from the QP/C++ Baseline Code and
+moved them to the separate QDK/C++-Qt.
+
+\note QP/C++ Version 4.5.04 preserves full compatibility with QM 2.2.03
+and all existing QDKs for QP/C++ 4.5.xx.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_5_03 Version 4.5.03, 2012-11-29
+
+This release changes the directory structure of QP ports to various
+operating systems, such as POSIX (Linux, BSD, etc.), Win32 (Windows),
+Qt, etc. The OS ports are moved from the ports\80x86\ directory one
+level up to ports\. Also, the OS examples are moved from the
+exampels\80x86\ directory one level up to examples\.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_5_02 Version 4.5.02, 2012-08-15
+
+The main purpose of this release is providing QM models in most
+examples and better, more comprehensive support for (rapid)
+prototyping of embedded QP applications on the desktop with the
+Win32 API and with Qt. Among others, this release adds a complete
+toolkit for creating realistic embedded front panels with pure
+Win32-GUI API and free Visual C++ Express and ResEdit. An extensive
+Application Note "QP and Win32" is included in this release.
+
+This QP relase adds QM models, created with the new QM 2.2.01,
+to most of the examples. The code generated by this new QM version
+complies with MISRA-C++:2008 rules. For this compliance, the QM code
+generator applies the QP:: namespace prefix to all QP/C++ elements,
+such as classes, types, enumerations, etc.
+
+For compliance with MISRA-C++:2008 and compatibility with QM, all
+QP/C++ ports in this release use the QP:: namespace. The namespace
+generation can be suppressed by providing the new configuration
+macro Q_NNAMESPACE, but this is generally *not* recommended, because
+it breaks compatiblity with the QM code generation. (In other words,
+a QP/C++ port without namespace cannot use the code generated by QM.)
+
+This release simplifies the QP ports to desktop OSs, such as
+Windows (Win32), Linux, BSD, Mac OSX (POSIX) and combines 32-bit
+and 64-bit ports in one with conditional compilation.
+
+This release also enhances the option for using constructors for
+dynamically allocated events. When the configuration macro
+Q_EVT_CTOR is defined, the QEvt class provides a non-default
+constructor and the Q_NEW() macro becomes variadic and
+takes the arguments for the event constructor. This generally
+allows creating dynamic events "on-the-fly" without a temporary
+pointer to the event. This QP configuration is demonstrated only
+in the QP port to Qt, but can be used in any other port.
+NOTE: The event constructor feature is NOT backward-compatible
+with the existing applications.
+
+At the same time, the QEvt class in this release provides the virtual
+destructor only when the new macro Q_EVT_VIRTUAL is defined. This
+separation of QEvt constructor from virtual destructor makes the
+constructor more attractive, because it saves the virtual pointer
+in every event, if no virtual functions are used in QEvt subclasses
+(which seems to be generally the case).
+
+This release also adds a new macro QF_MPOOL_EL, which is intended
+for allocating properly aligned storage for memory pools and event
+pools.
+
+Finally, all QP ports included in this release use only a single QP
+library, rather than separate libraries for QEP, QF, QK, and QS.
+
+Changes in detail:
+
+1. Modified QP port to Win32 and used the free Visual C++ Express
+2010 with Platform SDK rather than Visual C++ Pro 2008. Renamed
+the port directory from vc2008\ to vc\. Provided a completely
+revised App Note "QP and Win32".
+
+2. Eliminated QP port to Win32 with one thread (Win32-1T).
+
+3. Consolidated all QP ports to POSIX OSs (Linux, Linux64, Mac_OSX)
+into a single port to POSIX and placed it in the directory posix\.
+
+4. Renamed the port directory qt_1t\ to qt\.
+
+5. Added event constructor to qevt.h (controlled by the configuration
+macro Q_EVT_CTOR).
+
+6. Added the conditional compilation with the macro Q_EVT_VIRTUAL
+around the virtual destructor in the QEvt class.
+
+7. Added macro QF_MPOOL_EL to qmpool.h. Modified all examples to
+demonstrate the use of this macro to allocate properly aligned
+storage for event pools.
+
+8. Added new typedef 'enum_t' and modified signatures of functions
+taking event signals from QSignal to enum_t. This was done to
+significantly reduce the number of casts necessary when enumerated
+signals were passed to QP functions.
+
+9. Modified all QP ports distributed in the QP/C++ baseline code
+to generate only a single QP library, rather than separate
+libraries for QEP, QF, QK, and QS. This includes all QP ports
+to the desktop (ports\80x86\ directory) and ARM Cortex-M ports
+(ports\arm-cortex\ directory).
+
+10. Modified all examples to link only one QP library.
+
+11. Added QM models to most examples and used the automatically
+generated code from the models instead of the hand-written code.
+
+12. Modified Qt ports to use the event constructors and
+modified examples for Qt to demonstrate this feature.
+
+13. Added .ui files to the Qt examples for generating UIs
+graphically with the Qt Designer tool. Revised and updated the
+App Note "QP and Qt".
+
+14. Added new macro QS_USR_DICTIONARY() to QS for providing symbolic
+names for user-defined trace records
+
+15. Added new macro QS_RESET() to QS for telling the QSPY application
+when the target resets. This allows QSPY to reset its internal state.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_5_01 Version 4.5.01, 2012-06-14
+
+The main purpose of this minor release is providing improved
+MISRA-compliant state machine implementation. Specifically, a new
+macro Q_UNHANDLED() has been added for a situation when a guard
+condition evaluates to FALSE, but the state model does not prescribe
+the explicit [else] case for this guard. In this case, the state
+handler can return Q_UNHANDLED(), which will cause the QEP event
+processor to propagate the event to the superstate, which is what
+UML semantics prescribes.
+
+NOTE: These change to the QEP event processor is completely
+backwards-compatible. All state hander functions coded the old
+way will continue to handle the guard conditions correctly and
+in accordance with the UML specification. The new Q_UNHANDLED()
+macro is necessary only for MISRA-compliant state handler coding,
+which will be applied in the upcoming release of the QM modeling
+and code generation tool.
+
+Changes in detail:
+
+1. Added macro Q_UNHANDLED() and return value Q_RET_UNHANDLED in
+qep.h.
+
+2. Modified qhsm_dis.cpp to handle the Q_RET_UNHANDLED return value.
+
+3. Updated the QP/C MISRA-C++:2008 compliance matrix to
+include the new MISRA-compliant way of coding guard conditions.
+
+4. Modified qs.h and qs_dummy.h to add new trace record type
+QS_QEP_UNHANDLED, which is generated when the state handler returns
+Q_RET_UNHANDLED.
+
+5. Modified qs.h and qs_dummy.h to add the User record dictionary
+trace record and macro QS_USR_DICTIONARY().
+
+NOTE: This new trace record requires the updated QSPY 4.5.01.
+
+6. Corrected qfsm_dis.cpp, which did not generate QS trace records
+for entry and exit from non-hierarchical states.
+
+7. Updated the IAR ARM compiler used in the ARM Cortex-M examples
+to the latest version IAR EWARM 6.40.
+
+8. Modified the Qt port not to define the QPApp::onClockTick()
+slot function, but instead to allow defining this slot function in
+the BSP of the application.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_5_00 Version 4.5.00, 2012-05-26
+
+The main pupose of this relase is to improve host-based development of QP
+applications, which is critical for Test-Driven Development (TDD). Among
+others, this release provides integration between QP and the popular
+Qt GUI framework, which allows developers to easily build host-based
+simulations of the embedded systems with the realistic user interfaces.
+
+This realase also simplifies implementing transitions to history, which
+is a preparation to providing this feature in the QM modeling tool.
+
+Changes in detail:
+
+1. Renamed the event class from QEvent to QEvt to avoid a name conflict
+with the Qt framework. Also, for consistency, renamed the file qevent.h
+to qevt.h and the macro Q_EVENT_CAST() to Q_EVT_CAST().
+
+NOTE: To minimize impact of this change on the existing QP ports and
+applications, the name QEvent is provided as well, but this can be
+suppressed by defining the configuration macro Q_NQEVENT in qep_port.h.
+
+2. Changed the design of QF::tick() (file qf_tick.cpp) to better support
+calling this function from low-priority tasks (as opposed to interrupts
+and highest-priority tasks), which often happens when QP is executed on
+the desktop operating systems. In this design only QF::tick() can remove
+time events from the active linked list, so no unexpected changes to the
+list structure are eliminated
+
+3. Simplified the QTimeEvt class by removing the m_prev link pointer,
+as the new design no longer needs a bi-directional list. These changes
+impact the files: qte_*.cpp.
+
+4. Added return value to QF::run() to allow transfer of the exit
+status to the destop operating systems.
+
+NOTE: This modification haves impact on most QP/C++ ports, because
+the QF::run() function must now return a int16_t value.
+
+5. Eliminated the m_running member of the QActive class, which
+has been used only in the QP ports to "big" OSes such as Linux
+or Windows.
+
+6. Added member m_temp to the QHsm and QFsm base classes to prevent
+clobbering the current state (the m_state member) during transitons.
+This change allows keeping the current state unchanged during the
+entire transition chain, which in turn allows easy and generic access
+to the state information to store the state history in the exit
+actions from states. Additional bonus of this re-design is the
+opportunity of testing for stable state configuration in assertions
+added to the qhsm_*.cpp and qfsm_*.cpp files.
+
+7. Added the QHsm::state() and QFsm::state() accessor methods.
+
+8. Modified the "Transition to History" pattern implementation to
+use the simplified technique of obtaining the current state in the
+exit action from the superstate rather than all the exit actions from
+the substates. Modified the "State-Local Storage" (SLS) pattern as
+well, because it was using the transition to history constructs.
+
+9. Re-designed the implementation of the QSPY host application, so
+that it can be convenienty included as part of the QP library.
+This allows direct QS tracing output to the screen for QP applications
+running on the desktop.
+
+NOTE: This change is part of the Qtools release 4.5.00.
+
+10. Modified the QP ports to Win32_1t (both the MinGW and VC2008) to
+output QS trace data directly to the stdout via the QSPY host-application
+interface. Modified the DPP examples for Win32_1T to demonstrate the
+direct QS output to the screen.
+
+11. Added QP port to Qt_1t (Qt with one thread) and two example
+applications (DPP and PELICAN crossing).
+
+12. Added GNU compiler option -pthread to QP ports for POSIX with
+P-threads, including QP ports and examples for Linux and Mac OS X.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_4_00 Version 4.4.00, 2012-05-02
+
+The main pupose of this relase is MISRA-C++:2008 compliance, strong-type
+checking compliance, update of PC-Lint option files and tests, and
+general cleanup.
+
+1. Moved the qp_port.h header file from the port directories to
+the qcppp/include/ directory. Also, moved the inclusion of the
+QS (Spy) header files (qs_port.h/qs_dummy.h) from qep.h, qf.h,
+and qk.h headers to qp_port.h. These structural changes were made
+to reduce the number of preprocessor #if nesting levels below 8,
+which is the ANSI-C limit. This was done to comply with the MISRA-C
+rule 1.1 (all code shall conform to ANSI/ISO C).
+
+NOTE: This modifications have impact on most QP/C++ ports, because
+the qp_port.h header file must be removed from the port.
+
+2. Enabled the QP namespace in most QP/C++ ports (except the DOS ports
+with the Open Watcom compiler). This modification was needed for
+MISRA-C++:2008 compliance with the rule 7-3-1.
+
+NOTE: This modifications have impact on most QP/C++ ports, because
+all QP elements require now using the QP:: prefix. However, this prefix
+can be dropped when the application applies the "using namespace QP"
+directive. (The "using" directive deviates from MISRA-C++:2008 rule
+7-3-4, so it is not used in the MISRA-compliant examples. However,
+a number of QP ports applies the "using" directive for backwards
+compatibilty.)
+
+3. Added the PC-Lint option files std.lnt and lib-qpcpp.lnt to the
+qcppp/include/ directory.
+
+4. Cleaned the whole QP/C code from lint comments. All PC-Lint options
+have been moved to PC-Lint option files.
+
+5. Modified QP assertion macro Q_DEFINE_THIS_MODULE() to avoid using
+the # operator (MISRA rule 16-3-2). This macro now requires the argument
+enclosed in doble quotes "".
+
+NOTE: This modification has impact on some QP/C++ ports.
+
+6. Added typedefs for char_t, int_t, float32_t, and float64_t to
+event.h header file for compliance with MISRA-C++:2008 rules 3-9-2.
+
+7. Added macros Q_STATE_CAST() and Q_EVENT_CAST() to qep.h to
+encapsulate deviation from MISRA-C++:2008 rule 5-2-7.
+
+8. Added macro Q_UINT2PTR_CAST() to encapsulate casting unsigned
+integers to pointers, which deviates from MISRA-C++:2008 rules 5-2-7
+and 5-2-8. This macro has been added for *application-level* code.
+
+9. Updated ARM Cortex-M examples with the latest CMSIS v3.0, which
+complies with more MISRA-C:2004 rules.
+
+10. Added DPP examples for MISRA-C++:2008 compliant applications (for
+IAR-ARM and GNU-ARM).
+
+11. Updated ARM-Cortex-M3 port with GNU to the latest Sourcery
+CodeBench 2011.09-60.
+
+12. Added QP/C++ port to Win32-1t and examples (Windows with 1 thread).
+This port is useful for testing embedded QP/C++ applications on windows.
+
+13. Added documentation to QP/C++ distribution in the directory
+qpcpp/doc/, with the following Application notes:
+"MISRA-C++:2008 Compliance Matrix", "Quantum Leaps Coding Standard",
+"QP and ARM Cortex-M, and QP and Windows",
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_3_00 Version 4.3.00, 2011-11-03
+
+1. This release changes the names of critical section macros and
+introduces macros for unconditional interrupt disabling/enabling.
+This is done to simplify and speed up the built-in Vanilla and QK
+kernels, which no longer are dependent on the interrupt locking
+policy.
+
+NOTE: The change in handling the critical section in the Vanilla and
+QK kernels can break QP ports, which use the "save and restore
+interrupt lock" policy, because all such ports must also define
+unconditional interrupt disabling and enabling.
+
+2. This release changes the partitioning of the QK scheduler.
+Specifically, the QK scheduler is now divided between two functions
+QK_schedPrio_() and QK_sched_(), to calculate the highest-priority
+task ready to run and to perform scheduling, respectively. The function
+QK_schedPrio_() is useful to determine if scheduling is even necessary.
+
+3. Updated all QP ports to comply with the new critical section
+names and policies.
+
+4. Modified the ARM Cortex-M port qk_port.s to take advantage of the
+new structure of the QK scheduler.
+
+5. Upgraded the examples for ARM Cortex with IAR EWARM to the
+latest IAR EWARM version 6.30.
+
+6. Upgraded the examples for ARM Cortex with GNU (CodeSourcery) to the
+latest Sourcery CodeBench 2011.07-60.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_2_04 Version 4.2.04, 2011-09-24
+
+The main pupose of this relase is to provide a bug fix for the QK port
+to ARM Cortex processors. The bug fix addresses a very rare and
+undocumented behavior of late-arrival of an interrupt while entering
+the PendSV exception. In this case the PENDSVSET bit in the NVIC-ICSR
+register is *not* cleared when finally PendSV is entered, so the
+PendSV exception is entered in a *different* state when it is entered
+via the late-arrival mechanism versus the normal activation of the
+exception through tail-chaining. The consequence of this undocumented
+and inconsistent hardware behavior, PendSV could be re-entered again
+before the SVCall exception cleans up the stack. The bug fix is
+implemented in the qk_port.s file and consists of clearing the
+PENDSVSET bit programmatically inside PendSV_Handler.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_2_02 Version 4.2.02, 2011-09-08
+
+1. The main pupose of this relase is to repackage the default QP/C++
+distribution to contain the single root directory qpcpp/ in the
+archive. That way, unziping the archive will produce only one
+directory (qpcpp/), which can be then changed by the user.
+
+2. This release also changes the ARM Cortex QP ports with GNU. The
+suffix "_cs" has been added to all QP libraries generated by the
+Code Sourcery toolset (now Mentor Sourcery CodeBench). This is to
+distinguish libraries generated by different GNU-toolchains (such
+as CodeRed, Attolic, DevKit ARM, etc.)
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_2_01 Version 4.2.01, 2011-08-13
+
+1. Modified file qassert.h to add assertion macros #Q_ASSERT_ID,
+#Q_REQUIRE_ID, #Q_ENSURE_ID, #Q_INVARIANT_ID, and #Q_ERROR_ID,
+which are better suited for unit testig, because they avoid the
+volatility of line numbers for indentifying assertions.
+
+2. Added QP port and examples for Mac OS X on 80x86.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_2_00 Version 4.2.00, 2011-07-15
+
+The goal of this milestone release is to extend the number of event
+pools (theoretically up to 255 pools) instead of just three event
+pools available up til now. This release adds an option to use
+constructors/destructors and virtual functions in subclasses of QEvent.
+Also, this release adds an option to wrap the whole QP framework in
+the QP namespace to avoid name conflicts with other libraries and to
+improve QP compliance with MISRA C++ 2008. This release adds also
+several improvements to the QS/QSPY software tracing, such as adding
+sender information to event posting so that sequence diagrams could be
+easily and automatically reconstructed from tracing data. Also, the
+tracing now supports 64-bit targets, such as embedded Linux 64-bit.
+Finally, this milestone release migrates the examples to use the
+environment variable QPCPP instead of relying on the relative path to
+the QP/C++ framework. This allows easier adaptation of the examples for
+real projects, which don't really belong to the examples directory.
+
+The changes in detail are:
+
+1. Changed the QEvent base class (file qevent.h). The private member
+'dynamic_' has been replaced by two members 'poolId_' and 'refCtr_'.
+
+2. Added conditionally-compiled constructor and virtual destructor
+to the QEvent base class (file qevent.h). Also added the inclusion
+of the header file for placement new if the constructor/
+destructor option is configured.
+
+3. Added new version of the macro #Q_NEW() with variable number of
+paramters, which invokes the event constructor (via placement new)
+with any parameters requried by the event constructor (file qf.h).
+
+4. Added explicit call to the event destructor in QF::gc() (file
+qf_gc.cpp).
+
+5. Added configuration macro QF_MAX_EPOOL (file qf.h) to define the
+maximum number of event pools in the QP application (default to 3).
+The maximum theoretical number of this macro is 255.
+
+6. Made algorithmic changes in the QF source code related to the change
+of storing the event pool-IDs and reference counters inside QEvent.
+
+7. Changed the default signal size (macro Q_SIGNAL_SIZE in the file
+qevent.h) from 1 to 2 bytes.
+
+8. Changed the signature of QActive::recall() to return uint8_t instead
+of QEvent*, which this could encourage incorrect usage (processing of
+the event at the point of recalling it). Now, the function only returns
+1 (TRUE) if the event was recalled and 0 (FALSE) if the event was not
+recalled.
+
+9. Added the QTimeEvt() constructor and new source file qte_ctr.cpp.
+The function returns the counter of a time event, which allows using
+a time event for measuring the time.
+
+10. Added new QF macros #QF_TICK, #QF_PUBLISH, and #QACTIVE_POST in
+file qf.h to provide sender of the events for software tracing.
+
+11. Added new QS macros (files qs.h and qs_dummy.h) for handling 64-bit
+integers.
+
+12. Added the functions QS::u64() and QS::u64_() and new source file
+qs_u64.cpp.
+
+13. Added the QS macro #QS_U32_HEX_T for hexadecimal formatting of
+integer numbers in the user-defined trace records.
+
+14. Added the new port linux64 for 64-bit Linux. Also added the
+corresponding examples for 64-bit Linux.
+
+15. Adapted the QSPY host application for 64-bit pointer sizes and
+the changed layout of trace records that contain event information
+(such as PoolID and RefCtr). Also added the backwards-compatibility
+option (-v) for switching the tool to the previous data format.
+
+16. Removed the tools directory from the QPC distribution and moved
+the QSPY host application to the QTOOLS distribution, which now also
+contains the GNU make tools for Windows.
+
+17. Modified the make files and project files to use the environment
+variable QPCPP instead of relying on the relative path to the QP/C++
+framework.
+
+18. Upgraded the examples for ARM Cortex with IAR EWARM to the
+latest IAR EWARM 6.20.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_07 Version 4.1.07, 2011-02-28
+
+The goal of this release is to improve the ease of experimenting with
+QP/C++ on the desktop. This release adds support for Windows (Win32) to
+the baseline code. Two most popular compilers for Windows are supported:
+Microsoft Visual Studio and MinGW (GNU). The support for Linux has been
+improved by including pre-built QP/C++ libraries and improving makefiles
+for Eclipse compatibility.
+
+The changes in detail are:
+
+1. Added Win32 port with the Visual C++ 2008 (ports/80x86/win32/vc2008).
+This directory contains the Visual Studio solution all_qp.sln for
+building all QP/C++ libraries from the IDE. Three build configurations
+(Debug, Release, and Spy) are supported.
+
+2. Added Win32 port with the MinGW comiler (ports/80x86/win32/mingw).
+This directory contains the Makefile for building all QP/C++ libraries.
+Three build configurations (dbg, rel, and spy) are supported.
+NOTE: the Makefile assumes that the MinGW/bin directory is added
+to the PATH.
+
+3. Added Win32 examples for Visual C++ 2008 (examples/80x86/win32/
+vc2008/dpp and examples/80x86/win32/vc2008/qhsmtst). Visual Studio
+soultions are provides for all build configurations.
+
+4. Added Win32 examples for MinGW (examples/80x86/win32/mingw/dpp
+and examples/80x86/win32/mingw/qhsmtst). Eclipse-compatible makefiles
+are provided for all build configurations. NOTE: the Makefiles assume
+that the MinGW/bin directory is added to the PATH.
+
+5. Removed memory alignment correction in the file qmp_init.c. This
+correction required casting of pointers to integers and was problematic
+on 64-bit targets (such as 64-bit Linux).
+
+6. Upgraded the examples for ARM Cortex with CodeSourcery to the
+latest Sourcery G++ 2011.02-2.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_06 Version 4.1.06, 2011-01-07
+
+1. Fixed a bug in the software tracing instrumentation in the function
+QF::remove_(), file qf_act.cpp.
+
+2. Made cosmetic improvements to the example QM models of the
+"Fly 'n' Shoot" game.
+
+3. Made improvements in make.bat files for building the examples for
+DOS/Open Watcom to run better in DosBox on Linux.
+
+4. Upgraded the examples for ARM Cortex with IAR to the latest
+IAR EWARM version 6.10.
+
+5. Upgraded the examples for ARM Cortex with CodeSourcery to the
+latest Sourcery G++ 2010.09-66.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_05 Version 4.1.05, 2010-11-01
+
+This release is adds examples for the QM (QP Modeler) graphical modeling
+and code generation tool. The examples are based on the "Fly 'n' Shoot"
+game described in the QP/C++ Tutorial and in Chapter 1 of the PSiCC2 book.
+
+Specifically, the directory /examples/80x86/dos/watcom/l/game-qm/
+contains the "Fly 'n' Shoot" game model file "game.qm". This model, when
+opened in the QM tool contains all state machine diagrams and generates
+code into the subdirectory qm_code/. This code can then be built and
+executed on any 80x86 machine (newer versions of Windows or Linux require
+the DOSbox application, see http://www.dosbox.com).
+
+The directory /examples/arm-cortex/vanilla/iar/game-ev-lm3s811-qm/
+contains the version of the game for the EV-LM3S811 ARM Cortex-M3 board.
+This directory contains the model file "game.qm", which is actually
+identical as the model in the DOS version. The LM3S811 version needs to
+be compiled with the IAR compiler and executed on the EV-LM3S811 board.
+
+Additionally, the QP/C++ baseline code has been slighlty modified for
+better conformance to the MISRA C++ 2008 rules and the latest PC-Lint 9.x.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_04 Version 4.1.04, 2010-05-16
+
+This release is adds compatibility of all examples for DOS with the DOSBox
+emulator (http://www.dosbox.com/) that recreates a MS-DOS compatible
+environment on all versions of Windows, including 64-bit Windows that don't
+run 16-bit DOS applications anymore.
+
+Also, this release includes QP ports and examples for EV-LM3S811 board with
+the GNU-based Code Sourcery G++ toolset. Support for Sourcery G++ provides
+a very cost-effective option for developing QP applications for ARM Cortex
+MCUs.
+
+Finally, this release improves the Cortex Microcontroller Software Interface
+Standard (CMSIS) for the whole family of the Stellaris LM3Sxxx MCUs. The
+improvement extends the CMSIS from Sandstorm to Fury, DustDevil, and Tempest
+Stellaris families.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_03 Version 4.1.03, 2010-01-21
+
+This release is concerned with the ARM Cortex ports and examples.
+Specifically, this release contains the following improvements:
+
+1. Unified source code for ARM Cortex-M3 and the new ARM Cortex-M0 cores,
+including the code for the preemptive QK kernel.
+
+2. Compliance with the Cortex Microcontroller Software Interface Standard
+(CMSIS) in all ARM Cortex examples.
+
+3. Backward-compatible support for the new LM3S811 EVAL Rev C board with
+different OLED display than previous revisions. (NOTE: The OSRAM 96x16x1 OLED
+used in REV A-B boards has been replaced RITEK 96x16x1 OLED used in Rev C.)
+
+In the process of making the examples CMSIS-compliant, the dependency on the
+Luminary Micro driver library (driverlib.a) has been completely removed.
+
+Additionally, the screen saver of the "Fly 'n' Shoot" game has been improved
+to periodically switch off the power of the OLED display, which better
+protects the display from burn-in. The affected file is tunnel.cpp.
+
+Finally, this release introduces the QP_VERSION macro, which identifies the QP
+version. Otherwise, this maintenance release does not change the QP/C API in
+any way, so the release has NO IMPACT on the QP/C applications except for the
+ARM Cortex ports and applications.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_02 Version 4.1.02, 2010-01-14
+
+The purpose of this minor maintenance release is the change in the directory
+structure for the ARM Cortex ports and examples. As new ARM Cortex cores are
+becoming available, the old port name "cortex-m3" could be misleading, because
+it actually applies to wider range of ARM Cortex cores. Consequently, all ARM
+Cortex ports and examples are hosted in the directory tree called
+"arm-cortex".
+
+This maintenance release does not change the QP/C++ API in any way, so the
+release has NO IMPACT on the QP/C++ applications except for the ARM Cortex
+ports.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_01 Version 4.1.01, 2009-11-05
+
+The main purpose of this release is to replace the Turbo C++ 1.01 toolset
+with the Open Watcom C/C++ toolset, because Turbo C++ 1.01 is no longer
+available for a free download. In contrast, Open Watcom is distributed under
+an OSI-certified open source license, which permits free commercial and
+non-commercial use. Open Watcom can be downloaded from www.openwatcom.org.
+
+All 80x86/DOS and 80x86/qk ports and examples for Turbo C++ 1.01 have been
+replaced with ports and examples for Open Watcom. The make.bat scripts are
+provided to build the QP/C++ libraries and examples.
+
+In the process of converting the examples to Open Watcom two new examples
+have been added to the standard QP/C++ distribution. The Calc2 example
+located in <qpcpp>/examples/80x86/dos/watcom/l/calc2 shows how to derive
+state machine classes with QP 4.x. The SLS example located in
+<qpcpp>/examples/80x86/dos/watcom/l/sls shows the implemenation of the
+new State-Local Storage state design pattern.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_1_00 Version 4.1.00, 2009-10-09
+
+The release provides brings a number of improvements to QP/C++ and updates
+the QP/C++ ARM Cortex-M3 examples for the EK-LM3S811 board to the latest
+IAR EWARM 5.40. Due to the acquisition of Liminary Micro by Texas Instruments
+the directory IAR structure for the examples and drivers has changed and the
+QP examples had to be changed accordingly.
+
+This maintenance release does not change the QP/C++ API in any way, so the
+release has NO IMPACT on the QP/C++ applications.
+
+The main changes in QP v4.1.00 with respect to earlier versions are as
+follows:
+
+- in qs.h added a new trace record QS_QEP_DISPATCH logged when an event is
+dispatched to a state machine. This timestamped trace record marks the
+beginning of an RTC step. The end of the RTC step is marked by the existing
+timestamped trace records QS_QEP_INTERN_TRAN, QS_QEP_INIT_TRAN, and
+QS_QEP_IGNORED, depending on how the event is handled. The new QS_QEP_DISPATCH
+record facilitates measurement of the RTC step lengths.
+- in qhsm_dis.cpp added generation of the QS_QEP_DISPATCH trace record.
+- in the tools/qspy/ sub-directory added output of the new trace record to the
+Q-SPY host application.
+- in the tools/qspy/matlab/ sub-directory added processing of the new trace
+record to the qspy.m script.
+- in qpset.h changed the implementation of the Priority Set. In particular,
+the QPSet64 now derives from QPSet8, which enables a common way of testing for
+non-empty set (e.g., useful in assembly). Also, the findMax() functions in
+QPSet8 and QPSet64 now can work with an empty set, in which case they return
+0.
+- in qk_sched.cpp simplified the QK_schedule_() function to skip the testing
+of the ready-set for non-empty condition. Such test is no longer necessary.
+The test can still be performed outside the QK_schedule_() function (e.g., in
+assembly) to avoid calling the scheduler if the ready set is empty.
+- in qk_ext.cpp simplified the QK_scheduleExt_() function in the same way as
+QK_schedule_().
+- modified make.bat files for building QP libraries in the ports/ directory
+to use the externally defined environment variables for the location of the
+toolchains. The defaults are applied only when the environment variable is
+not defined. This enables greater flexibility in installing the development
+tools in different directories than those chosen by Quantum Leaps.
+- modified the ARM Cortex-M3 examples for the new IAR EWARM 5.40.
+- modified slighlty the Calculator example to allow extensibility.
+- in the ARM Cortex-M3 port file qk_port.s added explicit testing of the
+QK_readySet_ set for empty condition. This test allows avoiding calling the QK
+scheduler and two contex-switches if the ready-set is empty.
+- in the game example moved setting up the QS filters from main.cpp to bsp.cpp.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_0_04 Version 4.0.04 (Product) Apr 09, 2009
+
+The maintenance release introduces the virtual destructor in the QHsm and
+QFsm base classes. This is done to allow proper handling of virtual functions
+in the subclasses of QHsm or QFsm. Please note, however, that the change
+increases the size of every state machine object by the additional (hidden)
+virtual pointer (vptr).
+
+Also, this release provides a fix for the compile-time assertions, which did
+not work correctly for the GNU compiler family.
+
+Finally, the ARM Cortex-M3 examples have been recompiled with the newer
+IAR EWARM v5.30.
+
+This maintenance release does not change the QP/C++ API in any way, so the
+release has NO IMPACT on the QP/C++ applications.
+
+The main changes in QP v4.0.04 with respect to earlier version are as follows:
+
+- in qep.h file, virtual destructors have been added to QFsm and QHsm.
+- in qassert.h file the #Q_ASSERT_COMPILE macro has been modified to render
+a negative array dimension when the asserted condition is not TRUE.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_0_03 Version 4.0.03, 2008-12-27
+
+The main purpose of this release is to fix a bug in the QK preemptive kernel,
+which occurs only when the advanced QK features are used. Specifically, the QK
+priority-ceiling mutex could interfere with QK thread-local storage (TLS) or
+QK extended context switch. When the QK mutex is in use, the TLS or the
+extended context for this task could get saved to an incorrect priority level.
+
+The release 4.0.03 fixes the bug by strictly preserving the semantics of
+QK_currPrio_ variable. The mutex locking now uses a different variable
+QK_ceilingPrio_, which represents the ceiling-priority locked by the mutex.
+The QK scheduler and extended scheduler now perform an additional check to
+make sure that only tasks with priorities above the ceiling can run. To avoid
+that additional overhead, the user can define the macro QK_NO_MUTEX, which
+eliminates the QK mutex API and eliminates the additional tests in the QK
+schedulers.
+
+This maintenance release does not change the QP/C++ API in any way, so the
+release has NO IMPACT on the QP/C++ applications.
+
+The main changes in QP v4.0.03 with respect to earlier version are as follows:
+
+- in qk.h file, made the QK mutex API only visible when the macro QK_NO_MUTEX
+is *not* defined.
+- in qk_pkg.h file, added the QK_ceilingPrio_ external declaration when the
+macro QK_NO_MUTEX is not defined.
+- in qk_mutex.cpp file, changed priority-ceiling mutex implementation to use
+the QK_ceilingPrio_ instead of QK_currPrio_. Also, added compiler error when
+the macro QK_NO_MUTEX is definedthis and this file is included in the build.
+- in qk_sched.cpp file added testing priority against the QK_ceilingPrio_,
+when the macro QK_NO_MUTEX is not defined.
+- in qk_ext.cpp file added testing priority against the QK_ceilingPrio_,
+when the macro QK_NO_MUTEX is not defined.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_0_02 Version 4.0.02, 2008-11-15
+
+This maintenance release does not change the QP/C API in any way, so the
+release has NO IMPACT on the QP/C++ applications.
+
+The main changes in QP v4.0.02 with respect to earlier version are as follows:
+
+- in qep.h file, added comments to macros Q_TRAN() and Q_SUPER() to suppress
+the PC-lint warining about using the comma-operator (MISRA rule 42).
+- in qhsm_in.cpp file, fixed a bug in the QHsm::isIn() function. - fixed a bug
+in tunnel.cpp file ("Fly 'n' Shoot" game). The constant event HIT_WALL was not
+declared static.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_0_01 Version 4.0.01, 2008-06-09
+
+This maintenace release is made to allow using QS software tracing with
+the GNU compiler for AVR (WinAVR). Specifically, the output of the strings
+residing in ROM has been fixed.
+
+This maintenance release does not change the QP/C++ API in any way, so the
+release has NO IMPACT on the QP/C++ applications.
+
+The main changes in QP v4.0.01 with respect to earlier version are as follows:
+
+- in qs_.cpp file, updated the function QS::str_ROM_().
+- in qs_str.cpp file, updated the function QS::str_ROM().
+- in qvanilla.cpp file, funciton QF::run(), declared the temporary variables
+as static to save stack space, because QF::run() never returns and is not
+reentrant.
+
+
+------------------------------------------------------------------------------
+\section qpcpp_4_0_00 Version 4.0.00, 2008-04-07
+
+This milestone release is made for the book /ref PSiCC2. The book describes in
+great detail this new release. The older "QP Programmer's Manual" is now
+phased out and is replaced with this hyper-linked
+/ref main_page "QP/C++ Reference Manual", which provides very detailed, easily
+searchable reference to the software. The book /ref PSiCC2 provies in-depth
+discussion of the relevant concepts as well as the design study of QP v4.0.
+
+The main changes in QP v4.0 with respect to earlier versions are as follows:
+
+- the coding techniques for hierarchical state machines (HSMs) and the simpler
+finite state machines (FSMs) have changed. While the changes are quite simple,
+the backward compatibility with QEP 3.x has been broken, meaning that some
+manual changes to the state machines implemented with earlier versions are
+necessary. Please refer to the "QP/C++ Tutorial" Section /ref coding_hsm for
+more information about coding state machines with QEP 4.x.
+ - The main change is the signature of a state-handler function, which now
+ returns simply a byte. This return type (typedef'ed as QState) is the
+ status of the event-handling that the state handler conveys to the QEP
+ event processor.
+ - The macro #Q_TRAN() must now always follow the return statement.
+ - The new macro #Q_SUPER() designates the superstate of the given state.
+ Again, this macro must follow the return statement.
+ - Then two new macros #Q_HANDLED() and #Q_IGNORED() have been added to
+ return the status of event handled and event ignored, respectively.
+
+- all callback functions are now consistently called /c XXX_onYYY() or
+/c XXX::onYYY():
+ - Q_assert_handler() is now Q_onAssert()
+ - QF::start() is now QF::onStartup()
+ - QF::cleanup() is now QF::onCleanup()
+
+- the new header file qevent.h has been broken off the qep.h header file.
+qevent.h contains the QEvent class and other basic facilities used in the
+whole QP. This new file allows easier replacement of the entire QEP event
+processor with custom event processors, if you wish do so.
+- the macro QEP_SIGNAL_SIZE is renamed to #Q_SIGNAL_SIZE.
+- the data type QSTATE is now deprecated. Please use QP::QState.
+- the #QF_FSM_ACTIVE macro is now deprecated. Instead, please define
+#QF_ACTIVE_SUPER_ to the base class of QP::QActive and #QF_ACTIVE_STATE_ to the
+data type represented state. By default, these macros are defined to use the
+QP::QHsm base class from the QEP hierarchical event processor, but you can
+replace the event processor, if you wish.
+- the internal macro QACTIVE_OSOBJECT_WAIT_() is now #QACTIVE_EQUEUE_WAIT_().
+- the internal macro QACTIVE_OSOBJECT_SIGNAL_() is now
+#QACTIVE_EQUEUE_SIGNAL_().
+- the internal macro QACTIVE_OSOBJECT_ONIDLE_() is now
+#QACTIVE_EQUEUE_ONEMPTY_().
+- the data mebers QActive::m_osObject and QActive::m_thread are now present
+only if the macros #QF_OS_OBJECT_TYPE and #QF_THREAD_TYPE are defined.
+- the QP::QPSet class has been renamed to QP::QPSet64.
+- the QPSet::hasElements() has been renamed QPSet64::notEmpty()
+- the QS software tracing is now better integrated with all QP components. You
+no longer need to explicitly include qs_port.h, because it is automatically
+included when you define the macro #Q_SPY. Also the file qs_dummy.h is
+included automatically when the macro #Q_SPY is not defined.
+- the new header file qvanilla.h now replaces the file qsched.h.
+- the macros QF_SCHED_LOCK() and QF_SCHED_UNLOCK() are now obsolete.
+- the native QF event queues (both the active object event queues and the
+"raw" thread-safe queues) are slightly more efficient by counting down the
+/c head and /c tail pointers rather than up. This leads to wrap-around at
+zero, which is easier (faster) to test than any other wrap-around point.
+Also the native QF event queues maintain the minimum of the free events in the
+queue rather the maximum of used events.
+- the data member of QEQueue::nTot class is removed.
+- the QF::publish() function has been re-written so that QF no does not
+need to lock the scheduler. The QF::publish() function posts events
+to active objects with scheduler unlocked starting from the highest-priority
+active objects. However, the event is protected from inadvertent recycling by
+incrementing its reference counter before the publish operation. After the
+event is posted to all subscribers, the garbage collector QF::gc() is called
+to decrement the reference counter and recycle the event, if necessary.
+- the qf_run.cpp file is obsolete. The QF::run() function for the cooperative
+"vanilla" kernel is now implemented in the file qvanilla.cpp.
+- the QF::tick() function has been rewritten to allow calling QF::tick() from
+the task context as well as from the interrupt context. The nested critical
+section around QF::tick() is no longer needed when it is called from the task
+level. Among others, this re-design eliminates the need for the
+recursive mutex in the POSIX QF port.
+- the QMPool::init() function has been re-designed to optimally align the
+memory buffer in a portable and platform-independent way. This should bring
+some performance improvements on some CPUs (e.g., 80x86).
+- the extended QK scheduler has been re-designed to save stack space. The
+extended context (e.g., coprocessor registers) are no longer saved on the
+precious stack, but rather in the active object.
+- a bug has been fixed in handling of Thread-Local Storage (TLS) in the QK
+scheduler and extended scheduler.
+
+- the -q (quiet) flag has been added to the QSPY host application.
+- the support for two new compilers for Windows has been added for the QSPY
+host application. The application can now be build with the MinGW GNU compiler
+for Windows as well as the Microsoft Visual C++ 2005.
+
+- the QP port to Linux has been improved by eliminating the need for recursive
+P-Thread mutex.
+
+- the QP port to MicroC/OS-II has been upgraded to the latest version 2.86.
+
+- all examples in the standard QP distribution have been cleaned up and
+updated to the latest QP API changes.
+- all examples that use QF now contain the QS software tracing support.
+
+*/
+
+} // namespace QP
diff --git a/doxygen/images/AN_Getting_Started_with_QPC.jpg b/doxygen/images/AN_Getting_Started_with_QPC.jpg
new file mode 100644
index 00000000..0f427d09
Binary files /dev/null and b/doxygen/images/AN_Getting_Started_with_QPC.jpg differ
diff --git a/doxygen/images/AN_MISRA.jpg b/doxygen/images/AN_MISRA.jpg
new file mode 100644
index 00000000..a2fefe09
Binary files /dev/null and b/doxygen/images/AN_MISRA.jpg differ
diff --git a/doxygen/images/AN_Simple_OOP_in_C.jpg b/doxygen/images/AN_Simple_OOP_in_C.jpg
new file mode 100644
index 00000000..81a43da7
Binary files /dev/null and b/doxygen/images/AN_Simple_OOP_in_C.jpg differ
diff --git a/doxygen/images/Arduino-UNO_button.jpg b/doxygen/images/Arduino-UNO_button.jpg
new file mode 100644
index 00000000..8ef02e72
Binary files /dev/null and b/doxygen/images/Arduino-UNO_button.jpg differ
diff --git a/doxygen/images/Arduino-UNO_button_schem.jpg b/doxygen/images/Arduino-UNO_button_schem.jpg
new file mode 100644
index 00000000..d1f7517c
Binary files /dev/null and b/doxygen/images/Arduino-UNO_button_schem.jpg differ
diff --git a/doxygen/images/FA1.jpg b/doxygen/images/FA1.jpg
new file mode 100644
index 00000000..b8f2b59b
Binary files /dev/null and b/doxygen/images/FA1.jpg differ
diff --git a/doxygen/images/SM_blinky.png b/doxygen/images/SM_blinky.png
new file mode 100644
index 00000000..9c9594e4
Binary files /dev/null and b/doxygen/images/SM_blinky.png differ
diff --git a/doxygen/images/bd_AT91SAM7S-EK.jpg b/doxygen/images/bd_AT91SAM7S-EK.jpg
new file mode 100644
index 00000000..b25bf57b
Binary files /dev/null and b/doxygen/images/bd_AT91SAM7S-EK.jpg differ
diff --git a/doxygen/images/bd_AT91SAM7S-EK_J-Link.jpg b/doxygen/images/bd_AT91SAM7S-EK_J-Link.jpg
new file mode 100644
index 00000000..3657a646
Binary files /dev/null and b/doxygen/images/bd_AT91SAM7S-EK_J-Link.jpg differ
diff --git a/doxygen/images/bd_Arduino-UNO.jpg b/doxygen/images/bd_Arduino-UNO.jpg
new file mode 100644
index 00000000..4463bb82
Binary files /dev/null and b/doxygen/images/bd_Arduino-UNO.jpg differ
diff --git a/doxygen/images/bd_EK-LM3S6965.jpg b/doxygen/images/bd_EK-LM3S6965.jpg
new file mode 100644
index 00000000..de0d5580
Binary files /dev/null and b/doxygen/images/bd_EK-LM3S6965.jpg differ
diff --git a/doxygen/images/bd_EK-LM3S6965_lwip.jpg b/doxygen/images/bd_EK-LM3S6965_lwip.jpg
new file mode 100644
index 00000000..7f297db9
Binary files /dev/null and b/doxygen/images/bd_EK-LM3S6965_lwip.jpg differ
diff --git a/doxygen/images/bd_EK-LM3S811.jpg b/doxygen/images/bd_EK-LM3S811.jpg
new file mode 100644
index 00000000..68c4f7e8
Binary files /dev/null and b/doxygen/images/bd_EK-LM3S811.jpg differ
diff --git a/doxygen/images/bd_EK-LM3S811_game.jpg b/doxygen/images/bd_EK-LM3S811_game.jpg
new file mode 100644
index 00000000..6c780aa7
Binary files /dev/null and b/doxygen/images/bd_EK-LM3S811_game.jpg differ
diff --git a/doxygen/images/bd_EK-TM4C123GXL.jpg b/doxygen/images/bd_EK-TM4C123GXL.jpg
new file mode 100644
index 00000000..28aa3568
Binary files /dev/null and b/doxygen/images/bd_EK-TM4C123GXL.jpg differ
diff --git a/doxygen/images/bd_MSP-EXP430F5529LP.jpg b/doxygen/images/bd_MSP-EXP430F5529LP.jpg
new file mode 100644
index 00000000..b912a069
Binary files /dev/null and b/doxygen/images/bd_MSP-EXP430F5529LP.jpg differ
diff --git a/doxygen/images/bd_MSP-EXP430G2.jpg b/doxygen/images/bd_MSP-EXP430G2.jpg
new file mode 100644
index 00000000..c557c8fb
Binary files /dev/null and b/doxygen/images/bd_MSP-EXP430G2.jpg differ
diff --git a/doxygen/images/bd_NUCLEO-L053R8.jpg b/doxygen/images/bd_NUCLEO-L053R8.jpg
new file mode 100644
index 00000000..3e18a553
Binary files /dev/null and b/doxygen/images/bd_NUCLEO-L053R8.jpg differ
diff --git a/doxygen/images/bd_NUCLEO-L152RE.jpg b/doxygen/images/bd_NUCLEO-L152RE.jpg
new file mode 100644
index 00000000..ba76a3a0
Binary files /dev/null and b/doxygen/images/bd_NUCLEO-L152RE.jpg differ
diff --git a/doxygen/images/bd_STM32F4-Discovery.jpg b/doxygen/images/bd_STM32F4-Discovery.jpg
new file mode 100644
index 00000000..ed69bf4d
Binary files /dev/null and b/doxygen/images/bd_STM32F4-Discovery.jpg differ
diff --git a/doxygen/images/bd_STM32F4-Discovery_RS232.jpg b/doxygen/images/bd_STM32F4-Discovery_RS232.jpg
new file mode 100644
index 00000000..745bcf1d
Binary files /dev/null and b/doxygen/images/bd_STM32F4-Discovery_RS232.jpg differ
diff --git a/doxygen/images/bd_mbed-LPC1768.jpg b/doxygen/images/bd_mbed-LPC1768.jpg
new file mode 100644
index 00000000..6552e469
Binary files /dev/null and b/doxygen/images/bd_mbed-LPC1768.jpg differ
diff --git a/doxygen/images/blinky_ek-tm4c123gxl.gif b/doxygen/images/blinky_ek-tm4c123gxl.gif
new file mode 100644
index 00000000..9bed81a5
Binary files /dev/null and b/doxygen/images/blinky_ek-tm4c123gxl.gif differ
diff --git a/doxygen/images/com_msp-exp430g2.png b/doxygen/images/com_msp-exp430g2.png
new file mode 100644
index 00000000..f5a01551
Binary files /dev/null and b/doxygen/images/com_msp-exp430g2.png differ
diff --git a/doxygen/images/header_logo_ql.png b/doxygen/images/header_logo_ql.png
new file mode 100644
index 00000000..b6b9df7c
Binary files /dev/null and b/doxygen/images/header_logo_ql.png differ
diff --git a/doxygen/images/logo_qp.jpg b/doxygen/images/logo_qp.jpg
new file mode 100644
index 00000000..defb3abb
Binary files /dev/null and b/doxygen/images/logo_qp.jpg differ
diff --git a/doxygen/images/logo_qt.jpg b/doxygen/images/logo_qt.jpg
new file mode 100644
index 00000000..e76a3916
Binary files /dev/null and b/doxygen/images/logo_qt.jpg differ
diff --git a/doxygen/images/mbed-LPC1768_button.jpg b/doxygen/images/mbed-LPC1768_button.jpg
new file mode 100644
index 00000000..dd0418cd
Binary files /dev/null and b/doxygen/images/mbed-LPC1768_button.jpg differ
diff --git a/doxygen/images/qp_classes.png b/doxygen/images/qp_classes.png
new file mode 100644
index 00000000..c3000a1d
Binary files /dev/null and b/doxygen/images/qp_classes.png differ
diff --git a/doxygen/images/qp_components.jpg b/doxygen/images/qp_components.jpg
index c0a74fc7..6b83ed8b 100644
Binary files a/doxygen/images/qp_components.jpg and b/doxygen/images/qp_components.jpg differ
diff --git a/doxygen/images/qt_game-gui.png b/doxygen/images/qt_game-gui.png
new file mode 100644
index 00000000..75dbb9cf
Binary files /dev/null and b/doxygen/images/qt_game-gui.png differ
diff --git a/doxygen/images/qt_pelican-gui.png b/doxygen/images/qt_pelican-gui.png
new file mode 100644
index 00000000..849a0307
Binary files /dev/null and b/doxygen/images/qt_pelican-gui.png differ
diff --git a/doxygen/images/qtcreator_game-gui.png b/doxygen/images/qtcreator_game-gui.png
new file mode 100644
index 00000000..ee4876b0
Binary files /dev/null and b/doxygen/images/qtcreator_game-gui.png differ
diff --git a/doxygen/images/qtdesign_game-gui.png b/doxygen/images/qtdesign_game-gui.png
new file mode 100644
index 00000000..b7108ba2
Binary files /dev/null and b/doxygen/images/qtdesign_game-gui.png differ
diff --git a/doxygen/images/qtdesign_pelican-gui.png b/doxygen/images/qtdesign_pelican-gui.png
new file mode 100644
index 00000000..b15f1ceb
Binary files /dev/null and b/doxygen/images/qtdesign_pelican-gui.png differ
diff --git a/doxygen/images/threadx_dpp.jpg b/doxygen/images/threadx_dpp.jpg
new file mode 100644
index 00000000..2c3c4e2c
Binary files /dev/null and b/doxygen/images/threadx_dpp.jpg differ
diff --git a/doxygen/images/under_construction.jpg b/doxygen/images/under_construction.jpg
new file mode 100644
index 00000000..ba733f0f
Binary files /dev/null and b/doxygen/images/under_construction.jpg differ
diff --git a/doxygen/img/board.png b/doxygen/img/board.png
new file mode 100644
index 00000000..ea9d1832
Binary files /dev/null and b/doxygen/img/board.png differ
diff --git a/doxygen/img/checkboxoff.png b/doxygen/img/checkboxoff.png
new file mode 100644
index 00000000..a68a3218
Binary files /dev/null and b/doxygen/img/checkboxoff.png differ
diff --git a/doxygen/img/checkboxon.png b/doxygen/img/checkboxon.png
new file mode 100644
index 00000000..be666df9
Binary files /dev/null and b/doxygen/img/checkboxon.png differ
diff --git a/doxygen/img/extern.png b/doxygen/img/extern.png
new file mode 100644
index 00000000..acf260fc
Binary files /dev/null and b/doxygen/img/extern.png differ
diff --git a/doxygen/img/file.png b/doxygen/img/file.png
new file mode 100644
index 00000000..d2ce7ddd
Binary files /dev/null and b/doxygen/img/file.png differ
diff --git a/doxygen/img/file_doc.png b/doxygen/img/file_doc.png
new file mode 100644
index 00000000..803bd089
Binary files /dev/null and b/doxygen/img/file_doc.png differ
diff --git a/doxygen/img/file_header.png b/doxygen/img/file_header.png
new file mode 100644
index 00000000..6fe57c84
Binary files /dev/null and b/doxygen/img/file_header.png differ
diff --git a/doxygen/img/file_source_c.png b/doxygen/img/file_source_c.png
new file mode 100644
index 00000000..15aaa86b
Binary files /dev/null and b/doxygen/img/file_source_c.png differ
diff --git a/doxygen/img/file_source_cpp.png b/doxygen/img/file_source_cpp.png
new file mode 100644
index 00000000..a3241962
Binary files /dev/null and b/doxygen/img/file_source_cpp.png differ
diff --git a/doxygen/img/folder.png b/doxygen/img/folder.png
new file mode 100644
index 00000000..78ad6cd4
Binary files /dev/null and b/doxygen/img/folder.png differ
diff --git a/doxygen/img/forbidden.png b/doxygen/img/forbidden.png
new file mode 100644
index 00000000..c00505dd
Binary files /dev/null and b/doxygen/img/forbidden.png differ
diff --git a/doxygen/img/header_bg.png b/doxygen/img/header_bg.png
new file mode 100644
index 00000000..6d266d9c
Binary files /dev/null and b/doxygen/img/header_bg.png differ
diff --git a/doxygen/img/img.htm b/doxygen/img/img.htm
new file mode 100644
index 00000000..c4d648d0
--- /dev/null
+++ b/doxygen/img/img.htm
@@ -0,0 +1,29 @@
+
+
+
+
+
+QP built-in images
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doxygen/img/minus.png b/doxygen/img/minus.png
new file mode 100644
index 00000000..cd44ccc0
Binary files /dev/null and b/doxygen/img/minus.png differ
diff --git a/doxygen/img/model.png b/doxygen/img/model.png
new file mode 100644
index 00000000..d1e90ae2
Binary files /dev/null and b/doxygen/img/model.png differ
diff --git a/doxygen/img/movie.png b/doxygen/img/movie.png
new file mode 100644
index 00000000..34681065
Binary files /dev/null and b/doxygen/img/movie.png differ
diff --git a/doxygen/img/qp_link.png b/doxygen/img/qp_link.png
new file mode 100644
index 00000000..2c4ff760
Binary files /dev/null and b/doxygen/img/qp_link.png differ
diff --git a/doxygen/img/radiooff.png b/doxygen/img/radiooff.png
new file mode 100644
index 00000000..41921e3d
Binary files /dev/null and b/doxygen/img/radiooff.png differ
diff --git a/doxygen/img/radioon.png b/doxygen/img/radioon.png
new file mode 100644
index 00000000..bf6c784a
Binary files /dev/null and b/doxygen/img/radioon.png differ
diff --git a/doxygen/lint.dox b/doxygen/lint.dox
new file mode 100644
index 00000000..11a4ee4b
--- /dev/null
+++ b/doxygen/lint.dox
@@ -0,0 +1,6 @@
+/*! @page lint PC-Lint
+The QP/C framework comes with extensive support for automatic rule checking by means of PC-Lint, which is designed not just for proving compliance of the Q/CP framework code, but more importantly, to aid in checking compliance of the application-level code. Any organization engaged in designing safety-related embedded software could benefit from the unprecedented quality infrastructure built around the QP/C framework.
+
+@sa ports_lint
+
+*/
diff --git a/doxygen/log.txt b/doxygen/log.txt
new file mode 100644
index 00000000..6d44bde7
--- /dev/null
+++ b/doxygen/log.txt
@@ -0,0 +1,82 @@
+D:/qp/qpc/doxygen/macros.h:66: warning: Member QACTIVE_EQUEUE_SIGNAL_(me_) (macro definition) of file macros.h is not documented.
+D:/qp/qpc/doxygen/macros.h:76: warning: Member QACTIVE_EQUEUE_ONEMPTY_(me_) (macro definition) of file macros.h is not documented.
+D:/qp/qpc/include/qassert.h:197: warning: argument 'module' of command @param is not found in the argument list of Q_onAssert(char_t const Q_ROM *const file, int_t line)
+D:/qp/qpc/include/qassert.h:197: warning: The following parameters of Q_onAssert(char_t const Q_ROM *const file, int_t line) are not documented:
+ parameter 'file'
+D:/qp/qpc/include/qf.h:650: warning: explicit link request to 'Q_EVT_CTOR' could not be resolved
+D:/qp/qpc/include/qf.h:679: warning: explicit link request to 'Q_EVT_CTOR' could not be resolved
+D:/qp/qpc/include/qf.h:665: warning: The following parameters of Q_NEW_X(e_, evtT_, margin_, sig_) are not documented:
+ parameter 'e_'
+D:/qp/qpc/include/qf.h:191: warning: argument 'stkSize_' of command @param is not found in the argument list of QACTIVE_START(me_, prio_, qSto_, qLen_, stkSto_, stkLen_, param_)
+D:/qp/qpc/include/qf.h:191: warning: The following parameters of QACTIVE_START(me_, prio_, qSto_, qLen_, stkSto_, stkLen_, param_) are not documented:
+ parameter 'stkLen_'
+D:/qp/qpc/include/qf.h:567: warning: argument 'tickRate' of command @param is not found in the argument list of QF_TICK_X(tickRate_, sender_)
+D:/qp/qpc/include/qf.h:567: warning: argument 'sender' of command @param is not found in the argument list of QF_TICK_X(tickRate_, sender_)
+D:/qp/qpc/include/qf.h:567: warning: The following parameters of QF_TICK_X(tickRate_, sender_) are not documented:
+ parameter 'tickRate_'
+ parameter 'sender_'
+D:/qp/qpc/source/qf_actq.c:59: warning: The following parameters of QActive_post_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender) are not documented:
+ parameter 'sender'
+D:/qp/qpc/source/qf_actq.c:191: warning: expected whitespace after [ command
+D:/qp/qpc/source/qf_actq.c:183: warning: The following parameters of QActive_postLIFO_(QActive *const me, QEvt const *const e) are not documented:
+ parameter 'e'
+D:/qp/qpc/source/qf_time.c:57: warning: The following parameters of QF_tickX_(uint_fast8_t const tickRate, void const *const sender) are not documented:
+ parameter 'sender'
+D:/qp/qpc/include/qmpool.h:45: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/include/qmpool.h:72: warning: explicit link request to 'QMPoolCtr' could not be resolved
+D:/qp/qpc/include/qmpool.h:63: warning: Member QMPoolSize (typedef) of file qmpool.h is not documented.
+D:/qp/qpc/include/qmpool.h:89: warning: Member QMPoolCtr (typedef) of file qmpool.h is not documented.
+D:/qp/qpc/include/qmpool.h:72: warning: explicit link request to 'QMPoolCtr' could not be resolved
+D:/qp/qpc/include/qmpool.h:45: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/include/qs.h:178: warning: Member Q_ROM (macro definition) of file qs.h is not documented.
+D:/qp/qpc/include/qs.h:181: warning: Member Q_ROM_BYTE(rom_var_) (macro definition) of file qs.h is not documented.
+D:/qp/qpc/include/qs.h:1074: warning: Member QS_priv_ (variable) of file qs.h is not documented.
+D:/qp/qpc/include/qs.h:429: warning: explicit link request to 'QS_QF_ACTIVE_POST' could not be resolved
+D:/qp/qpc/include/qs.h:469: warning: explicit link request to 'QS_QF_EQUEUE_POST' could not be resolved
+D:/qp/qpc/include/qs.h:491: warning: explicit link request to 'QS_QF_TIMEEVT_PUBLISH' could not be resolved
+D:/qp/qpc/include/qv.h:48: warning: explicit link request to 'QEqueue' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:271: warning: Member crit_stat_t (typedef) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:211: warning: Member intDisable(void) (function) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:212: warning: Member intEnable(void) (function) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:272: warning: Member critEntry(void) (function) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:273: warning: Member critExit(QF_CRIT_STAT_TYPE stat) (function) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:274: warning: Member QV_onIdle(void) (function) of file qf_port.h is not documented.
+D:/qp/qpc/ports/lint/qf_port.h:152: warning: explicit link request to 'QMPoolCtr' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:150: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:151: warning: explicit link request to 'QMPoolCtr' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:128: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:126: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/ports/lint/qf_port.h:127: warning: explicit link request to 'QMPoolSize' could not be resolved
+D:/qp/qpc/ports/lint/qk_port.h:66: warning: explicit link request to 'QK_EXT_TYPE' could not be resolved
+D:/qp/qpc/ports/lint/qk_port.h:54: warning: explicit link request to 'QK_EXT_TYPE' could not be resolved
+D:/qp/qpc/ports/lint/stdbool.h:22: warning: Member __bool_true_false_are_defined (macro definition) of file stdbool.h is not documented.
+D:/qp/qpc/source/qep_msm.c:57: warning: Member l_msm_top_s (variable) of file qep_msm.c is not documented.
+D:/qp/qpc/source/qep_msm.c:451: warning: explicit link request to 'Q_RET_INIT' could not be resolved
+D:/qp/qpc/source/qf_actq.c:59: warning: The following parameters of QActive_post_(QActive *const me, QEvt const *const e, uint_fast16_t const margin, void const *const sender) are not documented:
+ parameter 'sender'
+D:/qp/qpc/source/qf_actq.c:191: warning: expected whitespace after [ command
+D:/qp/qpc/source/qf_actq.c:183: warning: The following parameters of QActive_postLIFO_(QActive *const me, QEvt const *const e) are not documented:
+ parameter 'e'
+D:/qp/qpc/source/qf_time.c:57: warning: The following parameters of QF_tickX_(uint_fast8_t const tickRate, void const *const sender) are not documented:
+ parameter 'sender'
+D:/qp/qpc/source/qs.c:47: warning: Member QS_priv_ (variable) of file qs.c is not documented.
+D:/qp/qpc/doxygen/exa_os.dox:41: warning: unable to resolve reference to `ports_win32' for \ref command
+D:/qp/qpc/doxygen/exa_os.dox:59: warning: unable to resolve reference to `ports_win32-qv' for \ref command
+D:/qp/qpc/doxygen/ports_rtos.dox:53: warning: Found unknown command `\uCOS'
+D:/qp/qpc/doxygen/history.dox:22: warning: unable to resolve reference to `ports_native:' for \ref command
+D:/qp/qpc/doxygen/history.dox:61: warning: Found unknown command `\win32'
+D:/qp/qpc/doxygen/history.dox:479: warning: explicit link request to 'if' could not be resolved
+D:/qp/qpc/doxygen/history.dox:464: warning: Unsupported xml/html tag found
+D:/qp/qpc/doxygen/history.dox:471: warning: Unsupported xml/html tag found
+D:/qp/qpc/doxygen/history.dox:107: warning: explicit link request to 'XXX_onYYY()' could not be resolved
+D:/qp/qpc/doxygen/history.dox:67: warning: explicit link request to 'QF_FSM_ACTIVE' could not be resolved
+D:/qp/qpc/doxygen/history.dox:68: warning: explicit link request to 'QF_ACTIVE_SUPER_' could not be resolved
+D:/qp/qpc/doxygen/history.dox:68: warning: explicit link request to 'QF_ACTIVE_CTOR_' could not be resolved
+D:/qp/qpc/doxygen/history.dox:68: warning: explicit link request to 'QF_ACTIVE_INIT_' could not be resolved
+D:/qp/qpc/doxygen/history.dox:69: warning: explicit link request to 'QF_ACTIVE_DISPATCH_' could not be resolved
+D:/qp/qpc/doxygen/history.dox:69: warning: explicit link request to 'QF_ACTIVE_STATE_' could not be resolved
+D:/qp/qpc/source/qf_pkg.h:101: warning: Member next (variable) of class QFreeBlock is not documented.
+D:/qp/qpc/include/qep.h:289: warning: Member target (variable) of class QMTranActTable is not documented.
+D:/qp/qpc/include/qep.h:290: warning: Member act[1] (variable) of class QMTranActTable is not documented.
+D:/qp/qpc/doxygen/ab.dox:136: warning: unable to resolve reference to `misra_lint' for \ref command
+D:/qp/qpc/doxygen/ab.dox:101: warning: unexpected token TK_EOF as the argument of ref
diff --git a/doxygen/qp_macros.h b/doxygen/macros.h
similarity index 100%
rename from doxygen/qp_macros.h
rename to doxygen/macros.h
diff --git a/doxygen/make.bat b/doxygen/make.bat
index 76a6eef1..1e35e7a9 100644
--- a/doxygen/make.bat
+++ b/doxygen/make.bat
@@ -1,8 +1,8 @@
@echo off
:: ==========================================================================
:: Product: QP/C++ script for generating Doxygen documentation
-:: Last Updated for Version: 5.3.1
-:: Date of the Last Update: 2014-09-18
+:: Last Updated for Version: 5.4.0
+:: Date of the Last Update: 2015-04.-03
::
:: Q u a n t u m L e a P s
:: ---------------------------
@@ -34,45 +34,57 @@
:: ==========================================================================
setlocal
-@echo usage:
-@echo make
-@echo make -CHM
+echo usage:
+echo make
+echo make -CHM
-@echo Cleanup...
-@echo off
-rm help\*.*
-rmdir /S /Q help\search
-@echo on
-
-set VERSION=5.3.1
+set VERSION=5.4.0
+:: Generate Resource Standard Metrics for QP/C++ .............................
set DOXHOME="C:\tools\doxygen\bin"
set RCMHOME="C:\tools\MSquared\M2 RSM"
-set RSM_OUTPUT=qpcpp_metrics.txt
-set RSM_INPUT=..\include\*.h ..\qep\source\*.h ..\qep\source\*.cpp ..\qf\source\*.h ..\qf\source\*.cpp ..\qk\source\*.h ..\qk\source\*.cpp ..\qs\source\*.h ..\qs\source\*.cpp
+set RSM_OUTPUT=metrics.dox
+set RSM_INPUT=..\include\*.h ..\source\*.h ..\source\*.cpp
echo /** \page metrics Code Metrics > %RSM_OUTPUT%
echo.>> %RSM_OUTPUT%
echo \code >> %RSM_OUTPUT%
-echo Standard Code Metrics for QP/C++ %VERSION% >> %RSM_OUTPUT%
+echo Standard Code Metrics for QP/C %VERSION% >> %RSM_OUTPUT%
%RCMHOME%\rsm.exe -fd -xNOCOMMAND -xNOCONFIG -u"File cfg rsm_qpcpp.cfg" %RSM_INPUT% >> %RSM_OUTPUT%
echo \endcode >> %RSM_OUTPUT%
echo */ >> %RSM_OUTPUT%
-@echo off
+:: Generate Doxygen Documentation ...........................................
if "%1"=="-CHM" (
-
+ echo Generating HTML...
::( type Doxyfile & echo GENERATE_HTMLHELP=YES ) | %DOXHOME%\doxygen.exe -
%DOXHOME%\doxygen.exe Doxyfile-CHM
+
+ echo Adding custom images...
+ xcopy preview.js tmp\
+ xcopy img tmp\img\
+ echo img\img.htm >> tmp\index.hhp
+
+ echo Generate CHM...
+ "C:\tools\HTML Help Workshop\hhc.exe" tmp\index.hhp
+
+ echo Cleanup...
+ rmdir /S /Q tmp
+ echo CHM file generated in ..\doc\
- @echo off
- @echo "C:\tools\HTML Help Workshop\hhw.exe"
- @echo In HHW: you need to add all img\*.htm files to the project
- @echo off
) else (
+ echo Cleanup...
+ rmdir /S /Q ..\..\doc\qpcpp
+
+ echo Adding custom images...
+ xcopy preview.js ..\..\doc\qpcpp\
+ xcopy img ..\..\doc\qpcpp\img\
+ copy images\favicon.ico ..\..\doc\qpcpp
+
+ echo Generating HTML...
%DOXHOME%\doxygen.exe Doxyfile
)
diff --git a/doxygen/metrics.dox b/doxygen/metrics.dox
new file mode 100644
index 00000000..889ecdab
--- /dev/null
+++ b/doxygen/metrics.dox
@@ -0,0 +1,2719 @@
+/** \page metrics Code Metrics
+
+\code
+ Standard Code Metrics for QP/C 5.4.0
+
+ Resource Standard Metrics (TM) for C, C++, C# and Java
+ Version 7.75 - mSquaredTechnologies.com
+
+ License Type: Windows Single User License
+ Licensed To : Quantum Leaps, LLC
+ License No. : WS2975 License Date: Dec 15, 2013
+ Build Date : Sep 2 2009 Run Date: May 14, 2015
+ (C)1996-2009 M Squared Technologies LLC
+ ________________________________________________________________________
+
+ ~~ Function Metrics ~~
+ ~~ Complexity Detail Analysis ~~
+
+ File: ..\include\qassert.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 43 eLOC 42 lLOC 3 Comment 240 Lines 303
+ ________________________________________________________________________
+ End of File: ..\include\qassert.h
+
+
+ File: ..\include\qep.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QEvt::QEvt
+ Parameters: (QSignal const s)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 0 Comment 2 Lines 1
+
+ Inline Function: QP::QEvt::~QEvt
+ Parameters: ()
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 1 Lines 1
+
+ Inline Function: QP::QMsm::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Inline Function: QP::QMsm::stateObj
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QMsm::qm_tran_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Inline Function: QP::QMsm::qm_tran_hist_
+ Parameters: (QMState const * const hist, QMTranActTable const * const ta
+ tbl)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 5 eLOC 3 lLOC 3 Comment 1 Lines 5
+
+ Inline Function: QP::QMsm::qm_tran_init_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QMsm::qm_tran_ep_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Inline Function: QP::QMsm::qm_tran_xp_
+ Parameters: (QActionHandler const xp, QMTranActTable const *const tatbl)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 5 eLOC 3 lLOC 3 Comment 2 Lines 5
+
+ Inline Function: QP::QMsm::qm_entry_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QMsm::qm_exit_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QMsm::qm_super_sub_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Inline Function: QP::QMsm::QM_HANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QMsm::QM_UNHANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QMsm::QM_SUPER
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QMsm::Q_HANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 3 Lines 3
+
+ Inline Function: QP::QMsm::Q_UNHANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 4 Lines 3
+
+ Inline Function: QP::QMsm::tran_
+ Parameters: (QStateHandler const target)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QMsm::tran_hist_
+ Parameters: (QStateHandler const hist)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QMsm::super_
+ Parameters: (QStateHandler const superstate)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QHsm::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Inline Function: QP::QHsm::state
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QEP::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 250 eLOC 218 lLOC 121 Comment 332 Lines 665
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 23
+ Total Function LOC.....: 74 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 53 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 34 Total Function Pts lLOC: 0.0
+ Total Function Params .: 15 Total Function Return .: 23
+ Total Cyclo Complexity : 23 Total Function Complex.: 61
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 5 Average Function LOC ..: 3.22
+ Max Function eLOC .....: 3 Average Function eLOC .: 2.30
+ Max Function lLOC .....: 3 Average Function lLOC .: 1.48
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 0.65
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 1.65
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 4 Avg Total Complexity ..: 2.65
+ ________________________________________________________________________
+ End of File: ..\include\qep.h
+
+
+ File: ..\include\qequeue.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QEQueue::getNFree
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 10 Lines 3
+
+ Inline Function: QP::QEQueue::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 10 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 44 eLOC 40 lLOC 22 Comment 184 Lines 255
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 6 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 4 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 2 Total Function Pts lLOC: 0.0
+ Total Function Params .: 0 Total Function Return .: 2
+ Total Cyclo Complexity : 2 Total Function Complex.: 4
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 2.00
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 0 Avg Function Parameters: 0.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 1 Avg Interface Complex. : 1.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 2 Avg Total Complexity ..: 2.00
+ ________________________________________________________________________
+ End of File: ..\include\qequeue.h
+
+
+ File: ..\include\qf.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const stkSize
+ )
+ Complexity Param 5 Return 1 Cyclo Vg 1 Total 7
+ LOC 4 eLOC 2 lLOC 1 Comment 1 Lines 4
+
+ Inline Function: QP::QMActive::getPrio
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QMActive::setPrio
+ Parameters: (uint_fast8_t const prio)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QMActive::getOsObject
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Inline Function: QP::QMActive::getThread
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Inline Function: QP::QTimeEvt::QTimeEvt
+ Parameters: (enum_t const sgnl) Non-ANSI Parameter Construct Defined By
+ Compiler Directive
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 5 Lines 8
+
+ Inline Function: QP::QTimeEvt::postIn
+ Parameters: (QMActive * const act, QTimeEvtCtr const nTicks)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QTimeEvt::postEvery
+ Parameters: (QMActive * const act, QTimeEvtCtr const nTicks)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Inline Function: QP::QTimeEvt::toActive
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Inline Function: QP::QTimeEvt::toTimeEvt
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Inline Function: QP::QF::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 236 eLOC 221 lLOC 93 Comment 442 Lines 776
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 11
+ Total Function LOC.....: 32 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 23 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 15 Total Function Pts lLOC: 0.0
+ Total Function Params .: 12 Total Function Return .: 11
+ Total Cyclo Complexity : 11 Total Function Complex.: 34
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 7 Average Function LOC ..: 2.91
+ Max Function eLOC .....: 5 Average Function eLOC .: 2.09
+ Max Function lLOC .....: 3 Average Function lLOC .: 1.36
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 5 Avg Function Parameters: 1.09
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 6 Avg Interface Complex. : 2.09
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 7 Avg Total Complexity ..: 3.09
+ ________________________________________________________________________
+ End of File: ..\include\qf.h
+
+
+ File: ..\include\qk.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QK::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 65 eLOC 61 lLOC 16 Comment 100 Lines 181
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 1
+ Total Function LOC.....: 3 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 2 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 1 Total Function Pts lLOC: 0.0
+ Total Function Params .: 0 Total Function Return .: 1
+ Total Cyclo Complexity : 1 Total Function Complex.: 2
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 2.00
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 0 Avg Function Parameters: 0.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 1 Avg Interface Complex. : 1.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 2 Avg Total Complexity ..: 2.00
+ ________________________________________________________________________
+ End of File: ..\include\qk.h
+
+
+ File: ..\include\qmpool.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QMPool::getBlockSize
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 54 eLOC 51 lLOC 23 Comment 94 Lines 166
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 1
+ Total Function LOC.....: 3 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 2 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 1 Total Function Pts lLOC: 0.0
+ Total Function Params .: 0 Total Function Return .: 1
+ Total Cyclo Complexity : 1 Total Function Complex.: 2
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 2.00
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 0 Avg Function Parameters: 0.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 1 Avg Interface Complex. : 1.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 2 Avg Total Complexity ..: 2.00
+ ________________________________________________________________________
+ End of File: ..\include\qmpool.h
+
+
+ File: ..\include\qp_port.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 4 eLOC 4 lLOC 0 Comment 38 Lines 44
+ ________________________________________________________________________
+ End of File: ..\include\qp_port.h
+
+
+ File: ..\include\qpcpp.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 39 eLOC 38 lLOC 1 Comment 88 Lines 139
+ ________________________________________________________________________
+ End of File: ..\include\qpcpp.h
+
+
+ File: ..\include\qpset.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QPSet8::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QPSet8::notEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QPSet8::hasElement
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 5 eLOC 4 lLOC 1 Comment 1 Lines 5
+
+ Inline Function: QP::QPSet8::insert
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QPSet8::remove
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QPSet8::findMax
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QPSet64::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QPSet64::notEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Inline Function: QP::QPSet64::hasElement
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 6 lLOC 2 Comment 1 Lines 7
+
+ Inline Function: QP::QPSet64::insert
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 8 eLOC 7 lLOC 3 Comment 1 Lines 8
+
+ Inline Function: QP::QPSet64::remove
+ Parameters: (uint_fast8_t const n)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 9 eLOC 7 lLOC 3 Comment 1 Lines 9
+
+ Inline Function: QP::QPSet64::findMax
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 15 eLOC 12 lLOC 5 Comment 1 Lines 15
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 87 eLOC 69 lLOC 30 Comment 121 Lines 236
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 12
+ Total Function LOC.....: 65 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 50 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 21 Total Function Pts lLOC: 0.0
+ Total Function Params .: 6 Total Function Return .: 12
+ Total Cyclo Complexity : 14 Total Function Complex.: 32
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 15 Average Function LOC ..: 5.42
+ Max Function eLOC .....: 12 Average Function eLOC .: 4.17
+ Max Function lLOC .....: 5 Average Function lLOC .: 1.75
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 1 Avg Function Parameters: 0.50
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 2 Avg Interface Complex. : 1.50
+ Max Cyclomatic Complex.: 2 Avg Cyclomatic Complex.: 1.17
+ Max Total Complexity ..: 4 Avg Total Complexity ..: 2.67
+ ________________________________________________________________________
+ End of File: ..\include\qpset.h
+
+
+ File: ..\include\qs.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QS::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+
+ NOTICE: The end of the source file has been reached where the
+ open brace count { 18 != 16 } close brace count
+ This is an indication of non-compilable code within the source
+ file. RSM processes all source code including code wrapped
+ with preprocessor directives. Accurate metrics requires that
+ all code present in this file must be compilable.
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 420 eLOC 413 lLOC 93 Comment 530 Lines 985
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 1
+ Total Function LOC.....: 3 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 2 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 1 Total Function Pts lLOC: 0.0
+ Total Function Params .: 0 Total Function Return .: 1
+ Total Cyclo Complexity : 1 Total Function Complex.: 2
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 2.00
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 0 Avg Function Parameters: 0.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 1 Avg Interface Complex. : 1.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 2 Avg Total Complexity ..: 2.00
+ ________________________________________________________________________
+ End of File: ..\include\qs.h
+
+
+ File: ..\include\qs_dummy.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 71 eLOC 71 lLOC 0 Comment 42 Lines 123
+ ________________________________________________________________________
+ End of File: ..\include\qs_dummy.h
+
+
+ File: ..\include\qv.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QV::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 39 eLOC 35 lLOC 5 Comment 80 Lines 129
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 1
+ Total Function LOC.....: 3 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 2 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 1 Total Function Pts lLOC: 0.0
+ Total Function Params .: 0 Total Function Return .: 1
+ Total Cyclo Complexity : 1 Total Function Complex.: 2
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 2.00
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 0 Avg Function Parameters: 0.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 1 Avg Interface Complex. : 1.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 2 Avg Total Complexity ..: 2.00
+ ________________________________________________________________________
+ End of File: ..\include\qv.h
+
+
+ File: ..\source\qf_pkg.h
+ ________________________________________________________________________
+
+ Inline Function: QP::QF_EVT_POOL_ID_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Inline Function: QP::QF_EVT_REF_CTR_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Inline Function: QP::QF_EVT_REF_CTR_INC_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Inline Function: QP::QF_EVT_REF_CTR_DEC_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 71 eLOC 67 lLOC 11 Comment 109 Lines 205
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 4
+ Total Function LOC.....: 8 Total Function Pts LOC : 0.0
+ Total Function eLOC....: 6 Total Function Pts eLOC: 0.0
+ Total Function lLOC....: 4 Total Function Pts lLOC: 0.0
+ Total Function Params .: 4 Total Function Return .: 4
+ Total Cyclo Complexity : 4 Total Function Complex.: 12
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 2.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 1.50
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 1 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 2 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 3 Avg Total Complexity ..: 3.00
+ ________________________________________________________________________
+ End of File: ..\source\qf_pkg.h
+
+
+ File: ..\source\qk_pkg.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 15 eLOC 15 lLOC 2 Comment 65 Lines 88
+ ________________________________________________________________________
+ End of File: ..\source\qk_pkg.h
+
+
+ File: ..\source\qs_pkg.h
+ ________________________________________________________________________
+
+ ~~ Total File Summary ~~
+
+ LOC 30 eLOC 27 lLOC 8 Comment 77 Lines 118
+ ________________________________________________________________________
+ End of File: ..\source\qs_pkg.h
+
+
+ File: ..\source\qep_hsm.cpp
+ ________________________________________________________________________
+
+ Function: QP::QHsm::QHsm
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 1 lLOC 1 Comment 8 Lines 3
+
+ Function: QP::QHsm::init
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 3
+ Logical and ( && ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 38 eLOC 36 lLOC 26 Comment 25 Lines 57
+
+ Function: QP::QHsm::top
+ Parameters: (void * const, QEvt const * const)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 3 eLOC 2 lLOC 1 Comment 15 Lines 3
+
+ Function: QP::QHsm::dispatch
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 5
+ Loops for / foreach : 1
+ Conditional if / else if: 5
+ Logical or ( || ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 13 Total 15
+ LOC 111 eLOC 98 lLOC 63 Comment 67 Lines 152
+
+ Function: QP::QHsm::hsm_tran
+ Parameters: (QStateHandler (&path)[MAX_NEST_DEPTH_])
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 4
+ Conditional if / else if: 10
+ Complexity Param 1 Return 1 Cyclo Vg 15 Total 17
+ LOC 98 eLOC 78 lLOC 48 Comment 61 Lines 139
+
+ Function: QP::QHsm::isIn
+ Parameters: (QStateHandler const s)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Conditional if / else if: 1
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 23
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 320 eLOC 276 lLOC 154 Comment 255 Lines 556
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 6
+ Total Function LOC.....: 269 Total Function Pts LOC : 6.0
+ Total Function eLOC....: 228 Total Function Pts eLOC: 5.2
+ Total Function lLOC....: 148 Total Function Pts lLOC: 2.9
+ Total Function Params .: 7 Total Function Return .: 6
+ Total Cyclo Complexity : 38 Total Function Complex.: 51
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 111 Average Function LOC ..: 44.83
+ Max Function eLOC .....: 98 Average Function eLOC .: 38.00
+ Max Function lLOC .....: 63 Average Function lLOC .: 24.67
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.17
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.17
+ Max Cyclomatic Complex.: 15 Avg Cyclomatic Complex.: 6.33
+ Max Total Complexity ..: 17 Avg Total Complexity ..: 8.50
+ ________________________________________________________________________
+ End of File: ..\source\qep_hsm.cpp
+
+
+ File: ..\source\qep_msm.cpp
+ ________________________________________________________________________
+
+ Function: QP::QMsm::QMsm
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 13 Lines 4
+
+ Function: QP::QMsm::~QMsm
+ Parameters: ()
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 2 eLOC 1 lLOC 0 Comment 4 Lines 2
+
+ Function: QP::QMsm::init
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Logical and ( && ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 21 eLOC 20 lLOC 12 Comment 23 Lines 33
+
+ Function: QP::QMsm::dispatch
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 2
+ Conditional if / else if: 12
+ Complexity Param 1 Return 1 Cyclo Vg 15 Total 17
+ LOC 107 eLOC 91 lLOC 56 Comment 66 Lines 147
+
+ Function: QP::QMsm::execTatbl_
+ Parameters: (QMTranActTable const * const tatbl)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 6
+ Complexity Param 1 Return 1 Cyclo Vg 8 Total 10
+ LOC 53 eLOC 43 lLOC 21 Comment 31 Lines 64
+
+ Function: QP::QMsm::exitToTranSource_
+ Parameters: (QMState const *s, QMState const * const ts)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Conditional if / else if: 3
+ Complexity Param 2 Return 1 Cyclo Vg 5 Total 8
+ LOC 24 eLOC 16 lLOC 7 Comment 19 Lines 32
+
+ Function: QP::QMsm::enterHistory_
+ Parameters: (QMState const * const hist)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 2
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 37 eLOC 31 lLOC 21 Comment 21 Lines 45
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 270 eLOC 225 lLOC 121 Comment 228 Lines 476
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 7
+ Total Function LOC.....: 248 Total Function Pts LOC : 5.1
+ Total Function eLOC....: 205 Total Function Pts eLOC: 4.2
+ Total Function lLOC....: 119 Total Function Pts lLOC: 2.3
+ Total Function Params .: 7 Total Function Return .: 7
+ Total Cyclo Complexity : 38 Total Function Complex.: 52
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 107 Average Function LOC ..: 35.43
+ Max Function eLOC .....: 91 Average Function eLOC .: 29.29
+ Max Function lLOC .....: 56 Average Function lLOC .: 17.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 15 Avg Cyclomatic Complex.: 5.43
+ Max Total Complexity ..: 17 Avg Total Complexity ..: 7.43
+ ________________________________________________________________________
+ End of File: ..\source\qep_msm.cpp
+
+
+ File: ..\source\qf_act.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::add_
+ Parameters: (QMActive * const a)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 14 lLOC 8 Comment 17 Lines 20
+
+ Function: QP::QF::remove_
+ Parameters: (QMActive const * const a)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 14 lLOC 8 Comment 17 Lines 20
+
+ Function: QP::QF::bzero
+ Parameters: (void * const start, uint_fast16_t len)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 8 eLOC 6 lLOC 4 Comment 13 Lines 8
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 243 eLOC 234 lLOC 25 Comment 108 Lines 356
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 3
+ Total Function LOC.....: 38 Total Function Pts LOC : 4.6
+ Total Function eLOC....: 34 Total Function Pts eLOC: 4.4
+ Total Function lLOC....: 20 Total Function Pts lLOC: 0.5
+ Total Function Params .: 4 Total Function Return .: 3
+ Total Cyclo Complexity : 8 Total Function Complex.: 15
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 15 Average Function LOC ..: 12.67
+ Max Function eLOC .....: 14 Average Function eLOC .: 11.33
+ Max Function lLOC .....: 8 Average Function lLOC .: 6.67
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.33
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.33
+ Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.67
+ Max Total Complexity ..: 5 Avg Total Complexity ..: 5.00
+ ________________________________________________________________________
+ End of File: ..\source\qf_act.cpp
+
+
+ File: ..\source\qf_actq.cpp
+ ________________________________________________________________________
+
+ Function: QP::QMActive::post_
+ Parameters: (QEvt const * const e, uint_fast16_t const margin)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 5
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 55 eLOC 46 lLOC 33 Comment 72 Lines 75
+
+ Function: QP::QMActive::postLIFO
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 4
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 35 eLOC 29 lLOC 20 Comment 32 Lines 47
+
+ Function: QP::QMActive::get_
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 36 eLOC 32 lLOC 22 Comment 27 Lines 48
+
+ Function: QP::QF::getQueueMin
+ Parameters: (uint_fast8_t const prio)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 10 eLOC 9 lLOC 5 Comment 17 Lines 13
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 154 eLOC 133 lLOC 80 Comment 199 Lines 327
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 4
+ Total Function LOC.....: 136 Total Function Pts LOC : 2.9
+ Total Function eLOC....: 116 Total Function Pts eLOC: 2.5
+ Total Function lLOC....: 80 Total Function Pts lLOC: 1.5
+ Total Function Params .: 4 Total Function Return .: 4
+ Total Cyclo Complexity : 16 Total Function Complex.: 24
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 55 Average Function LOC ..: 34.00
+ Max Function eLOC .....: 46 Average Function eLOC .: 29.00
+ Max Function lLOC .....: 33 Average Function lLOC .: 20.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 6 Avg Cyclomatic Complex.: 4.00
+ Max Total Complexity ..: 9 Avg Total Complexity ..: 6.00
+ ________________________________________________________________________
+ End of File: ..\source\qf_actq.cpp
+
+
+ File: ..\source\qf_defer.cpp
+ ________________________________________________________________________
+
+ Function: QP::QMActive::defer
+ Parameters: (QEQueue * const eq, QEvt const * const e)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 3 eLOC 2 lLOC 1 Comment 21 Lines 3
+
+ Function: QP::QMActive::recall
+ Parameters: (QEQueue * const eq)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 12 lLOC 8 Comment 29 Lines 27
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 25 eLOC 20 lLOC 9 Comment 92 Lines 120
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 18 Total Function Pts LOC : 0.5
+ Total Function eLOC....: 14 Total Function Pts eLOC: 0.4
+ Total Function lLOC....: 9 Total Function Pts lLOC: 0.2
+ Total Function Params .: 3 Total Function Return .: 2
+ Total Cyclo Complexity : 4 Total Function Complex.: 9
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 15 Average Function LOC ..: 9.00
+ Max Function eLOC .....: 12 Average Function eLOC .: 7.00
+ Max Function lLOC .....: 8 Average Function lLOC .: 4.50
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.50
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.50
+ Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.00
+ Max Total Complexity ..: 5 Avg Total Complexity ..: 4.50
+ ________________________________________________________________________
+ End of File: ..\source\qf_defer.cpp
+
+
+ File: ..\source\qf_dyn.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::poolInit
+ Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa
+ st16_t const evtSize)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical or ( || ) : 1
+ Complexity Param 3 Return 1 Cyclo Vg 2 Total 6
+ LOC 10 eLOC 8 lLOC 4 Comment 36 Lines 13
+
+ Function: QP::QF::newX_
+ Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en
+ um_t const sig)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 2
+ Complexity Param 3 Return 1 Cyclo Vg 4 Total 8
+ LOC 27 eLOC 21 lLOC 14 Comment 33 Lines 38
+
+ Function: QP::QF::gc
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 32 eLOC 28 lLOC 14 Comment 39 Lines 47
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 87 eLOC 74 lLOC 34 Comment 156 Lines 239
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 3
+ Total Function LOC.....: 69 Total Function Pts LOC : 1.6
+ Total Function eLOC....: 57 Total Function Pts eLOC: 1.4
+ Total Function lLOC....: 32 Total Function Pts lLOC: 0.6
+ Total Function Params .: 7 Total Function Return .: 3
+ Total Cyclo Complexity : 9 Total Function Complex.: 19
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 32 Average Function LOC ..: 23.00
+ Max Function eLOC .....: 28 Average Function eLOC .: 19.00
+ Max Function lLOC .....: 14 Average Function lLOC .: 10.67
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 3 Avg Function Parameters: 2.33
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 4 Avg Interface Complex. : 3.33
+ Max Cyclomatic Complex.: 4 Avg Cyclomatic Complex.: 3.00
+ Max Total Complexity ..: 8 Avg Total Complexity ..: 6.33
+ ________________________________________________________________________
+ End of File: ..\source\qf_dyn.cpp
+
+
+ File: ..\source\qf_mem.cpp
+ ________________________________________________________________________
+
+ Function: QP::QMPool::QMPool
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 8 Lines 1
+
+ Function: QP::QMPool::init
+ Parameters: (void * const poolSto, uint_fast32_t poolSize, uint_fast16_t
+ blockSize)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 2
+ Logical and ( && ) : 2
+ Complexity Param 3 Return 1 Cyclo Vg 5 Total 9
+ LOC 35 eLOC 31 lLOC 22 Comment 51 Lines 58
+
+ Function: QP::QMPool::put
+ Parameters: (void * const b)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 23
+
+ Function: QP::QMPool::get
+ Parameters: (uint_fast16_t const margin)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 3
+ Complexity Param 1 Return 1 Cyclo Vg 4 Total 6
+ LOC 40 eLOC 34 lLOC 22 Comment 46 Lines 60
+
+ Function: QP::QF::getPoolMin
+ Parameters: (uint_fast8_t const poolId)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 10 eLOC 9 lLOC 5 Comment 13 Lines 14
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 124 eLOC 111 lLOC 58 Comment 186 Lines 307
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 5
+ Total Function LOC.....: 102 Total Function Pts LOC : 2.3
+ Total Function eLOC....: 90 Total Function Pts eLOC: 2.1
+ Total Function lLOC....: 58 Total Function Pts lLOC: 1.1
+ Total Function Params .: 6 Total Function Return .: 5
+ Total Cyclo Complexity : 14 Total Function Complex.: 25
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 40 Average Function LOC ..: 20.40
+ Max Function eLOC .....: 34 Average Function eLOC .: 18.00
+ Max Function lLOC .....: 22 Average Function lLOC .: 11.60
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 3 Avg Function Parameters: 1.20
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 4 Avg Interface Complex. : 2.20
+ Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 2.80
+ Max Total Complexity ..: 9 Avg Total Complexity ..: 5.00
+ ________________________________________________________________________
+ End of File: ..\source\qf_mem.cpp
+
+
+ File: ..\source\qf_ps.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::psInit
+ Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 7 eLOC 6 lLOC 3 Comment 30 Lines 11
+
+ Function: QP::QF::publish_
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 3
+ Loops for / foreach : 1
+ Conditional if / else if: 2
+ Logical and ( && ) : 10
+ Complexity Param 1 Return 1 Cyclo Vg 17 Total 19
+ LOC 107 eLOC 96 lLOC 52 Comment 105 Lines 208
+
+
+ NOTICE: The end of the source file has been reached where the
+ open brace count { 13 != 12 } close brace count
+ This is an indication of non-compilable code within the source
+ file. RSM processes all source code including code wrapped
+ with preprocessor directives. Accurate metrics requires that
+ all code present in this file must be compilable.
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 128 eLOC 116 lLOC 57 Comment 183 Lines 322
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 114 Total Function Pts LOC : 2.4
+ Total Function eLOC....: 102 Total Function Pts eLOC: 2.2
+ Total Function lLOC....: 55 Total Function Pts lLOC: 1.1
+ Total Function Params .: 3 Total Function Return .: 2
+ Total Cyclo Complexity : 18 Total Function Complex.: 23
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 107 Average Function LOC ..: 57.00
+ Max Function eLOC .....: 96 Average Function eLOC .: 51.00
+ Max Function lLOC .....: 52 Average Function lLOC .: 27.50
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.50
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.50
+ Max Cyclomatic Complex.: 17 Avg Cyclomatic Complex.: 9.00
+ Max Total Complexity ..: 19 Avg Total Complexity ..: 11.50
+ ________________________________________________________________________
+ End of File: ..\source\qf_ps.cpp
+
+
+ File: ..\source\qf_qact.cpp
+ ________________________________________________________________________
+
+ Function: QP::QActive::QActive
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 1 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::init
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::dispatch
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::isIn
+ Parameters: (QStateHandler const s)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 22 eLOC 15 lLOC 5 Comment 51 Lines 76
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 5
+ Total Function LOC.....: 15 Total Function Pts LOC : 0.4
+ Total Function eLOC....: 9 Total Function Pts eLOC: 0.3
+ Total Function lLOC....: 5 Total Function Pts lLOC: 0.1
+ Total Function Params .: 4 Total Function Return .: 5
+ Total Cyclo Complexity : 5 Total Function Complex.: 14
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 3 Average Function LOC ..: 3.00
+ Max Function eLOC .....: 2 Average Function eLOC .: 1.80
+ Max Function lLOC .....: 1 Average Function lLOC .: 1.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 1 Avg Function Parameters: 0.80
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 2 Avg Interface Complex. : 1.80
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 3 Avg Total Complexity ..: 2.80
+ ________________________________________________________________________
+ End of File: ..\source\qf_qact.cpp
+
+
+ File: ..\source\qf_qeq.cpp
+ ________________________________________________________________________
+
+ Function: QP::QEQueue::QEQueue
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 4 Lines 1
+
+ Function: QP::QEQueue::init
+ Parameters: (QEvt const *qSto[], uint_fast16_t const qLen)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 15 eLOC 14 lLOC 9 Comment 19 Lines 16
+
+ Function: QP::QEQueue::post
+ Parameters: (QEvt const * const e, uint_fast16_t const margin)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 5
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 51 eLOC 43 lLOC 29 Comment 52 Lines 72
+
+ Function: QP::QEQueue::postLIFO
+ Parameters: (QEvt const * const e)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 4
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 32 eLOC 27 lLOC 19 Comment 36 Lines 43
+
+ Function: QP::QEQueue::get
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 3
+ Complexity Param 0 Return 1 Cyclo Vg 4 Total 5
+ LOC 37 eLOC 32 lLOC 21 Comment 31 Lines 46
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 156 eLOC 136 lLOC 78 Comment 187 Lines 315
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 5
+ Total Function LOC.....: 136 Total Function Pts LOC : 2.9
+ Total Function eLOC....: 117 Total Function Pts eLOC: 2.6
+ Total Function lLOC....: 78 Total Function Pts lLOC: 1.5
+ Total Function Params .: 5 Total Function Return .: 5
+ Total Cyclo Complexity : 17 Total Function Complex.: 27
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 51 Average Function LOC ..: 27.20
+ Max Function eLOC .....: 43 Average Function eLOC .: 23.40
+ Max Function lLOC .....: 29 Average Function lLOC .: 15.60
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 6 Avg Cyclomatic Complex.: 3.40
+ Max Total Complexity ..: 9 Avg Total Complexity ..: 5.40
+ ________________________________________________________________________
+ End of File: ..\source\qf_qeq.cpp
+
+
+ File: ..\source\qf_qmact.cpp
+ ________________________________________________________________________
+
+ Function: QP::QMActive::QMActive
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 9 eLOC 7 lLOC 3 Comment 1 Lines 11
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 15 eLOC 12 lLOC 3 Comment 40 Lines 58
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 1
+ Total Function LOC.....: 9 Total Function Pts LOC : 0.3
+ Total Function eLOC....: 7 Total Function Pts eLOC: 0.2
+ Total Function lLOC....: 3 Total Function Pts lLOC: 0.1
+ Total Function Params .: 1 Total Function Return .: 1
+ Total Cyclo Complexity : 1 Total Function Complex.: 3
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 9 Average Function LOC ..: 9.00
+ Max Function eLOC .....: 7 Average Function eLOC .: 7.00
+ Max Function lLOC .....: 3 Average Function lLOC .: 3.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 1 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 2 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 1 Avg Cyclomatic Complex.: 1.00
+ Max Total Complexity ..: 3 Avg Total Complexity ..: 3.00
+ ________________________________________________________________________
+ End of File: ..\source\qf_qmact.cpp
+
+
+ File: ..\source\qf_time.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::tickX_
+ Parameters: (uint8_t const tickRate)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 5
+ Complexity Param 1 Return 1 Cyclo Vg 7 Total 9
+ LOC 65 eLOC 53 lLOC 36 Comment 51 Lines 90
+
+ Function: QP::QF::noTimeEvtsActiveX
+ Parameters: (uint8_t const tickRate)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 14 eLOC 10 lLOC 6 Comment 11 Lines 14
+
+ Function: QP::QTimeEvt::QTimeEvt
+ Parameters: (QMActive * const act, enum_t const sgnl, uint8_t const tick
+ Rate) Defined By Compiler Directive
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 1
+ Complexity Param 3 Return 1 Cyclo Vg 2 Total 6
+ LOC 9 eLOC 7 lLOC 4 Comment 22 Lines 22
+
+ Function: QP::QTimeEvt::QTimeEvt
+ Parameters: () Defined By Compiler Directive
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 12 Lines 18
+
+ Function: QP::QTimeEvt::armX
+ Parameters: (QTimeEvtCtr const nTicks, QTimeEvtCtr const interval)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Logical and ( && ) : 4
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 28 eLOC 26 lLOC 16 Comment 48 Lines 50
+
+ Function: QP::QTimeEvt::disarm
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 29 eLOC 26 lLOC 17 Comment 27 Lines 35
+
+ Function: QP::QTimeEvt::rearm
+ Parameters: (QTimeEvtCtr const nTicks)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Inlined if-else ( ? : ) : 1
+ Logical and ( && ) : 3
+ Complexity Param 1 Return 1 Cyclo Vg 7 Total 9
+ LOC 37 eLOC 32 lLOC 18 Comment 47 Lines 64
+
+ Function: QP::QTimeEvt::ctr
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 15 eLOC 14 lLOC 10 Comment 16 Lines 18
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 241 eLOC 209 lLOC 111 Comment 297 Lines 523
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 8
+ Total Function LOC.....: 204 Total Function Pts LOC : 4.5
+ Total Function eLOC....: 173 Total Function Pts eLOC: 3.9
+ Total Function lLOC....: 110 Total Function Pts lLOC: 2.1
+ Total Function Params .: 9 Total Function Return .: 8
+ Total Cyclo Complexity : 29 Total Function Complex.: 46
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 65 Average Function LOC ..: 25.50
+ Max Function eLOC .....: 53 Average Function eLOC .: 21.63
+ Max Function lLOC .....: 36 Average Function lLOC .: 13.75
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 3 Avg Function Parameters: 1.13
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 4 Avg Interface Complex. : 2.13
+ Max Cyclomatic Complex.: 7 Avg Cyclomatic Complex.: 3.63
+ Max Total Complexity ..: 9 Avg Total Complexity ..: 5.75
+ ________________________________________________________________________
+ End of File: ..\source\qf_time.cpp
+
+
+ File: ..\source\qk.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 14 eLOC 13 lLOC 9 Comment 14 Lines 17
+
+ Function: QP::QF::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 4
+
+ Function: QP::initialize
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 5 Lines 10
+
+ Function: QP::QF::run
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 12 eLOC 10 lLOC 7 Comment 21 Lines 15
+
+ Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const stkSize
+ , QEvt const * const ie)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 2
+ Complexity Param 6 Return 1 Cyclo Vg 3 Total 10
+ LOC 16 eLOC 14 lLOC 9 Comment 24 Lines 22
+
+ Function: QP::QMActive::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 3
+
+ Function: QK_sched_
+ Parameters: (uint_fast8_t p)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Conditional if / else if: 4
+ Complexity Param 1 Return 1 Cyclo Vg 6 Total 8
+ LOC 45 eLOC 39 lLOC 22 Comment 41 Lines 67
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 141 eLOC 119 lLOC 60 Comment 201 Lines 332
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 7
+ Total Function LOC.....: 100 Total Function Pts LOC : 2.7
+ Total Function eLOC....: 85 Total Function Pts eLOC: 2.2
+ Total Function lLOC....: 52 Total Function Pts lLOC: 1.1
+ Total Function Params .: 7 Total Function Return .: 7
+ Total Cyclo Complexity : 16 Total Function Complex.: 30
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 45 Average Function LOC ..: 14.29
+ Max Function eLOC .....: 39 Average Function eLOC .: 12.14
+ Max Function lLOC .....: 22 Average Function lLOC .: 7.43
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 6 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 7 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 6 Avg Cyclomatic Complex.: 2.29
+ Max Total Complexity ..: 10 Avg Total Complexity ..: 4.29
+ ________________________________________________________________________
+ End of File: ..\source\qk.cpp
+
+
+ File: ..\source\qk_mutex.cpp
+ ________________________________________________________________________
+
+ Function: QP::QK::mutexLock
+ Parameters: (uint_fast8_t const prioCeiling)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 16 eLOC 14 lLOC 8 Comment 20 Lines 18
+
+ Function: QP::QK::mutexUnlock
+ Parameters: (QMutex mutex)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 18 eLOC 15 lLOC 8 Comment 19 Lines 20
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 50 eLOC 43 lLOC 17 Comment 88 Lines 131
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 34 Total Function Pts LOC : 0.9
+ Total Function eLOC....: 29 Total Function Pts eLOC: 0.8
+ Total Function lLOC....: 16 Total Function Pts lLOC: 0.3
+ Total Function Params .: 2 Total Function Return .: 2
+ Total Cyclo Complexity : 5 Total Function Complex.: 9
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 18 Average Function LOC ..: 17.00
+ Max Function eLOC .....: 15 Average Function eLOC .: 14.50
+ Max Function lLOC .....: 8 Average Function lLOC .: 8.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 1 Avg Function Parameters: 1.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 2 Avg Interface Complex. : 2.00
+ Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.50
+ Max Total Complexity ..: 5 Avg Total Complexity ..: 4.50
+ ________________________________________________________________________
+ End of File: ..\source\qk_mutex.cpp
+
+
+ File: ..\source\qs.cpp
+ ________________________________________________________________________
+
+ Function: QP::QS::initBuf
+ Parameters: (uint8_t sto[], uint_fast16_t const stoSize)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 9 Comment 20 Lines 15
+
+ Function: QP::QS::filterOn
+ Parameters: (uint_fast8_t const rec)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 1
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 18 eLOC 13 lLOC 6 Comment 15 Lines 20
+
+ Function: QP::QS::filterOff
+ Parameters: (uint_fast8_t const rec)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 28 eLOC 25 lLOC 36 Comment 14 Lines 37
+
+ Function: QP::QS::beginRec
+ Parameters: (uint_fast8_t const rec)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 14 eLOC 13 lLOC 10 Comment 16 Lines 18
+
+ Function: QP::QS::endRec
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Logical and ( && ) : 1
+ Complexity Param 0 Return 1 Cyclo Vg 4 Total 5
+ LOC 22 eLOC 18 lLOC 10 Comment 16 Lines 27
+
+ Function: QP::QS::u8
+ Parameters: (uint8_t const format, uint8_t const d)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 14
+
+ Function: QP::QS::u16
+ Parameters: (uint8_t format, uint16_t d)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 15 eLOC 14 lLOC 10 Comment 12 Lines 20
+
+ Function: QP::QS::u32
+ Parameters: (uint8_t format, uint32_t d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 15 eLOC 13 lLOC 10 Comment 12 Lines 18
+
+ Function: QP::QS::u8_
+ Parameters: (uint8_t const d)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 10 eLOC 9 lLOC 7 Comment 11 Lines 12
+
+ Function: QP::QS::u8u8_
+ Parameters: (uint8_t const d1, uint8_t const d2)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 7 Comment 11 Lines 13
+
+ Function: QP::QS::u16_
+ Parameters: (uint16_t d)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 14 eLOC 13 lLOC 10 Comment 11 Lines 18
+
+ Function: QP::QS::u32_
+ Parameters: (uint32_t d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 14 eLOC 12 lLOC 10 Comment 11 Lines 16
+
+ Function: QP::QS::str_
+ Parameters: (char_t const *s)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 20 eLOC 18 lLOC 14 Comment 15 Lines 22
+
+ Function: QP::QS::str_ROM_
+ Parameters: (char_t const Q_ROM *s)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 20 eLOC 18 lLOC 14 Comment 15 Lines 22
+
+ Function: QP::QS::getByte
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 2
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 18 eLOC 14 lLOC 10 Comment 19 Lines 18
+
+ Function: QP::QS::getBlock
+ Parameters: (uint16_t * const pNbytes)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Conditional if / else if: 4
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 29 eLOC 23 lLOC 17 Comment 30 Lines 30
+
+ Function: QP::QS::sig_dict
+ Parameters: (enum_t const sig, void const * const obj, char_t const Q_RO
+ M * const name)
+ Complexity Param 3 Return 1 Cyclo Vg 1 Total 5
+ LOC 11 eLOC 9 lLOC 8 Comment 3 Lines 11
+
+ Function: QP::QS::obj_dict
+ Parameters: (void const * const obj, char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::fun_dict
+ Parameters: (void (* const fun)(void), char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::usr_dict
+ Parameters: (enum_t const rec, char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::mem
+ Parameters: (uint8_t const *blk, uint8_t size)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 19 eLOC 17 lLOC 11 Comment 10 Lines 22
+
+ Function: QP::QS::str
+ Parameters: (char_t const *s)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 22 eLOC 20 lLOC 14 Comment 15 Lines 26
+
+ Function: QP::QS::str_ROM
+ Parameters: (char_t const Q_ROM *s)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops while / do : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 22 eLOC 20 lLOC 14 Comment 15 Lines 26
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 390 eLOC 338 lLOC 256 Comment 336 Lines 670
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 23
+ Total Function LOC.....: 374 Total Function Pts LOC : 7.4
+ Total Function eLOC....: 323 Total Function Pts eLOC: 6.4
+ Total Function lLOC....: 255 Total Function Pts lLOC: 4.8
+ Total Function Params .: 32 Total Function Return .: 23
+ Total Cyclo Complexity : 42 Total Function Complex.: 97
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 29 Average Function LOC ..: 16.26
+ Max Function eLOC .....: 25 Average Function eLOC .: 14.04
+ Max Function lLOC .....: 36 Average Function lLOC .: 11.09
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 3 Avg Function Parameters: 1.39
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 4 Avg Interface Complex. : 2.39
+ Max Cyclomatic Complex.: 5 Avg Cyclomatic Complex.: 1.83
+ Max Total Complexity ..: 7 Avg Total Complexity ..: 4.22
+ ________________________________________________________________________
+ End of File: ..\source\qs.cpp
+
+
+ File: ..\source\qs_64bit.cpp
+ ________________________________________________________________________
+
+ Function: QP::QS::u64_
+ Parameters: (uint64_t d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 17 eLOC 14 lLOC 10 Comment 7 Lines 19
+
+ Function: QP::QS::u64
+ Parameters: (uint8_t format, uint64_t d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 18 eLOC 15 lLOC 10 Comment 8 Lines 21
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 42 eLOC 35 lLOC 20 Comment 57 Lines 100
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 35 Total Function Pts LOC : 0.8
+ Total Function eLOC....: 29 Total Function Pts eLOC: 0.7
+ Total Function lLOC....: 20 Total Function Pts lLOC: 0.4
+ Total Function Params .: 3 Total Function Return .: 2
+ Total Cyclo Complexity : 4 Total Function Complex.: 9
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 18 Average Function LOC ..: 17.50
+ Max Function eLOC .....: 15 Average Function eLOC .: 14.50
+ Max Function lLOC .....: 10 Average Function lLOC .: 10.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 1.50
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 2.50
+ Max Cyclomatic Complex.: 2 Avg Cyclomatic Complex.: 2.00
+ Max Total Complexity ..: 5 Avg Total Complexity ..: 4.50
+ ________________________________________________________________________
+ End of File: ..\source\qs_64bit.cpp
+
+
+ File: ..\source\qs_fp.cpp
+ ________________________________________________________________________
+
+ Function: QP::QS::f32
+ Parameters: (uint8_t format, float32_t const d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 20 eLOC 18 lLOC 14 Comment 14 Lines 24
+
+ Function: QP::QS::f64
+ Parameters: (uint8_t format, float64_t const d)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 2
+ Complexity Param 2 Return 1 Cyclo Vg 3 Total 6
+ LOC 29 eLOC 26 lLOC 20 Comment 10 Lines 33
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 54 eLOC 48 lLOC 34 Comment 66 Lines 114
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 2
+ Total Function LOC.....: 49 Total Function Pts LOC : 1.0
+ Total Function eLOC....: 44 Total Function Pts eLOC: 0.9
+ Total Function lLOC....: 34 Total Function Pts lLOC: 0.6
+ Total Function Params .: 4 Total Function Return .: 2
+ Total Cyclo Complexity : 5 Total Function Complex.: 11
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 29 Average Function LOC ..: 24.50
+ Max Function eLOC .....: 26 Average Function eLOC .: 22.00
+ Max Function lLOC .....: 20 Average Function lLOC .: 17.00
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 2 Avg Function Parameters: 2.00
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 3 Avg Interface Complex. : 3.00
+ Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.50
+ Max Total Complexity ..: 6 Avg Total Complexity ..: 5.50
+ ________________________________________________________________________
+ End of File: ..\source\qs_fp.cpp
+
+
+ File: ..\source\qv.cpp
+ ________________________________________________________________________
+
+ Function: QP::QF::stop
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 4
+
+ Function: QP::QF::run
+ Parameters: (void)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Loops for / foreach : 1
+ Conditional if / else if: 1
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 20 eLOC 16 lLOC 11 Comment 31 Lines 36
+
+ Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const, QEvt c
+ onst * const ie)
+ Cyclomatic Complexity Vg Detail
+ Function Base : 1
+ Logical and ( && ) : 2
+ Complexity Param 6 Return 1 Cyclo Vg 3 Total 10
+ LOC 10 eLOC 8 lLOC 6 Comment 28 Lines 15
+
+ Function: QP::QMActive::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 12 Lines 3
+
+ ------------------------------------------------------------------------
+
+ ~~ Total File Summary ~~
+
+ LOC 66 eLOC 55 lLOC 26 Comment 148 Lines 214
+ ------------------------------------------------------------------------
+
+ ~~ File Functional Summary ~~
+
+ File Function Count....: 4
+ Total Function LOC.....: 36 Total Function Pts LOC : 1.2
+ Total Function eLOC....: 28 Total Function Pts eLOC: 1.0
+ Total Function lLOC....: 19 Total Function Pts lLOC: 0.5
+ Total Function Params .: 7 Total Function Return .: 4
+ Total Cyclo Complexity : 8 Total Function Complex.: 19
+ ------ ----- ----- ------ ------ -----
+ Max Function LOC ......: 20 Average Function LOC ..: 9.00
+ Max Function eLOC .....: 16 Average Function eLOC .: 7.00
+ Max Function lLOC .....: 11 Average Function lLOC .: 4.75
+ ------ ----- ----- ------ ------ -----
+ Max Function Parameters: 6 Avg Function Parameters: 1.75
+ Max Function Returns ..: 1 Avg Function Returns ..: 1.00
+ Max Interface Complex. : 7 Avg Interface Complex. : 2.75
+ Max Cyclomatic Complex.: 3 Avg Cyclomatic Complex.: 2.00
+ Max Total Complexity ..: 10 Avg Total Complexity ..: 4.75
+ ________________________________________________________________________
+ End of File: ..\source\qv.cpp
+
+
+ ------------------------------------------------------------------------
+
+ ~~ Project Analysis For 33 Files ~~
+
+ ------------------------------------------------------------------------
+
+ ~~ Total Project Summary ~~
+
+ LOC 3996 eLOC 3571 lLOC 1576 Comment 5420 Lines 9649
+ Average per File, metric/33 files
+ LOC 121 eLOC 108 lLOC 47 Comment 164 Lines 292
+
+ ------------------------------------------------------------------------
+
+ ~~ Project Functional Metrics ~~
+
+ Function: QP::QEvt::QEvt
+ Parameters: (QSignal const s)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 0 Comment 2 Lines 1
+
+ Function: QP::QEvt::~QEvt
+ Parameters: ()
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 1 Lines 1
+
+ Function: QP::QMsm::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Function: QP::QMsm::stateObj
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QMsm::qm_tran_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Function: QP::QMsm::qm_tran_hist_
+ Parameters: (QMState const * const hist, QMTranActTable const * const ta
+ tbl)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 5 eLOC 3 lLOC 3 Comment 1 Lines 5
+
+ Function: QP::QMsm::qm_tran_init_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QMsm::qm_tran_ep_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Function: QP::QMsm::qm_tran_xp_
+ Parameters: (QActionHandler const xp, QMTranActTable const *const tatbl)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 5 eLOC 3 lLOC 3 Comment 2 Lines 5
+
+ Function: QP::QMsm::qm_entry_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QMsm::qm_exit_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QMsm::qm_super_sub_
+ Parameters: (QMState const * const state)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 2 Lines 4
+
+ Function: QP::QMsm::QM_HANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QMsm::QM_UNHANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QMsm::QM_SUPER
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QMsm::Q_HANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 3 Lines 3
+
+ Function: QP::QMsm::Q_UNHANDLED
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 4 Lines 3
+
+ Function: QP::QMsm::tran_
+ Parameters: (QStateHandler const target)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QMsm::tran_hist_
+ Parameters: (QStateHandler const hist)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QMsm::super_
+ Parameters: (QStateHandler const superstate)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QHsm::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Function: QP::QHsm::state
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QEP::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QEQueue::getNFree
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 10 Lines 3
+
+ Function: QP::QEQueue::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 10 Lines 3
+
+ Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const stkSize
+ )
+ Complexity Param 5 Return 1 Cyclo Vg 1 Total 7
+ LOC 4 eLOC 2 lLOC 1 Comment 1 Lines 4
+
+ Function: QP::QMActive::getPrio
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QMActive::setPrio
+ Parameters: (uint_fast8_t const prio)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QMActive::getOsObject
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Function: QP::QMActive::getThread
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 2 Lines 1
+
+ Function: QP::QTimeEvt::QTimeEvt
+ Parameters: (enum_t const sgnl) Non-ANSI Parameter Construct Defined By
+ Compiler Directive
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 5 Lines 8
+
+ Function: QP::QTimeEvt::postIn
+ Parameters: (QMActive * const act, QTimeEvtCtr const nTicks)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QTimeEvt::postEvery
+ Parameters: (QMActive * const act, QTimeEvtCtr const nTicks)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 4 eLOC 3 lLOC 2 Comment 1 Lines 4
+
+ Function: QP::QTimeEvt::toActive
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Function: QP::QTimeEvt::toTimeEvt
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Function: QP::QF::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QK::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QMPool::getBlockSize
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QPSet8::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QPSet8::notEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QPSet8::hasElement
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 5 eLOC 4 lLOC 1 Comment 1 Lines 5
+
+ Function: QP::QPSet8::insert
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QPSet8::remove
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QPSet8::findMax
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QPSet64::isEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QPSet64::notEmpty
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 2 Lines 3
+
+ Function: QP::QPSet64::hasElement
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 6 lLOC 2 Comment 1 Lines 7
+
+ Function: QP::QPSet64::insert
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 8 eLOC 7 lLOC 3 Comment 1 Lines 8
+
+ Function: QP::QPSet64::remove
+ Parameters: (uint_fast8_t const n)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 9 eLOC 7 lLOC 3 Comment 1 Lines 9
+
+ Function: QP::QPSet64::findMax
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 15 eLOC 12 lLOC 5 Comment 1 Lines 15
+
+ Function: QP::QS::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QV::getVersion
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QF_EVT_POOL_ID_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Function: QP::QF_EVT_REF_CTR_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 1 eLOC 1 lLOC 1 Comment 1 Lines 1
+
+ Function: QP::QF_EVT_REF_CTR_INC_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QF_EVT_REF_CTR_DEC_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QHsm::QHsm
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 1 lLOC 1 Comment 8 Lines 3
+
+ Function: QP::QHsm::init
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 38 eLOC 36 lLOC 26 Comment 25 Lines 57
+
+ Function: QP::QHsm::top
+ Parameters: (void * const, QEvt const * const)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 3 eLOC 2 lLOC 1 Comment 15 Lines 3
+
+ Function: QP::QHsm::dispatch
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 13 Total 15
+ LOC 111 eLOC 98 lLOC 63 Comment 67 Lines 152
+
+ Function: QP::QHsm::hsm_tran
+ Parameters: (QStateHandler (&path)[MAX_NEST_DEPTH_])
+ Complexity Param 1 Return 1 Cyclo Vg 15 Total 17
+ LOC 98 eLOC 78 lLOC 48 Comment 61 Lines 139
+
+ Function: QP::QHsm::isIn
+ Parameters: (QStateHandler const s)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 16 eLOC 13 lLOC 9 Comment 21 Lines 23
+
+ Function: QP::QMsm::QMsm
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 4 eLOC 3 lLOC 2 Comment 13 Lines 4
+
+ Function: QP::QMsm::~QMsm
+ Parameters: ()
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 2 eLOC 1 lLOC 0 Comment 4 Lines 2
+
+ Function: QP::QMsm::init
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 21 eLOC 20 lLOC 12 Comment 23 Lines 33
+
+ Function: QP::QMsm::dispatch
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 15 Total 17
+ LOC 107 eLOC 91 lLOC 56 Comment 66 Lines 147
+
+ Function: QP::QMsm::execTatbl_
+ Parameters: (QMTranActTable const * const tatbl)
+ Complexity Param 1 Return 1 Cyclo Vg 8 Total 10
+ LOC 53 eLOC 43 lLOC 21 Comment 31 Lines 64
+
+ Function: QP::QMsm::exitToTranSource_
+ Parameters: (QMState const *s, QMState const * const ts)
+ Complexity Param 2 Return 1 Cyclo Vg 5 Total 8
+ LOC 24 eLOC 16 lLOC 7 Comment 19 Lines 32
+
+ Function: QP::QMsm::enterHistory_
+ Parameters: (QMState const * const hist)
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 37 eLOC 31 lLOC 21 Comment 21 Lines 45
+
+ Function: QP::QF::add_
+ Parameters: (QMActive * const a)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 14 lLOC 8 Comment 17 Lines 20
+
+ Function: QP::QF::remove_
+ Parameters: (QMActive const * const a)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 14 lLOC 8 Comment 17 Lines 20
+
+ Function: QP::QF::bzero
+ Parameters: (void * const start, uint_fast16_t len)
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 8 eLOC 6 lLOC 4 Comment 13 Lines 8
+
+ Function: QP::QMActive::post_
+ Parameters: (QEvt const * const e, uint_fast16_t const margin)
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 55 eLOC 46 lLOC 33 Comment 72 Lines 75
+
+ Function: QP::QMActive::postLIFO
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 35 eLOC 29 lLOC 20 Comment 32 Lines 47
+
+ Function: QP::QMActive::get_
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 36 eLOC 32 lLOC 22 Comment 27 Lines 48
+
+ Function: QP::QF::getQueueMin
+ Parameters: (uint_fast8_t const prio)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 10 eLOC 9 lLOC 5 Comment 17 Lines 13
+
+ Function: QP::QMActive::defer
+ Parameters: (QEQueue * const eq, QEvt const * const e)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 3 eLOC 2 lLOC 1 Comment 21 Lines 3
+
+ Function: QP::QMActive::recall
+ Parameters: (QEQueue * const eq)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 15 eLOC 12 lLOC 8 Comment 29 Lines 27
+
+ Function: QP::QF::poolInit
+ Parameters: (void * const poolSto, uint_fast32_t const poolSize, uint_fa
+ st16_t const evtSize)
+ Complexity Param 3 Return 1 Cyclo Vg 2 Total 6
+ LOC 10 eLOC 8 lLOC 4 Comment 36 Lines 13
+
+ Function: QP::QF::newX_
+ Parameters: (uint_fast16_t const evtSize, uint_fast16_t const margin, en
+ um_t const sig)
+ Complexity Param 3 Return 1 Cyclo Vg 4 Total 8
+ LOC 27 eLOC 21 lLOC 14 Comment 33 Lines 38
+
+ Function: QP::QF::gc
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 32 eLOC 28 lLOC 14 Comment 39 Lines 47
+
+ Function: QP::QMPool::QMPool
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 8 Lines 1
+
+ Function: QP::QMPool::init
+ Parameters: (void * const poolSto, uint_fast32_t poolSize, uint_fast16_t
+ blockSize)
+ Complexity Param 3 Return 1 Cyclo Vg 5 Total 9
+ LOC 35 eLOC 31 lLOC 22 Comment 51 Lines 58
+
+ Function: QP::QMPool::put
+ Parameters: (void * const b)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 16 eLOC 15 lLOC 9 Comment 23 Lines 23
+
+ Function: QP::QMPool::get
+ Parameters: (uint_fast16_t const margin)
+ Complexity Param 1 Return 1 Cyclo Vg 4 Total 6
+ LOC 40 eLOC 34 lLOC 22 Comment 46 Lines 60
+
+ Function: QP::QF::getPoolMin
+ Parameters: (uint_fast8_t const poolId)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 10 eLOC 9 lLOC 5 Comment 13 Lines 14
+
+ Function: QP::QF::psInit
+ Parameters: (QSubscrList * const subscrSto, enum_t const maxSignal)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 7 eLOC 6 lLOC 3 Comment 30 Lines 11
+
+ Function: QP::QF::publish_
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 17 Total 19
+ LOC 107 eLOC 96 lLOC 52 Comment 105 Lines 208
+
+ Function: QP::QActive::QActive
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 1 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::init
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::dispatch
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QActive::isIn
+ Parameters: (QStateHandler const s)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 1 Lines 3
+
+ Function: QP::QEQueue::QEQueue
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 1 eLOC 1 lLOC 0 Comment 4 Lines 1
+
+ Function: QP::QEQueue::init
+ Parameters: (QEvt const *qSto[], uint_fast16_t const qLen)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 15 eLOC 14 lLOC 9 Comment 19 Lines 16
+
+ Function: QP::QEQueue::post
+ Parameters: (QEvt const * const e, uint_fast16_t const margin)
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 51 eLOC 43 lLOC 29 Comment 52 Lines 72
+
+ Function: QP::QEQueue::postLIFO
+ Parameters: (QEvt const * const e)
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 32 eLOC 27 lLOC 19 Comment 36 Lines 43
+
+ Function: QP::QEQueue::get
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 4 Total 5
+ LOC 37 eLOC 32 lLOC 21 Comment 31 Lines 46
+
+ Function: QP::QMActive::QMActive
+ Parameters: (QStateHandler const initial)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 9 eLOC 7 lLOC 3 Comment 1 Lines 11
+
+ Function: QP::QF::tickX_
+ Parameters: (uint8_t const tickRate)
+ Complexity Param 1 Return 1 Cyclo Vg 7 Total 9
+ LOC 65 eLOC 53 lLOC 36 Comment 51 Lines 90
+
+ Function: QP::QF::noTimeEvtsActiveX
+ Parameters: (uint8_t const tickRate)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 14 eLOC 10 lLOC 6 Comment 11 Lines 14
+
+ Function: QP::QTimeEvt::QTimeEvt
+ Parameters: (QMActive * const act, enum_t const sgnl, uint8_t const tick
+ Rate) Defined By Compiler Directive
+ Complexity Param 3 Return 1 Cyclo Vg 2 Total 6
+ LOC 9 eLOC 7 lLOC 4 Comment 22 Lines 22
+
+ Function: QP::QTimeEvt::QTimeEvt
+ Parameters: () Defined By Compiler Directive
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 12 Lines 18
+
+ Function: QP::QTimeEvt::armX
+ Parameters: (QTimeEvtCtr const nTicks, QTimeEvtCtr const interval)
+ Complexity Param 2 Return 1 Cyclo Vg 6 Total 9
+ LOC 28 eLOC 26 lLOC 16 Comment 48 Lines 50
+
+ Function: QP::QTimeEvt::disarm
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 29 eLOC 26 lLOC 17 Comment 27 Lines 35
+
+ Function: QP::QTimeEvt::rearm
+ Parameters: (QTimeEvtCtr const nTicks)
+ Complexity Param 1 Return 1 Cyclo Vg 7 Total 9
+ LOC 37 eLOC 32 lLOC 18 Comment 47 Lines 64
+
+ Function: QP::QTimeEvt::ctr
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 15 eLOC 14 lLOC 10 Comment 16 Lines 18
+
+ Function: QP::QF::init
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 14 eLOC 13 lLOC 9 Comment 14 Lines 17
+
+ Function: QP::QF::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 4
+
+ Function: QP::initialize
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 7 eLOC 5 lLOC 3 Comment 5 Lines 10
+
+ Function: QP::QF::run
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 2 Total 3
+ LOC 12 eLOC 10 lLOC 7 Comment 21 Lines 15
+
+ Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const stkSize
+ , QEvt const * const ie)
+ Complexity Param 6 Return 1 Cyclo Vg 3 Total 10
+ LOC 16 eLOC 14 lLOC 9 Comment 24 Lines 22
+
+ Function: QP::QMActive::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 3
+
+ Function: QK_sched_
+ Parameters: (uint_fast8_t p)
+ Complexity Param 1 Return 1 Cyclo Vg 6 Total 8
+ LOC 45 eLOC 39 lLOC 22 Comment 41 Lines 67
+
+ Function: QP::QK::mutexLock
+ Parameters: (uint_fast8_t const prioCeiling)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 16 eLOC 14 lLOC 8 Comment 20 Lines 18
+
+ Function: QP::QK::mutexUnlock
+ Parameters: (QMutex mutex)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 18 eLOC 15 lLOC 8 Comment 19 Lines 20
+
+ Function: QP::QS::initBuf
+ Parameters: (uint8_t sto[], uint_fast16_t const stoSize)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 9 Comment 20 Lines 15
+
+ Function: QP::QS::filterOn
+ Parameters: (uint_fast8_t const rec)
+ Complexity Param 1 Return 1 Cyclo Vg 3 Total 5
+ LOC 18 eLOC 13 lLOC 6 Comment 15 Lines 20
+
+ Function: QP::QS::filterOff
+ Parameters: (uint_fast8_t const rec)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 28 eLOC 25 lLOC 36 Comment 14 Lines 37
+
+ Function: QP::QS::beginRec
+ Parameters: (uint_fast8_t const rec)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 14 eLOC 13 lLOC 10 Comment 16 Lines 18
+
+ Function: QP::QS::endRec
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 4 Total 5
+ LOC 22 eLOC 18 lLOC 10 Comment 16 Lines 27
+
+ Function: QP::QS::u8
+ Parameters: (uint8_t const format, uint8_t const d)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 7 Comment 12 Lines 14
+
+ Function: QP::QS::u16
+ Parameters: (uint8_t format, uint16_t d)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 15 eLOC 14 lLOC 10 Comment 12 Lines 20
+
+ Function: QP::QS::u32
+ Parameters: (uint8_t format, uint32_t d)
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 15 eLOC 13 lLOC 10 Comment 12 Lines 18
+
+ Function: QP::QS::u8_
+ Parameters: (uint8_t const d)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 10 eLOC 9 lLOC 7 Comment 11 Lines 12
+
+ Function: QP::QS::u8u8_
+ Parameters: (uint8_t const d1, uint8_t const d2)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 11 eLOC 10 lLOC 7 Comment 11 Lines 13
+
+ Function: QP::QS::u16_
+ Parameters: (uint16_t d)
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 14 eLOC 13 lLOC 10 Comment 11 Lines 18
+
+ Function: QP::QS::u32_
+ Parameters: (uint32_t d)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 14 eLOC 12 lLOC 10 Comment 11 Lines 16
+
+ Function: QP::QS::str_
+ Parameters: (char_t const *s)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 20 eLOC 18 lLOC 14 Comment 15 Lines 22
+
+ Function: QP::QS::str_ROM_
+ Parameters: (char_t const Q_ROM *s)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 20 eLOC 18 lLOC 14 Comment 15 Lines 22
+
+ Function: QP::QS::getByte
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 18 eLOC 14 lLOC 10 Comment 19 Lines 18
+
+ Function: QP::QS::getBlock
+ Parameters: (uint16_t * const pNbytes)
+ Complexity Param 1 Return 1 Cyclo Vg 5 Total 7
+ LOC 29 eLOC 23 lLOC 17 Comment 30 Lines 30
+
+ Function: QP::QS::sig_dict
+ Parameters: (enum_t const sig, void const * const obj, char_t const Q_RO
+ M * const name)
+ Complexity Param 3 Return 1 Cyclo Vg 1 Total 5
+ LOC 11 eLOC 9 lLOC 8 Comment 3 Lines 11
+
+ Function: QP::QS::obj_dict
+ Parameters: (void const * const obj, char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::fun_dict
+ Parameters: (void (* const fun)(void), char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::usr_dict
+ Parameters: (enum_t const rec, char_t const Q_ROM * const name)
+ Complexity Param 2 Return 1 Cyclo Vg 1 Total 4
+ LOC 10 eLOC 8 lLOC 7 Comment 3 Lines 10
+
+ Function: QP::QS::mem
+ Parameters: (uint8_t const *blk, uint8_t size)
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 19 eLOC 17 lLOC 11 Comment 10 Lines 22
+
+ Function: QP::QS::str
+ Parameters: (char_t const *s)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 22 eLOC 20 lLOC 14 Comment 15 Lines 26
+
+ Function: QP::QS::str_ROM
+ Parameters: (char_t const Q_ROM *s)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 22 eLOC 20 lLOC 14 Comment 15 Lines 26
+
+ Function: QP::QS::u64_
+ Parameters: (uint64_t d)
+ Complexity Param 1 Return 1 Cyclo Vg 2 Total 4
+ LOC 17 eLOC 14 lLOC 10 Comment 7 Lines 19
+
+ Function: QP::QS::u64
+ Parameters: (uint8_t format, uint64_t d)
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 18 eLOC 15 lLOC 10 Comment 8 Lines 21
+
+ Function: QP::QS::f32
+ Parameters: (uint8_t format, float32_t const d)
+ Complexity Param 2 Return 1 Cyclo Vg 2 Total 5
+ LOC 20 eLOC 18 lLOC 14 Comment 14 Lines 24
+
+ Function: QP::QS::f64
+ Parameters: (uint8_t format, float64_t const d)
+ Complexity Param 2 Return 1 Cyclo Vg 3 Total 6
+ LOC 29 eLOC 26 lLOC 20 Comment 10 Lines 33
+
+ Function: QP::QF::stop
+ Parameters: (void) Non-ANSI Parameter Construct
+ Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
+ LOC 3 eLOC 2 lLOC 1 Comment 13 Lines 4
+
+ Function: QP::QF::run
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
+ LOC 20 eLOC 16 lLOC 11 Comment 31 Lines 36
+
+ Function: QP::QMActive::start
+ Parameters: (uint_fast8_t const prio, QEvt const *qSto[], uint_fast16_t
+ const qLen, void * const stkSto, uint_fast16_t const, QEvt c
+ onst * const ie)
+ Complexity Param 6 Return 1 Cyclo Vg 3 Total 10
+ LOC 10 eLOC 8 lLOC 6 Comment 28 Lines 15
+
+ Function: QP::QMActive::stop
+ Parameters: (void)
+ Complexity Param 0 Return 1 Cyclo Vg 1 Total 2
+ LOC 3 eLOC 2 lLOC 1 Comment 12 Lines 3
+
+ Total: Functions
+ LOC 2183 eLOC 1834 lLOC 1193 InCmp 299 CycloCmp 335
+ Function Points FP(LOC) 37.5 FP(eLOC) 31.9 FP(lLOC) 21.0
+
+ ------------------------------------------------------------------------
+
+ ~~ Project Functional Analysis ~~
+
+ Total Functions .......: 147 Total Physical Lines ..: 2917
+ Total LOC .............: 2183 Total Function Pts LOC : 37.5
+ Total eLOC ............: 1834 Total Function Pts eLOC: 31.9
+ Total lLOC.............: 1193 Total Function Pts lLOC: 21.0
+ Total Cyclomatic Comp. : 335 Total Interface Comp. .: 299
+ Total Parameters ......: 152 Total Return Points ...: 147
+ Total Comment Lines ...: 2068 Total Blank Lines .....: 376
+ ------ ----- ----- ------ ------ -----
+ Avg Physical Lines ....: 19.84
+ Avg LOC ...............: 14.85 Avg eLOC ..............: 12.48
+ Avg lLOC ..............: 8.12 Avg Cyclomatic Comp. ..: 2.28
+ Avg Interface Comp. ...: 2.03 Avg Parameters ........: 1.03
+ Avg Return Points .....: 1.00 Avg Comment Lines .....: 14.07
+ ------ ----- ----- ------ ------ -----
+ Max LOC ...............: 111
+ Max eLOC ..............: 98 Max lLOC ..............: 63
+ Max Cyclomatic Comp. ..: 17 Max Interface Comp. ...: 7
+ Max Parameters ........: 6 Max Return Points .....: 1
+ Max Comment Lines .....: 105 Max Total Lines .......: 208
+ ------ ----- ----- ------ ------ -----
+ Min LOC ...............: 1
+ Min eLOC ..............: 1 Min lLOC ..............: 0
+ Min Cyclomatic Comp. ..: 1 Min Interface Comp. ...: 1
+ Min Parameters ........: 0 Min Return Points .....: 1
+ Min Comment Lines .....: 1 Min Total Lines .......: 1
+
+ ------------------------------------------------------------------------
+
+ ~~ File Summary ~~
+
+ C Source Files *.c ....: 0 C/C++ Include Files *.h: 15
+ C++ Source Files *.c* .: 18 C++ Include Files *.h* : 0
+ C# Source Files *.cs ..: 0 Java Source File *.jav*: 0
+ Other File Count ......: 0 Total File Count ......: 33
+ ________________________________________________________________________
+
+\endcode
+*/
diff --git a/doxygen/modules.dox b/doxygen/modules.dox
new file mode 100644
index 00000000..5afe1331
--- /dev/null
+++ b/doxygen/modules.dox
@@ -0,0 +1,59 @@
+/*! @defgroup qep QEP
+
+@brief
+Hierarchical Event Processor
+
+QEP is a universal, UML-compliant event processor that enables developers to code UML state machines in highly readable ANSI-C, in which every state machine element is mapped to code precisely, unambiguously, and exactly once (traceability). QEP fully supports hierarchical state nesting, which is the fundamental mechanism for reusing behavior across many states instead of repeating the same actions and transitions over and over again.
+*/
+/*!
+@defgroup qf QF
+
+@brief
+Active Object (Actor) Framework
+
+QF is a portable, event-driven, real-time framework for execution of active objects (concurrent state machines) specifically designed for real-time embedded (RTE) systems.
+*/
+/*!
+@defgroup qk QK
+
+@brief
+Preemptive Non-Blocking Kernel
+
+QK is a tiny **preemptive**, priority-based, non-blocking kernel designed specifically for executing active objects. QK meets all the requirement of the Rate Monotonic Scheduling (a.k.a. Rate Monotonic Analysis — RMA) and can be used in hard real-time systems.
+*/
+/*!
+@defgroup qv QV
+
+@brief
+Cooperative Run-to-Completion Kernel
+
+QV is a simple **cooperative** kernel (previously called "Vanilla" kernel). This kernel executes active objects one at a time, with priority-based scheduling performed before processing of each event. Due to naturally short duration of event processing in state machines, the simple QV kernel is often adequate for many real-time systems.
+*/
+/*!
+@defgroup qs QS
+
+@brief
+Software Tracing Instrumentation
+
+QS is software tracing system that enables developers to monitor live event-driven QP applications with minimal target system resources and without stopping or significantly slowing down the code. QS is an ideal tool for testing, troubleshooting, and optimizing QP applications. QS can even be used to support acceptance testing in product manufacturing.
+*/
+/*! @dir ../include
+
+Platform-independent QP/C API
+
+@note
+The QP/C include directory needs to be added to the compiler's include path in the applications using QP/C.
+*/
+/*! @dir ../source
+
+Platform-independent QP/C implementation
+
+Files from this directory need to be added to the project, to build the QP/C framework from source code.
+
+@attention
+Not all QP/C source files should be added to every project. For example, native QP/C ports to the preemptive QK kernel should **not** contain the file qv.c and conversely, QP/C ports to the cooperative QV kernel should not contain the files qk.c and qk_mutex.c.
+
+@note
+The QP/C source directory needs to be added to the compiler's include path in the applications using QP/C, because QP/C is built from sources.
+
+*/
\ No newline at end of file
diff --git a/doxygen/ports.dox b/doxygen/ports.dox
new file mode 100644
index 00000000..480a511b
--- /dev/null
+++ b/doxygen/ports.dox
@@ -0,0 +1,132 @@
+/*! @page ports Ports
+
+@section ports_gen General Comments
+The QP/C framework can be easily adapted to various operating systems, processor architectures, and compilers. Adapting the QP/C software is called porting and the QP/C framework has been designed from the ground up to make porting easy.
+
+The QP/C distribution contains many QP/C ports, which are organized into the three categories:
+
+- @subpage ports_native "Native Ports" adapt QP/C to run on bare-metal processors "natively", using one of the built-in kernels (@ref comp_qv "QV" or @ref comp_qk "QK")
+
+- @subpage ports_rtos "3rd-Party RTOS Ports" adapt QP/C to run on top of a 3rd-Party Real-Time Operating System (RTOS)
+
+- @subpage ports_os "3rd-Party OS Ports" adapt QP/C to run on top of a 3rd-Party Operating System (OS), such as Windows or Linux.
+
+
+------------------------------------------------------------------------------
+@section ports_code Port Code Structure
+Starting with QP/C release 5.4.0, **all** available ports are bundled into the QP/C download, as opposed to being distributed as separate QP Development Kits (QDKs). The main benefit is of this approach is that it greatly reduces chances of mistakes in combining the mainline QP/C code with various QDKs. The downside is that the QP/C distribution becomes quite large and that ports cannot be added or updated independently from the QP/C baseline code.
+
+All ports are located in sub-directories of the ports @ref qpc_files "top-level folder", with the hierarchical organization outlined below:
+
+
+
ports
+
+
+
arm-cm — Native ports for ARM-Cortex-M (bare-metal) A
+
+
+
qk — Port to the @ref comp_qk "preemptive QK kernel"
+
A **Native Ports** are located in sub-directories named after the CPU architecture, such as arm-cm for ARM Cortex-M. Under that directory, the sub-directories qk and qv contain ports for the @ref comp_qk "QK" and @ref comp_qv "QV" kernels, respectively.
+
+
+
B **Ports for 3rd-party RTOS** are located in sub-directories named after the RTOS, such as ucos-ii for uCOS-II RTOS. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here.
+
+
+
C **Ports for 3rd-party OS** are located in sub-directories named after the OS, such as win32 for the Win32 API (Windows OS). Under that directory, the sub-directories, such as mingw, contain builds for the specified toolset, such as MinGW or Visual C++ here.
+
+
+
+@note
+Because the QP distribution contains *all* ports, the number of sub-directories and files in the ports folder may seem daunting. However, knowing the structure of the ports folder, you can simply **delete** the sub-directories that are not interesting to you.
+
+
+@next{ports_native}
+*/
diff --git a/doxygen/ports_native.dox b/doxygen/ports_native.dox
new file mode 100644
index 00000000..9a06d52e
--- /dev/null
+++ b/doxygen/ports_native.dox
@@ -0,0 +1,66 @@
+/*##########################################################################*/
+/*! @page ports_native Native (Bare-Metal) Ports
+
+- @subpage lint (generic C compiler)
+- @subpage arm-cm (Cortex-M0/M0+/M3/M4/M4F)
+ - @ref arm-cm_qk (ARM-KEIL, GNU-ARM, IAR-ARM toolsets)
+ - @ref arm-cm_qv (ARM-KEIL, GNU-ARM, IAR-ARM toolsets)
+- @subpage arm7-9 ("classic" ARM)
+ - @ref arm7-9_qk (GNU-ARM, IAR-ARM toolsets)
+ - @ref arm7-9_qv (GNU-ARM, IAR-ARM toolsets)
+- @subpage avr (megaAVR)
+ - @ref avr_qk (GNU-AVR, IAR-AVR toolsets)
+ - @ref avr_qv (GNU-AVR, IAR-AVR toolsets)
+- @subpage msp430 ("classic" MSP430 and "extended" MSP430X)
+ - @ref msp430_qv (CCS, IAR toolsets)
+ - @ref msp430_qk (CCS, IAR toolsets)
+
+*/
+/*##########################################################################*/
+/*! @page lint PC-Lint
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page arm7-9 ARM7/ARM9
+
+@image html under_construction.jpg
+
+@section arm7-9_qk Preemptive QK Kernel
+
+\includelineno ports/arm7-9/qk/iar/qk_port.s
+
+@section arm7-9_qv Cooperative QV Kernel
+
+*/
+/*##########################################################################*/
+/*! @page arm-cm ARM Cortex-M
+
+@image html under_construction.jpg
+
+@section arm-cm_qk Preemptive QK Kernel
+
+@section arm-cm_qv Cooperative QV Kernel
+
+*/
+/*##########################################################################*/
+/*! @page avr AVR
+
+@image html under_construction.jpg
+
+@section avr_qk Preemptive QK Kernel
+
+@section avr_qv Cooperative QV Kernel
+
+*/
+/*##########################################################################*/
+/*! @page msp430 MSP430
+
+@image html under_construction.jpg
+
+@section msp430_qk Preemptive QK Kernel
+
+@section msp430_qv Cooperative QV Kernel
+
+*/
diff --git a/doxygen/ports_os.dox b/doxygen/ports_os.dox
new file mode 100644
index 00000000..bd5c2f6c
--- /dev/null
+++ b/doxygen/ports_os.dox
@@ -0,0 +1,35 @@
+/*##########################################################################*/
+/*! @page ports_os Ports to Third-Party OS
+
+- @subpage posix (Linux, embedded-Linux, BSD, etc.)
+- @subpage qt (Windows, Linux, Mac OS-X, Android, etc.)
+- @subpage win32 API (Windows)
+- @subpage win32-qv (Windows with QV)
+
+*/
+/*##########################################################################*/
+/*! @page posix POSIX
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page qt Qt GUI Framework
+
+@image html logo_qt.jpg
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page win32 Win32 API (Windows)
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page win32-qv Win32-QV (Windows with QV)
+
+@image html under_construction.jpg
+
+*/
diff --git a/doxygen/ports_rtos.dox b/doxygen/ports_rtos.dox
new file mode 100644
index 00000000..2bf3c1da
--- /dev/null
+++ b/doxygen/ports_rtos.dox
@@ -0,0 +1,100 @@
+/*##########################################################################*/
+/*! @page ports_rtos Ports to Third-Party RTOS
+
+The main purpose of integrating QP/C with conventional RTOSes is to enable you to incorporate various communication stacks (TCP/IP, USB, CAN, etc.) as well as other middleware, which requires the ability to **block** the task code.
+
+- @subpage cmsis-rtx
+- @subpage embos
+- @subpage freertos
+- @subpage threadx
+- @subpage ucos-ii
+
+@note
+You do **not** need to use a traditional RTOS just to achieve preemptive multitasking with QP. The @ref comp_qk "preemptive QK kernel", available as part of the QP package, supports preemptive priority-based multitasking and is fully compatible with Rate Monotonic Scheduling to achieve guaranteed, hard real-time performance. The preemptive, run-to-completion QK kernel perfectly matches the run-to-completion execution semantics of active objects, yet it is simpler, faster, and more efficient than any traditional blocking kernel.
+
+*/
+/*##########################################################################*/
+/*! @page cmsis-rtx CMSIS-RTOS RTX
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page embos embOS
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page freertos FreeRTOS
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page threadx ThreadX
+
+@image html under_construction.jpg
+
+*/
+/*##########################################################################*/
+/*! @page ucos-ii uC/OS-II
+
+@section ucos-ii_about About the QP Port to uC/OS-II
+This directory contains a generic platform-independent QP/C port to uC/OS-II V2.92.
+
+Typically, you should not need to change the files in this directory to adapt the QP-uC/OS port on any CPU/Compiler to which uC/OS-II has been ported, because all the CPU and compiler specifics are handled by the uC/OS-II RTOS.
+
+@note
+Currently, the port has been tested only on ARM Cortex-M3 and M4F.
+
+
+@section ucos-ii_source uC/OS-II Source and ARM Cortex-M3/M4 Ports
+The uC/OS-II V2.92 source code and ports are located in 3rd_party@uCOS-II. Please make sure to read about uC/OS-II licensing in the README file found in this directory.
+
+@note
+The official Micrium ARM-Cortex-M ports have been modified by Quantum Leaps to remove the dependencies on the Micrium's uC-CPU and uC-LIB components, and instead to inter-operate with the Cortex Microcontroller Software Interface Standard (CMSIS).
+
+
+------------------------------------------------------------------------------
+@section ucos-ii_using Using this QP Port to uC/OS-II
+The example projects for this port are located in @ref exa_ucos-ii "examples/ucos-ii/arm-cm/dpp_ek-tm4c123gxl".
+
+Currently, ARM-KEIL and IAR-ARM toolsets are supported (in the arm and iar sub-directories within this example project).
+
+The example projects use this port by directly including the QP source code (and this port) in the application projects. There is no QP library to build.
+
+However, this port can also be used as a library, in which case you need to build the QP library yourself and include in your project.
+
+
+
+@subsection ucos-ii_build QP Source Files Needed in this QP Port
+Whether you use this QP port as source files or as a library, it is important to note that not all QP soruce files should be included. Here is the list of QP source files needed:
+
+@verbatim
+qpc
++-source
+| +-qep_hsm.c
+| +-qep_msm.c
+| +-qf_act.c
+| +-qf_defer.c
+| +-qf_dyn.c
+| +-qf_ps.c
+| +-qf_qeq.c
+| +-qf_qmact.c
+| +-qf_time.c
+| |
+| +-qs.c - included only in the Spy build configuration
+| +-qs_fp.c - included only in the Spy build configuration
+|
++-ports
+| +-ucos-ii
+| | +-qf_port.c
+@endverbatim
+
+@note
+Specifically, the QP source files qf_actq.c and qf_mem.c must **NOT** be included in the build, because this functionality is taken from uC/OS-II.
+
+@image html under_construction.jpg
+
+*/
diff --git a/doxygen/preview.js b/doxygen/preview.js
new file mode 100644
index 00000000..42ef6f64
--- /dev/null
+++ b/doxygen/preview.js
@@ -0,0 +1,36 @@
+/* Image preview script
+ * powered by jQuery (http://www.jquery.com)
+ * written by Alen Grakalic (http://cssglobe.com)
+ * for more info visit
+ * http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
+ */
+this.imagePreview = function(){
+ // you might want to adjust to get the right result
+ horOffset = -100;
+ verOffset = 0;
+
+ /* END CONFIG */
+ $("a.preview").hover(function(e){
+ this.t = this.title;
+ this.title = "";
+ var c = (this.t != "") ? " " + this.t : "";
+ $("body").append("
').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo($$).width();$('#menu-fontsize').remove();$ULs=$$.find('ul');$ULs.each(function(i){var $ul=$ULs.eq(i);var $LIs=$ul.children();var $As=$LIs.children('a');var liFloat=$LIs.css('white-space','nowrap').css('float');var emWidth=$ul.add($LIs).add($As).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth;}
+else if(emWidthul',this);var offsetDirection=$childUl.css('left')!==undefined?'left':'right';$childUl.css(offsetDirection,emWidth);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);
+
+/*
+ * HoverIntent
+ */
+(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))").attr("src", this.href);
+ }
+ });
+});
diff --git a/doxygen/stylesheet.css b/doxygen/stylesheet.css
deleted file mode 100644
index e7108648..00000000
--- a/doxygen/stylesheet.css
+++ /dev/null
@@ -1,1430 +0,0 @@
-/* The standard CSS for doxygen 1.8.5 */
-
-body, table, div, p, dl {
- font: 400 14px/22px Roboto,sans-serif;
-}
-
-/* @group Heading Levels */
-
-.title {
- font: 400 14px/28px Roboto,sans-serif;
- font-size: 150%;
- font-weight: bold;
- margin: 10px 2px;
-}
-
-h1.groupheader {
- font-size: 110%;
-}
-
-h2.groupheader {
- border-bottom: 1px solid #879ECB;
- color: #354C7B;
- font-size: 105%;
- font-weight: normal;
- margin-top: 1.75em;
- padding-top: 8px;
- padding-bottom: 4px;
- width: 100%;
-}
-
-h3.groupheader {
- font-size: 100%;
-}
-
-h1, h2, h3, h4, h5, h6 {
- -webkit-transition: text-shadow 0.5s linear;
- -moz-transition: text-shadow 0.5s linear;
- -ms-transition: text-shadow 0.5s linear;
- -o-transition: text-shadow 0.5s linear;
- transition: text-shadow 0.5s linear;
- margin-right: 15px;
-}
-
-h1 {font-size: 135%;}
-h2 {font-size: 115%;}
-h3 {font-size: 105%;}
-
-
-h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
- text-shadow: 0 0 15px cyan;
-}
-
-dt {
- font-weight: bold;
-}
-
-div.multicol {
- -moz-column-gap: 1em;
- -webkit-column-gap: 1em;
- -moz-column-count: 3;
- -webkit-column-count: 3;
-}
-
-p.startli, p.startdd, p.starttd {
- margin-top: 2px;
-}
-
-p.endli {
- margin-bottom: 0px;
-}
-
-p.enddd {
- margin-bottom: 4px;
-}
-
-p.endtd {
- margin-bottom: 2px;
-}
-
-/* @end */
-
-caption {
- font-weight: bold;
-}
-
-span.legend {
- font-size: 70%;
- text-align: center;
-}
-
-h3.version {
- font-size: 90%;
- text-align: center;
-}
-
-div.qindex, div.navtab{
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
-}
-
-div.qindex, div.navpath {
- width: 100%;
- line-height: 140%;
-}
-
-div.navtab {
- margin-right: 15px;
-}
-
-/* @group Link Styling */
-
-a {
- color: #3D578C;
- font-weight: normal;
- text-decoration: none;
-}
-
-.contents a:visited {
- color: #4665A2;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-a.qindex {
- font-weight: bold;
-}
-
-a.qindexHL {
- font-weight: bold;
- background-color: #9CAFD4;
- color: #ffffff;
- border: 1px double #869DCA;
-}
-
-.contents a.qindexHL:visited {
- color: #ffffff;
-}
-
-a.el {
- font-weight: bold;
-}
-
-a.elRef {
-}
-
-a.code, a.code:visited, a.line, a.line:visited {
- color: #4665A2;
-}
-
-a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
- color: #4665A2;
-}
-
-/* @end */
-
-dl.el {
- margin-left: -1cm;
-}
-
-pre.fragment {
- border: 1px solid #C4CFE5;
- background-color: #FBFCFD;
- padding: 4px 6px;
- margin: 4px 8px 4px 2px;
- overflow: auto;
- word-wrap: break-word;
- font-size: 9pt;
- line-height: 125%;
- font-family: monospace, fixed;
- font-size: 100%;
-}
-
-div.fragment {
- padding: 0px;
- margin: 0px;
- background-color: #FBFCFD;
- border: 1px solid #C4CFE5;
-}
-
-div.line {
- font-family: monospace, fixed;
- font-size: 13px;
- min-height: 13px;
- line-height: 1.0;
- text-wrap: unrestricted;
- white-space: -moz-pre-wrap; /* Moz */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- white-space: pre-wrap; /* CSS3 */
- word-wrap: break-word; /* IE 5.5+ */
- text-indent: -53px;
- padding-left: 53px;
- padding-bottom: 0px;
- margin: 0px;
- -webkit-transition-property: background-color, box-shadow;
- -webkit-transition-duration: 0.5s;
- -moz-transition-property: background-color, box-shadow;
- -moz-transition-duration: 0.5s;
- -ms-transition-property: background-color, box-shadow;
- -ms-transition-duration: 0.5s;
- -o-transition-property: background-color, box-shadow;
- -o-transition-duration: 0.5s;
- transition-property: background-color, box-shadow;
- transition-duration: 0.5s;
-}
-
-div.line.glow {
- background-color: cyan;
- box-shadow: 0 0 10px cyan;
-}
-
-
-span.lineno {
- padding-right: 4px;
- text-align: right;
- border-right: 2px solid #0F0;
- background-color: #E8E8E8;
- white-space: pre;
-}
-span.lineno a {
- background-color: #D8D8D8;
-}
-
-span.lineno a:hover {
- background-color: #C8C8C8;
-}
-
-div.ah {
- background-color: black;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 3px;
- margin-top: 3px;
- padding: 0.2em;
- border: solid thin #333;
- border-radius: 0.5em;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- box-shadow: 2px 2px 3px #999;
- -webkit-box-shadow: 2px 2px 3px #999;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
- background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
-}
-
-div.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- font-weight: bold;
-}
-
-div.groupText {
- margin-left: 16px;
- font-style: italic;
-}
-
-body {
- background-color: white;
- color: black;
- margin: 0;
-}
-
-div.contents {
- margin-top: 10px;
- margin-left: 12px;
- margin-right: 8px;
-}
-
-td.indexkey {
- background-color: #EBEFF6;
- font-weight: bold;
- border: 1px solid #C4CFE5;
- margin: 2px 0px 2px 0;
- padding: 2px 10px;
- white-space: nowrap;
- vertical-align: top;
-}
-
-td.indexvalue {
- background-color: #EBEFF6;
- border: 1px solid #C4CFE5;
- padding: 2px 10px;
- margin: 2px 0px;
-}
-
-tr.memlist {
- background-color: #EEF1F7;
-}
-
-p.formulaDsp {
- text-align: center;
-}
-
-img.formulaDsp {
-
-}
-
-img.formulaInl {
- vertical-align: middle;
-}
-
-div.center {
- text-align: center;
- margin-top: 0px;
- margin-bottom: 0px;
- padding: 0px;
-}
-
-div.center img {
- border: 0px;
-}
-
-address.footer {
- text-align: right;
- padding-right: 12px;
-}
-
-img.footer {
- border: 0px;
- vertical-align: middle;
-}
-
-/* @group Code Colorization */
-
-span.keyword {color: #008000}
-span.keywordtype {color: #604020}
-span.keywordflow {color: #e08000}
-span.comment {color: #800000}
-span.preprocessor {color: #806020}
-span.stringliteral {color: #002080}
-span.charliteral {color: #008080}
-span.vhdldigit {color: #ff00ff}
-span.vhdlchar {color: #000000}
-span.vhdlkeyword {color: #700070}
-span.vhdllogic {color: #ff0000}
-
-blockquote {
- background-color: #F7F8FB;
- border-left: 2px solid #9CAFD4;
- margin: 0 24px 0 4px;
- padding: 0 12px 0 16px;
-}
-
-/* @end */
-
-/*
-.search {
- color: #003399;
- font-weight: bold;
-}
-
-form.search {
- margin-bottom: 0px;
- margin-top: 0px;
-}
-
-input.search {
- font-size: 75%;
- color: #000080;
- font-weight: normal;
- background-color: #e8eef2;
-}
-*/
-
-td.tiny {
- font-size: 75%;
-}
-
-.dirtab {
- padding: 4px;
- border-collapse: collapse;
- border: 1px solid #A3B4D7;
-}
-
-th.dirtab {
- background: #EBEFF6;
- font-weight: bold;
-}
-
-hr {
- height: 0px;
- border: none;
- border-top: 1px solid #4A6AAA;
-}
-
-hr.footer {
- height: 1px;
-}
-
-/* @group Member Descriptions */
-
-table.memberdecls {
- border-spacing: 0px;
- padding: 0px;
-}
-
-.memberdecls td, .fieldtable tr {
- -webkit-transition-property: background-color, box-shadow;
- -webkit-transition-duration: 0.5s;
- -moz-transition-property: background-color, box-shadow;
- -moz-transition-duration: 0.5s;
- -ms-transition-property: background-color, box-shadow;
- -ms-transition-duration: 0.5s;
- -o-transition-property: background-color, box-shadow;
- -o-transition-duration: 0.5s;
- transition-property: background-color, box-shadow;
- transition-duration: 0.5s;
-}
-
-.memberdecls td.glow, .fieldtable tr.glow {
- background-color: cyan;
- box-shadow: 0 0 15px cyan;
-}
-
-.mdescLeft, .mdescRight,
-.memItemLeft, .memItemRight,
-.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
- background-color: #F9FAFC;
- border: none;
- margin: 4px;
- padding: 1px 0 0 8px;
-}
-
-.mdescLeft, .mdescRight {
- padding: 0px 8px 4px 8px;
- color: #555;
-}
-
-.memSeparator {
- border-bottom: 1px solid #DEE4F0;
- line-height: 1px;
- margin: 0px;
- padding: 0px;
-}
-
-.memItemLeft, .memTemplItemLeft {
- white-space: nowrap;
-}
-
-.memItemRight {
- width: 100%;
-}
-
-.memTemplParams {
- color: #4665A2;
- white-space: nowrap;
- font-size: 80%;
-}
-
-/* @end */
-
-/* @group Member Details */
-
-/* Styles for detailed member documentation */
-
-.memtemplate {
- font-size: 80%;
- color: #4665A2;
- font-weight: normal;
- margin-left: 9px;
-}
-
-.memnav {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
- margin: 2px;
- margin-right: 15px;
- padding: 2px;
-}
-
-.mempage {
- width: 100%;
-}
-
-.memitem {
- padding: 0;
- margin-bottom: 10px;
- margin-right: 5px;
- -webkit-transition: box-shadow 0.5s linear;
- -moz-transition: box-shadow 0.5s linear;
- -ms-transition: box-shadow 0.5s linear;
- -o-transition: box-shadow 0.5s linear;
- transition: box-shadow 0.5s linear;
- display: table !important;
- width: 100%;
-}
-
-.memitem.glow {
- box-shadow: 0 0 15px cyan;
-}
-
-.memname {
- font-weight: bold;
- margin-left: 6px;
-}
-
-.memname td {
- vertical-align: bottom;
-}
-
-.memproto, dl.reflist dt {
- border-top: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
- padding: 6px 0px 6px 0px;
- color: #253555;
- font-weight: bold;
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- background-image:url('nav_f.png');
- background-repeat:repeat-x;
- background-color: #E2E8F2;
- /* opera specific markup */
- box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- border-top-right-radius: 4px;
- border-top-left-radius: 4px;
- /* firefox specific markup */
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-topleft: 4px;
- /* webkit specific markup */
- -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- -webkit-border-top-right-radius: 4px;
- -webkit-border-top-left-radius: 4px;
-}
-
-.memdoc, dl.reflist dd {
- border-bottom: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
- padding: 6px 10px 2px 10px;
- background-color: #FBFCFD;
- border-top-width: 0;
- background-image:url('nav_g.png');
- background-repeat:repeat-x;
- background-color: #FFFFFF;
- /* opera specific markup */
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
- box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- /* firefox specific markup */
- -moz-border-radius-bottomleft: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
- /* webkit specific markup */
- -webkit-border-bottom-left-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-}
-
-dl.reflist dt {
- padding: 5px;
-}
-
-dl.reflist dd {
- margin: 0px 0px 10px 0px;
- padding: 5px;
-}
-
-.paramkey {
- text-align: right;
-}
-
-.paramtype {
- white-space: nowrap;
-}
-
-.paramname {
- color: #602020;
- white-space: nowrap;
-}
-.paramname em {
- font-style: normal;
-}
-.paramname code {
- line-height: 14px;
-}
-
-.params, .retval, .exception, .tparams {
- margin-left: 0px;
- padding-left: 0px;
-}
-
-.params .paramname, .retval .paramname {
- font-weight: bold;
- vertical-align: top;
-}
-
-.params .paramtype {
- font-style: italic;
- vertical-align: top;
-}
-
-.params .paramdir {
- font-family: "courier new",courier,monospace;
- vertical-align: top;
-}
-
-table.mlabels {
- border-spacing: 0px;
-}
-
-td.mlabels-left {
- width: 100%;
- padding: 0px;
-}
-
-td.mlabels-right {
- vertical-align: bottom;
- padding: 0px;
- white-space: nowrap;
-}
-
-span.mlabels {
- margin-left: 8px;
-}
-
-span.mlabel {
- background-color: #728DC1;
- border-top:1px solid #5373B4;
- border-left:1px solid #5373B4;
- border-right:1px solid #C4CFE5;
- border-bottom:1px solid #C4CFE5;
- text-shadow: none;
- color: white;
- margin-right: 4px;
- padding: 2px 3px;
- border-radius: 3px;
- font-size: 7pt;
- white-space: nowrap;
- vertical-align: middle;
-}
-
-
-
-/* @end */
-
-/* these are for tree view when not used as main index */
-
-div.directory {
- margin: 10px 0px;
- border-top: 1px solid #A8B8D9;
- border-bottom: 1px solid #A8B8D9;
- width: 100%;
-}
-
-.directory table {
- border-collapse:collapse;
-}
-
-.directory td {
- margin: 0px;
- padding: 0px;
- vertical-align: top;
-}
-
-.directory td.entry {
- white-space: nowrap;
- padding-right: 6px;
- padding-top: 3px;
-}
-
-.directory td.entry a {
- outline:none;
-}
-
-.directory td.entry a img {
- border: none;
-}
-
-.directory td.desc {
- width: 100%;
- padding-left: 6px;
- padding-right: 6px;
- padding-top: 3px;
- border-left: 1px solid rgba(0,0,0,0.05);
-}
-
-.directory tr.even {
- padding-left: 6px;
- background-color: #F7F8FB;
-}
-
-.directory img {
- vertical-align: -30%;
-}
-
-.directory .levels {
- white-space: nowrap;
- width: 100%;
- text-align: right;
- font-size: 9pt;
-}
-
-.directory .levels span {
- cursor: pointer;
- padding-left: 2px;
- padding-right: 2px;
- color: #3D578C;
-}
-
-div.dynheader {
- margin-top: 8px;
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-address {
- font-style: normal;
- color: #2A3D61;
-}
-
-table.doxtable {
- border-collapse:collapse;
- margin-top: 4px;
- margin-bottom: 4px;
-}
-
-table.doxtable td, table.doxtable th {
- border: 1px solid #2D4068;
- padding: 3px 7px 2px;
-}
-
-table.doxtable th {
- background-color: #374F7F;
- color: #FFFFFF;
- font-size: 110%;
- padding-bottom: 4px;
- padding-top: 5px;
-}
-
-table.fieldtable {
- /*width: 100%;*/
- margin-bottom: 10px;
- border: 1px solid #A8B8D9;
- border-spacing: 0px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
- -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
- box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-}
-
-.fieldtable td, .fieldtable th {
- padding: 3px 7px 2px;
-}
-
-.fieldtable td.fieldtype, .fieldtable td.fieldname {
- white-space: nowrap;
- border-right: 1px solid #A8B8D9;
- border-bottom: 1px solid #A8B8D9;
- vertical-align: top;
-}
-
-.fieldtable td.fieldname {
- padding-top: 3px;
-}
-
-.fieldtable td.fielddoc {
- border-bottom: 1px solid #A8B8D9;
- /*width: 100%;*/
-}
-
-.fieldtable td.fielddoc p:first-child {
- margin-top: 0px;
-}
-
-.fieldtable td.fielddoc p:last-child {
- margin-bottom: 2px;
-}
-
-.fieldtable tr:last-child td {
- border-bottom: none;
-}
-
-.fieldtable th {
- background-image:url('nav_f.png');
- background-repeat:repeat-x;
- background-color: #E2E8F2;
- font-size: 90%;
- color: #253555;
- padding-bottom: 4px;
- padding-top: 5px;
- text-align:left;
- -moz-border-radius-topleft: 4px;
- -moz-border-radius-topright: 4px;
- -webkit-border-top-left-radius: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom: 1px solid #A8B8D9;
-}
-
-
-.tabsearch {
- top: 0px;
- left: 10px;
- height: 36px;
- background-image: url('tab_b.png');
- z-index: 101;
- overflow: hidden;
- font-size: 13px;
-}
-
-.navpath ul {
- font-size: 11px;
- background-image:url('tab_b.png');
- background-repeat:repeat-x;
- background-position: 0 -5px;
- height:30px;
- line-height:30px;
- color:#8AA0CC;
- border:solid 1px #C2CDE4;
- overflow:hidden;
- margin:0px;
- padding:0px;
-}
-
-.navpath li {
- list-style-type:none;
- float:left;
- padding-left:10px;
- padding-right:15px;
- background-image:url('bc_s.png');
- background-repeat:no-repeat;
- background-position:right;
- color:#364D7C;
-}
-
-.navpath li.navelem a {
- height:32px;
- display:block;
- text-decoration: none;
- outline: none;
- color: #283A5D;
- font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- text-decoration: none;
-}
-
-.navpath li.navelem a:hover {
- color:#6884BD;
-}
-
-.navpath li.footer {
- list-style-type:none;
- float:right;
- padding-left:10px;
- padding-right:15px;
- background-image:none;
- background-repeat:no-repeat;
- background-position:right;
- color:#364D7C;
- font-size: 8pt;
-}
-
-
-div.summary {
- float: right;
- font-size: 8pt;
- padding-right: 5px;
- width: 50%;
- text-align: right;
-}
-
-div.summary a {
- white-space: nowrap;
-}
-
-div.ingroups {
- font-size: 8pt;
- width: 50%;
- text-align: left;
-}
-
-div.ingroups a {
- white-space: nowrap;
-}
-
-div.header {
- background-image:url('nav_h.png');
- background-repeat:repeat-x;
- background-color: #F9FAFC;
- margin: 0px;
- border-bottom: 1px solid #C4CFE5;
-}
-
-div.headertitle {
- padding: 5px 5px 5px 10px;
-}
-
-dl {
- padding: 0 0 0 10px;
-}
-
-/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
-dl.section {
- margin-left: 0px;
- padding-left: 0px;
-}
-
-dl.note {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #D0C000;
-}
-
-dl.warning, dl.attention {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #FF0000;
-}
-
-dl.pre, dl.post, dl.invariant {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #00D000;
-}
-
-dl.deprecated {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #505050;
-}
-
-dl.todo {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #00C0E0;
-}
-
-dl.test {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #3030E0;
-}
-
-dl.bug {
- margin-left:-7px;
- padding-left: 3px;
- border-left:4px solid;
- border-color: #C08050;
-}
-
-dl.section dd {
- margin-bottom: 6px;
-}
-
-
-#projectlogo {
- text-align: center;
- vertical-align: bottom;
- border-collapse: separate;
-}
-
-#projectlogo img {
- border: 0px none;
-}
-
-#projectname {
- font: 300% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 2px 0px;
-}
-
-#projectbrief {
- font: 120% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 0px;
-}
-
-#projectnumber {
- font: 50% Tahoma, Arial,sans-serif;
- margin: 0px;
- padding: 0px;
-}
-
-#titlearea {
- padding: 0px;
- margin: 0px;
- width: 100%;
- border-bottom: 1px solid #5373B4;
-}
-
-.image {
- text-align: center;
-}
-
-.dotgraph {
- text-align: center;
-}
-
-.mscgraph {
- text-align: center;
-}
-
-.caption {
- font-weight: bold;
-}
-
-div.zoom {
- border: 1px solid #90A5CE;
-}
-
-dl.citelist {
- margin-bottom:50px;
-}
-
-dl.citelist dt {
- color:#334975;
- float:left;
- font-weight:bold;
- margin-right:10px;
- padding:5px;
-}
-
-dl.citelist dd {
- margin:2px 0;
- padding:5px 0;
-}
-
-div.toc {
- padding: 14px 25px;
- background-color: #F4F6FA;
- border: 1px solid #D8DFEE;
- border-radius: 7px 7px 7px 7px;
- float: right;
- height: auto;
- margin: 0 20px 10px 10px;
- width: 200px;
-}
-
-div.toc li {
- background: url("bdwn.png") no-repeat scroll 0 5px transparent;
- font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
- margin-top: 5px;
- padding-left: 10px;
- padding-top: 2px;
-}
-
-div.toc h3 {
- font: bold 12px/1.2 Arial,FreeSans,sans-serif;
- color: #4665A2;
- border-bottom: 0 none;
- margin: 0;
-}
-
-div.toc ul {
- list-style: none outside none;
- border: medium none;
- padding: 0px;
-}
-
-div.toc li.level1 {
- margin-left: 0px;
-}
-
-div.toc li.level2 {
- margin-left: 15px;
-}
-
-div.toc li.level3 {
- margin-left: 30px;
-}
-
-div.toc li.level4 {
- margin-left: 45px;
-}
-
-.inherit_header {
- font-weight: bold;
- color: gray;
- cursor: pointer;
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.inherit_header td {
- padding: 6px 0px 2px 5px;
-}
-
-.inherit {
- display: none;
-}
-
-tr.heading h2 {
- margin-top: 12px;
- margin-bottom: 4px;
-}
-
-/* tooltip related style info */
-
-.ttc {
- position: absolute;
- display: none;
-}
-
-#powerTip {
- cursor: default;
- white-space: nowrap;
- background-color: white;
- border: 1px solid gray;
- border-radius: 4px 4px 4px 4px;
- box-shadow: 1px 1px 7px gray;
- display: none;
- font-size: smaller;
- max-width: 80%;
- opacity: 0.9;
- padding: 1ex 1em 1em;
- position: absolute;
- z-index: 2147483647;
-}
-
-#powerTip div.ttdoc {
- color: grey;
- font-style: italic;
-}
-
-#powerTip div.ttname a {
- font-weight: bold;
-}
-
-#powerTip div.ttname {
- font-weight: bold;
-}
-
-#powerTip div.ttdeci {
- color: #006318;
-}
-
-#powerTip div {
- margin: 0px;
- padding: 0px;
- font: 12px/16px Roboto,sans-serif;
-}
-
-#powerTip:before, #powerTip:after {
- content: "";
- position: absolute;
- margin: 0px;
-}
-
-#powerTip.n:after, #powerTip.n:before,
-#powerTip.s:after, #powerTip.s:before,
-#powerTip.w:after, #powerTip.w:before,
-#powerTip.e:after, #powerTip.e:before,
-#powerTip.ne:after, #powerTip.ne:before,
-#powerTip.se:after, #powerTip.se:before,
-#powerTip.nw:after, #powerTip.nw:before,
-#powerTip.sw:after, #powerTip.sw:before {
- border: solid transparent;
- content: " ";
- height: 0;
- width: 0;
- position: absolute;
-}
-
-#powerTip.n:after, #powerTip.s:after,
-#powerTip.w:after, #powerTip.e:after,
-#powerTip.nw:after, #powerTip.ne:after,
-#powerTip.sw:after, #powerTip.se:after {
- border-color: rgba(255, 255, 255, 0);
-}
-
-#powerTip.n:before, #powerTip.s:before,
-#powerTip.w:before, #powerTip.e:before,
-#powerTip.nw:before, #powerTip.ne:before,
-#powerTip.sw:before, #powerTip.se:before {
- border-color: rgba(128, 128, 128, 0);
-}
-
-#powerTip.n:after, #powerTip.n:before,
-#powerTip.ne:after, #powerTip.ne:before,
-#powerTip.nw:after, #powerTip.nw:before {
- top: 100%;
-}
-
-#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
- border-top-color: #ffffff;
- border-width: 10px;
- margin: 0px -10px;
-}
-#powerTip.n:before {
- border-top-color: #808080;
- border-width: 11px;
- margin: 0px -11px;
-}
-#powerTip.n:after, #powerTip.n:before {
- left: 50%;
-}
-
-#powerTip.nw:after, #powerTip.nw:before {
- right: 14px;
-}
-
-#powerTip.ne:after, #powerTip.ne:before {
- left: 14px;
-}
-
-#powerTip.s:after, #powerTip.s:before,
-#powerTip.se:after, #powerTip.se:before,
-#powerTip.sw:after, #powerTip.sw:before {
- bottom: 100%;
-}
-
-#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
- border-bottom-color: #ffffff;
- border-width: 10px;
- margin: 0px -10px;
-}
-
-#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
- border-bottom-color: #808080;
- border-width: 11px;
- margin: 0px -11px;
-}
-
-#powerTip.s:after, #powerTip.s:before {
- left: 50%;
-}
-
-#powerTip.sw:after, #powerTip.sw:before {
- right: 14px;
-}
-
-#powerTip.se:after, #powerTip.se:before {
- left: 14px;
-}
-
-#powerTip.e:after, #powerTip.e:before {
- left: 100%;
-}
-#powerTip.e:after {
- border-left-color: #ffffff;
- border-width: 10px;
- top: 50%;
- margin-top: -10px;
-}
-#powerTip.e:before {
- border-left-color: #808080;
- border-width: 11px;
- top: 50%;
- margin-top: -11px;
-}
-
-#powerTip.w:after, #powerTip.w:before {
- right: 100%;
-}
-#powerTip.w:after {
- border-right-color: #ffffff;
- border-width: 10px;
- top: 50%;
- margin-top: -10px;
-}
-#powerTip.w:before {
- border-right-color: #808080;
- border-width: 11px;
- top: 50%;
- margin-top: -11px;
-}
-
-@media print {
- #top { display: none; }
- #side-nav { display: none; }
- #nav-path { display: none; }
- body { overflow:visible; }
- h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
- .summary { display: none; }
- .memitem { page-break-inside: avoid; }
- #doc-content {
- margin-left:0 !important;
- height:auto !important;
- width:auto !important;
- overflow:inherit;
- display:inline;
- }
-}
-
-/* QL additions ---------------------------------------------- */
-#titlearea {
- background-color: #E6EAF4;
-}
-
-.title {
- color: #354C7B;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #354C7B;
-}
-
-a.extern {
- background:url(img/extern.png) no-repeat right;
- padding-right: 14px;
- text-decoration:none;
-}
-.extern:hover {
- text-decoration:underline;
-}
-a.movie {
- background:url(img/movie.png) no-repeat left;
- padding-left: 20px;
- font-weight: bold;
-}
-
-img.inline {
- float: left;
- padding-right: 10px;
-}
-img.inline-right {
- float: right;
- padding-left: 10px;
-}
-
-table.indextable {
- border: 1px solid #777;
- border-collapse: collapse;
- background-color: #f0f0f0;
- font-size: 100%;
-}
-
-table.indextable th {
- text-align: left;
- text-indent:5px;
-}
-
-table.indextable td {
- border: 1px solid #777;
- border-collapse: collapse;
-}
-
-table.indextable ul {
- margin-left:20px;
-}
-
-table.indextable ul {padding-left:8px;}
-
-span.menu {background-color:#dddddd; }
-span.note {background-color:#ffffaa; }
-span.preprocessor, span.preprocessor a {color: darkblue; }
-span.comment {color: darkred; font-style: italic; }
-span.string, span.char { color: darkgreen; }
-
-div.separate {
- border: none;
- border-top: 1px #bfbfbf solid;
- width: 300px;
- margin: 16px auto 2px;
-}
-
-.button {
- border-style: solid;
- border-color: white #625f5d #625f5d #eeeeee;
- border-width: 2px;
- font-size: 10pt;
- color: black;
- background-color: #d4d0c8;
- white-space: nowrap;
- padding-left: 2px;
- padding-right: 2px;
-}
-.button:hover {
- border-style: solid;
- border-color: #625f5d #eeeeee #eeeeee #625f5d;
- border-width: 2px;
- font-size: 10pt;
- color: black;
- background-color: #d4d0c8;
- white-space: nowrap;
- padding-left: 2px;
- padding-right: 2px;
-}
-.checkbox {
- background:url(img/checkboxoff.png) no-repeat 2px 2px;
- padding-left: 16px;
- font-family: Tahoma;
- font-size: 10pt;
- background-color: #d4d0c8;
- color: black;
- white-space: nowrap;
-}
-.checkbox:hover {
- background:url(img/checkboxon.png) no-repeat 2px 2px;
- font-size: 10pt;
- background-color: #d4d0c8;
- padding-left: 16px;
- color: black;
- white-space: nowrap;
-}
-.radio {
- background:url(img/radiooff.png) no-repeat 2px 2px;
- font-size: 10pt;
- background-color: #d4d0c8;
- padding-left: 14px;
- color: black;
- white-space: nowrap;
-}
-.radio:hover {
- background:url(img/radioon.png) no-repeat 2px 2px;
- font-size: 10pt;
- background-color: #d4d0c8;
- padding-left: 14px;
- color: black;
- white-space: nowrap;
-}
-
-span.icon {
- padding-left: 20px;
- white-space: nowrap;
- font-family: monospace, fixed;
-}
-
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb1.cpp b/examples/80x86/dos/watcom/l/bomb/bomb1.cpp
deleted file mode 100644
index aa4b8213..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb1.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-//****************************************************************************
-// Product: Time Bomb Example with with "Nested Switch Statement"
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h"
-
-enum BombSignals { // all signals for the Bomb FSM
- UP_SIG,
- DOWN_SIG,
- ARM_SIG,
- TICK_SIG
-};
-
-enum BombStates { // all states for the Bomb FSM
- SETTING_STATE,
- TIMING_STATE
-};
-
-struct Event {
- uint16_t sig; // signal of the event
- // add event parameters by subclassing the Event structure...
-};
-
-struct TickEvt : public Event {
- uint8_t fine_time; // the fine 1/10 s counter
-};
-
-class Bomb1 { // the Bomb FSM
-public:
- Bomb1(uint8_t defuse) : m_defuse(defuse) {}
- void init(void); // the init() FSM interface
- void dispatch(Event const *e); // the dispatch() FSM interface
-
-private:
- void tran(uint8_t target) { m_state = target; }
-
-private:
- uint8_t m_state; // the scalar state-variable
- uint8_t m_timeout; // number of seconds till explosion
- uint8_t m_code; // currently entered code to disarm the bomb
- uint8_t m_defuse; // secret defuse code to disarm the bomb
-};
-
-//............................................................................
- // the initial value of the timeout
-#define INIT_TIMEOUT 10
-
-//............................................................................
-void Bomb1::init(void) {
- m_timeout = INIT_TIMEOUT; // timeout is initialized in initial tran.
- tran(SETTING_STATE);
-}
-//............................................................................
-void Bomb1::dispatch(Event const *e) {
- switch (m_state) {
- case SETTING_STATE: {
- switch (e->sig) {
- case UP_SIG: {
- if (m_timeout < 60) {
- ++m_timeout;
- BSP_display(m_timeout);
- }
- break;
- }
- case DOWN_SIG: {
- if (m_timeout > 1) {
- --m_timeout;
- BSP_display(m_timeout);
- }
- break;
- }
- case ARM_SIG: {
- m_code = 0;
- tran(TIMING_STATE); // transition to "timing"
- break;
- }
- }
- break;
- }
- case TIMING_STATE: {
- switch (e->sig) {
- case UP_SIG: {
- m_code <<= 1;
- m_code |= 1;
- break;
- }
- case DOWN_SIG: {
- m_code <<= 1;
- break;
- }
- case ARM_SIG: {
- if (m_code == m_defuse) {
- tran(SETTING_STATE); // transition to "setting"
- }
- break;
- }
- case TICK_SIG: {
- if (((TickEvt const *)e)->fine_time == 0) {
- --m_timeout;
- BSP_display(m_timeout);
- if (m_timeout == 0) {
- BSP_boom(); // destroy the bomb
- }
- }
- break;
- }
- }
- break;
- }
- }
-}
-
-// Test harness --------------------------------------------------------------
-#include
-#include
-#include
-#include
-
-static Bomb1 l_bomb(0x0D); // time bomb FSM, the secret defuse code, 1101 bin
-
-//............................................................................
-int main() {
-
- cout << "Time Bomb (Nested switch)" << endl
- << "Press 'u' for UP event" << endl
- << "Press 'd' for DOWN event" << endl
- << "Press 'a' for ARM event" << endl
- << "Press to quit." << endl;
-
- l_bomb.init(); // take the initial transition
-
- static TickEvt tick_evt;
- tick_evt.sig = TICK_SIG;
- tick_evt.fine_time = 0;
- for (;;) { // event loop
-
- delay(100); // 100 ms delay
-
- if (++tick_evt.fine_time == 10) {
- tick_evt.fine_time = 0;
- }
- cout.width(1);
- cout << "T(" << (int)tick_evt.fine_time << ')'
- << ((tick_evt.fine_time == 0) ? '\n' : ' ');
-
- l_bomb.dispatch(&tick_evt); // dispatch TICK event
-
- if (_kbhit()) {
- static Event const up_evt = { UP_SIG };
- static Event const down_evt = { DOWN_SIG };
- static Event const arm_evt = { ARM_SIG };
- Event const *e = (Event *)0;
-
- switch (_getch()) {
- case 'u': { // UP event
- cout << endl << "UP : ";
- e = &up_evt; // generate the UP event
- break;
- }
- case 'd': { // DOWN event
- cout << endl << "DOWN: ";
- e = &down_evt; // generate the DOWN event
- break;
- }
- case 'a': { // ARM event
- cout << endl << "ARM : ";
- e = &arm_evt; // generate the ARM event
- break;
- }
- case '\33': { // key
- cout << endl << "ESC : Bye! Bye!" << flush << endl;
- _exit(0);
- break;
- }
- }
- if (e != (Event *)0) { // keyboard event available?
- l_bomb.dispatch(e); // dispatch the event
- }
- }
- }
-
- return 0;
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb1.rsp b/examples/80x86/dos/watcom/l/bomb/bomb1.rsp
deleted file mode 100644
index 2066b48d..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb1.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\bomb1.exe File dbg\bsp.obj,dbg\bomb1.obj
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb2.cpp b/examples/80x86/dos/watcom/l/bomb/bomb2.cpp
deleted file mode 100644
index 05fedc0c..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb2.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-//****************************************************************************
-// Product: Time Bomb Example with "State Table"
-// Last Updated for Version: 4.5.03
-// Date of the Last Update: Nov 22, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h"
-#include "statetbl.h"
-
-enum BombSignals { // all signals for the Bomb FSM
- UP_SIG,
- DOWN_SIG,
- ARM_SIG,
- TICK_SIG,
-
- MAX_SIG // the number of signals
-};
-
-enum BombStates { // all states for the Bomb FSM
- SETTING_STATE,
- TIMING_STATE,
-
- MAX_STATE // the number of states
-};
-
-struct TickEvt : public Event {
- uint8_t fine_time; // the fine 1/10 s counter
-};
-
-class Bomb2 : public StateTable { // the Bomb FSM
-public:
- Bomb2(uint8_t defuse); // public ctor
-
- static void initial (Bomb2 *me, Event const *e); // initial transition
-
- static void setting_UP (Bomb2 *me, Event const *e); // transition func.
- static void setting_DOWN(Bomb2 *me, Event const *e); // transition func.
- static void setting_ARM (Bomb2 *me, Event const *e); // transition func.
- static void timing_UP (Bomb2 *me, Event const *e); // transition func.
- static void timing_DOWN (Bomb2 *me, Event const *e); // transition func.
- static void timing_ARM (Bomb2 *me, Event const *e); // transition func.
- static void timing_TICK (Bomb2 *me, Event const *e); // transition func.
-
-private:
- static Tran const state_table[MAX_STATE][MAX_SIG];
-
- uint8_t m_timeout; // number of seconds till explosion
- uint8_t m_defuse; // secret defuse code to disarm the bomb
- uint8_t m_code; // currently entered code to disarm the bomb
-};
-
- // the initial value of the timeout
-#define INIT_TIMEOUT 10
-
-//............................................................................
-Tran const Bomb2::state_table[MAX_STATE][MAX_SIG] = {
- { (Tran)&Bomb2::setting_UP, (Tran)&Bomb2::setting_DOWN,
- (Tran)&Bomb2::setting_ARM, &StateTable::empty },
- { (Tran)&Bomb2::timing_UP, (Tran)&Bomb2::timing_DOWN,
- (Tran)&Bomb2::timing_ARM, (Tran)&Bomb2::timing_TICK }
-};
-//............................................................................
-Bomb2::Bomb2(uint8_t defuse)
- : StateTable(&Bomb2::state_table[0][0], MAX_STATE, MAX_SIG,
- (Tran)&Bomb2::initial),
- m_defuse(defuse)
-{}
-//............................................................................
-void Bomb2::initial(Bomb2 *me, Event const *) {
- me->m_timeout = INIT_TIMEOUT;
- TRAN(SETTING_STATE);
-}
-//............................................................................
-void Bomb2::setting_UP(Bomb2 *me, Event const *) {
- if (me->m_timeout < 60) {
- ++me->m_timeout;
- BSP_display(me->m_timeout);
- }
-}
-//............................................................................
-void Bomb2::setting_DOWN(Bomb2 *me, Event const *) {
- if (me->m_timeout > 1) {
- --me->m_timeout;
- BSP_display(me->m_timeout);
- }
-}
-//............................................................................
-void Bomb2::setting_ARM(Bomb2 *me, Event const *) {
- me->m_code = 0;
- TRAN(TIMING_STATE); // transition to "timing"
-}
-//............................................................................
-void Bomb2::timing_UP(Bomb2 *me, Event const *) {
- me->m_code <<= 1;
- me->m_code |= 1;
-}
-//............................................................................
-void Bomb2::timing_DOWN(Bomb2 *me, Event const *) {
- me->m_code <<= 1;
-}
-//............................................................................
-void Bomb2::timing_ARM(Bomb2 *me, Event const *) {
- if (me->m_code == me->m_defuse) {
- TRAN(SETTING_STATE); // transition to "setting"
- }
-}
-//............................................................................
-void Bomb2::timing_TICK(Bomb2 *me, Event const *e) {
- if (((TickEvt const *)e)->fine_time == 0) {
- --me->m_timeout;
- BSP_display(me->m_timeout);
- if (me->m_timeout == 0) {
- BSP_boom(); // destroy the bomb
- }
- }
-}
-
-// Test harness --------------------------------------------------------------
-#include
-#include
-#include
-#include
-
-static Bomb2 l_bomb(0x0D); // time bomb FSM, the secret defuse code, 1101 bin
-
-//............................................................................
-int main() {
-
- cout << "Time Bomb (State-Table)" << endl
- << "Press 'u' for UP event" << endl
- << "Press 'd' for DOWN event" << endl
- << "Press 'a' for ARM event" << endl
- << "Press to quit." << endl;
-
- l_bomb.init(); // take the initial transition
-
- static TickEvt tick_evt;
- tick_evt.sig = TICK_SIG;
- tick_evt.fine_time = 0;
- for (;;) { // event loop
-
- delay(100); // 100 ms delay
-
- if (++tick_evt.fine_time == 10) {
- tick_evt.fine_time = 0;
- }
- cout.width(1);
- cout << "T(" << (int)tick_evt.fine_time << ')'
- << ((tick_evt.fine_time == 0) ? '\n' : ' ');
-
- l_bomb.dispatch(&tick_evt); // dispatch TICK event
-
- if (kbhit()) {
- static Event const up_evt = { UP_SIG };
- static Event const down_evt = { DOWN_SIG };
- static Event const arm_evt = { ARM_SIG };
- Event const *e = (Event *)0;
-
- switch (getch()) {
- case 'u': { // UP event
- cout << endl << "UP : ";
- e = &up_evt; // generate the UP event
- break;
- }
- case 'd': { // DOWN event
- cout << endl << "DOWN: ";
- e = &down_evt; // generate the DOWN event
- break;
- }
- case 'a': { // ARM event
- cout << endl << "ARM : ";
- e = &arm_evt; // generate the ARM event
- break;
- }
- case '\33': { // key
- cout << endl << "ESC : Bye! Bye!";
- exit(0);
- break;
- }
- }
- if (e != (Event *)0) { // keyboard event available?
- l_bomb.dispatch(e); // dispatch the event
- }
- }
- }
-
- return 0;
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb2.rsp b/examples/80x86/dos/watcom/l/bomb/bomb2.rsp
deleted file mode 100644
index 6ef65241..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb2.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\bomb2.exe File dbg\bsp.obj,dbg\statetbl.obj,dbg\bomb2.obj
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb3.cpp b/examples/80x86/dos/watcom/l/bomb/bomb3.cpp
deleted file mode 100644
index c1bf4540..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb3.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-//****************************************************************************
-// Product: Time Bomb Example with the State design pattern (GoF)
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h"
-
-class Bomb3;
-class BombState {
-public:
- virtual void onUP (Bomb3 *) const {}
- virtual void onDOWN(Bomb3 *) const {}
- virtual void onARM (Bomb3 *) const {}
- virtual void onTICK(Bomb3 *, uint8_t) const {}
-};
-
-class SettingState : public BombState {
-public:
- virtual void onUP (Bomb3 *context) const;
- virtual void onDOWN(Bomb3 *context) const;
- virtual void onARM (Bomb3 *context) const;
-};
-
-class TimingState : public BombState {
-public:
- virtual void onUP (Bomb3 *context) const;
- virtual void onDOWN(Bomb3 *context) const;
- virtual void onARM (Bomb3 *context) const;
- virtual void onTICK(Bomb3 *context, uint8_t fine_time) const;
-};
-
-class Bomb3 {
-public:
- Bomb3(uint8_t defuse) : m_defuse(defuse)
- {}
-
- void init(); // the init() FSM interface
-
- void onUP () { m_state->onUP (this); }
- void onDOWN() { m_state->onDOWN(this); }
- void onARM () { m_state->onARM (this); }
- void onTICK(uint8_t fine_time) { m_state->onTICK(this, fine_time); }
-
-private:
- void tran(BombState const *target) { m_state = target; }
-
-private:
- BombState const *m_state; // the state variable
- uint8_t m_timeout; // number of seconds till explosion
- uint8_t m_code; // currently entered code to disarm the bomb
- uint8_t m_defuse; // secret defuse code to disarm the bomb
-
-private:
- static SettingState const setting;
- static TimingState const timing;
-
- friend class SettingState;
- friend class TimingState;
-};
-
-//............................................................................
- // the initial value of the timeout
-#define INIT_TIMEOUT 10
-
-SettingState const Bomb3::setting;
-TimingState const Bomb3::timing;
-
-void Bomb3::init() {
- m_timeout = INIT_TIMEOUT;
- tran(&Bomb3::setting);
-}
-//............................................................................
-void SettingState::onUP(Bomb3 *context) const {
- if (context->m_timeout < 60) {
- ++context->m_timeout;
- BSP_display(context->m_timeout);
- }
-}
-void SettingState::onDOWN(Bomb3 *context) const {
- if (context->m_timeout > 1) {
- --context->m_timeout;
- BSP_display(context->m_timeout);
- }
-}
-void SettingState::onARM(Bomb3 *context) const {
- context->m_code = 0;
- context->tran(&Bomb3::timing); // transition to "timing"
-}
-
-//............................................................................
-void TimingState::onUP(Bomb3 *context) const {
- context->m_code <<= 1;
- context->m_code |= 1;
-}
-void TimingState::onDOWN(Bomb3 *context) const {
- context->m_code <<= 1;
-}
-void TimingState::onARM(Bomb3 *context) const {
- if (context->m_code == context->m_defuse) {
- context->tran(&Bomb3::setting); // transition to "setting"
- }
-}
-void TimingState::onTICK(Bomb3 *context, uint8_t fine_time) const {
- if (fine_time == 0) {
- --context->m_timeout;
- BSP_display(context->m_timeout);
- if (context->m_timeout == 0) {
- BSP_boom(); // destroy the bomb
- }
- }
-}
-
-// Test harness --------------------------------------------------------------
-#include
-#include
-#include
-#include
-
-static Bomb3 bomb(0x0D); // time bomb FSM, the secret defuse code, 1101 bin
-
-//............................................................................
-int main() {
-
- cout << "Time Bomb (GoF State-Pattern)" << endl
- << "Press 'u' for UP event" << endl
- << "Press 'd' for DOWN event" << endl
- << "Press 'a' for ARM event" << endl
- << "Press to quit." << endl;
-
- bomb.init(); // take the initial transition
-
- for (;;) { // event loop
- static int fine_time = 0;
-
- delay(100); // 100 ms delay
-
- if (++fine_time == 10) {
- fine_time = 0;
- }
- cout.width(1);
- cout << "T(" << fine_time << ')' << ((fine_time == 0) ? '\n' : ' ');
-
- bomb.onTICK(fine_time); // dispatch TICK event
-
- if (kbhit()) {
- switch (getch()) {
- case 'u': { // UP event
- cout << endl << "UP : ";
- bomb.onUP(); // dispatch UP event
- break;
- }
- case 'd': { // DOWN event
- cout << endl << "DOWN: ";
- bomb.onDOWN(); // dispatch DOWN event
- break;
- }
- case 'a': { // ARM event
- cout << endl << "ARM : ";
- bomb.onARM(); // dispatch ARM event
- break;
- }
- case '\33': { // key
- cout << endl << "ESC : Bye! Bye!";
- _exit(0);
- break;
- }
- }
- }
- }
-
- return 0;
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb3.rsp b/examples/80x86/dos/watcom/l/bomb/bomb3.rsp
deleted file mode 100644
index 4bf468ea..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb3.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\bomb3.exe File dbg\bsp.obj,dbg\statetbl.obj,dbg\bomb3.obj
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb4.cpp b/examples/80x86/dos/watcom/l/bomb/bomb4.cpp
deleted file mode 100644
index ce652faa..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb4.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-//****************************************************************************
-// Product: Time Bomb Example with QEP (FSM support)
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qep_port.h"
-#include "bsp.h"
-
-using namespace QP;
-
-enum Bomb4Signals {
- UP_SIG = Q_USER_SIG,
- DOWN_SIG,
- ARM_SIG,
- TICK_SIG
-};
-
-struct TickEvt : public QEvt {
- uint8_t fine_time; // the fine 1/10 s counter
-};
-
-class Bomb4 : public QFsm {
- uint8_t m_timeout; // number of seconds till explosion
- uint8_t m_code; // currently entered code to disarm the bomb
- uint8_t m_defuse; // secret defuse code to disarm the bomb
-
-public:
- Bomb4(uint8_t defuse)
- : QFsm((QStateHandler)&Bomb4::initial),
- m_defuse(defuse)
- {}
-
-protected:
- static QState initial(Bomb4 *me, QEvt const *e);
- static QState setting(Bomb4 *me, QEvt const *e);
- static QState timing (Bomb4 *me, QEvt const *e);
-};
-
-//----------------------------------------------------------------------------
- // the initial value of the timeout
-#define INIT_TIMEOUT 10
-
-//............................................................................
-QState Bomb4::initial(Bomb4 *me, QEvt const *) {
- me->m_timeout = INIT_TIMEOUT;
- return Q_TRAN(&Bomb4::setting);
-}
-//............................................................................
-QState Bomb4::setting(Bomb4 *me, QEvt const *e) {
- switch (e->sig) {
- case UP_SIG: {
- if (me->m_timeout < 60) {
- ++me->m_timeout;
- BSP_display(me->m_timeout);
- }
- return Q_HANDLED();
- }
- case DOWN_SIG: {
- if (me->m_timeout > 1) {
- --me->m_timeout;
- BSP_display(me->m_timeout);
- }
- return Q_HANDLED();
- }
- case ARM_SIG: {
- return Q_TRAN(&Bomb4::timing); // transition to "timing"
- }
- }
- return Q_IGNORED();
-}
-//............................................................................
-QState Bomb4::timing(Bomb4 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_code = 0; // clear the defuse code
- return Q_HANDLED();
- }
- case UP_SIG: {
- me->m_code <<= 1;
- me->m_code |= 1;
- return Q_HANDLED();
- }
- case DOWN_SIG: {
- me->m_code <<= 1;
- return Q_HANDLED();
- }
- case ARM_SIG: {
- if (me->m_code == me->m_defuse) {
- return Q_TRAN(&Bomb4::setting); // transition to "setting"
- }
- return Q_HANDLED();
- }
- case TICK_SIG: {
- if (((TickEvt const *)e)->fine_time == 0) {
- --me->m_timeout;
- BSP_display(me->m_timeout);
- if (me->m_timeout == 0) {
- BSP_boom(); // destroy the bomb
- }
- }
- return Q_HANDLED();
- }
- }
- return Q_IGNORED();
-}
-
-// Test harness --------------------------------------------------------------
-#include
-#include
-#include
-#include
-
-static Bomb4 bomb(0x0D); // time bomb FSM, the secret defuse code, 1101 bin
-
-//............................................................................
-int main() {
-
- cout << "Time Bomb (QEP QFsm class)" << endl
- << "Press 'u' for UP event" << endl
- << "Press 'd' for DOWN event" << endl
- << "Press 'a' for ARM event" << endl
- << "Press to quit." << endl;
-
- bomb.init(); // take the initial transition
-
- static TickEvt tick_evt;
- tick_evt.sig = TICK_SIG;
- tick_evt.fine_time = 0;
- for (;;) { // event loop
-
- delay(100); // 100 ms delay
-
- if (++tick_evt.fine_time == 10) {
- tick_evt.fine_time = 0;
- }
- cout.width(1);
- cout << "T(" << (int)tick_evt.fine_time << ')'
- << ((tick_evt.fine_time == 0) ? '\n' : ' ');
-
- bomb.dispatch(&tick_evt); // dispatch TICK event
-
- if (_kbhit()) {
- static QEvt const up_evt = { UP_SIG, 0 };
- static QEvt const down_evt = { DOWN_SIG, 0 };
- static QEvt const arm_evt = { ARM_SIG, 0 };
- QEvt const *e = (QEvt *)0;
-
- switch (_getch()) {
- case 'u': { // UP event
- cout << endl << "UP : ";
- e = &up_evt; // generate the UP event
- break;
- }
- case 'd': { // DOWN event
- cout << endl << "DOWN: ";
- e = &down_evt; // generate the DOWN event
- break;
- }
- case 'a': { // ARM event
- cout << endl << "ARM : ";
- e = &arm_evt; // generate the ARM event
- break;
- }
- case '\33': { // key
- cout << endl << "ESC : Bye! Bye!";
- _exit(0);
- break;
- }
- }
- if (e != (QEvt *)0) { // keyboard event available?
- bomb.dispatch(e); // dispatch the event
- }
- }
- }
-
- return 0;
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/bomb4.rsp b/examples/80x86/dos/watcom/l/bomb/bomb4.rsp
deleted file mode 100644
index d1cfe5c1..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bomb4.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\bomb4.exe File dbg\bsp.obj,dbg\bomb4.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/bomb/bsp.cpp b/examples/80x86/dos/watcom/l/bomb/bsp.cpp
deleted file mode 100644
index 0d04e0c0..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bsp.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//****************************************************************************
-// Product: Board Support Package (BSP) for the Time Bomb example
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h"
-
-#include
-#include
-
-//............................................................................
-void BSP_display(uint8_t timeout) {
- cout.width(3);
- cout << '[' << (int)timeout << "] " << flush;
-}
-//............................................................................
-void BSP_boom(void) {
- cout << "BOOM!!!" << flush << endl;
- _exit(0);
-}
-//............................................................................
-// this function is used by the QP embedded systems-friendly assertions
-extern "C" void Q_onAssert(char const * const file, int line) {
- cout << "Assertion failed in " << file << " , line " << line << endl;
- _exit(-1);
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/bsp.h b/examples/80x86/dos/watcom/l/bomb/bsp.h
deleted file mode 100644
index 7569dae5..00000000
--- a/examples/80x86/dos/watcom/l/bomb/bsp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//****************************************************************************
-// Product: Board Support Package (BSP) for the Time Bomb example
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 03, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#ifndef qep_port_h
- // Exact-width types. WG14/N843 C99 Standard, Section 7.18.1.1
-#include
-
-#endif
-
-void BSP_display(uint8_t timeout);
-void BSP_boom(void);
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/bomb/inc_qp.rsp b/examples/80x86/dos/watcom/l/bomb/inc_qp.rsp
deleted file mode 100644
index 52b40010..00000000
--- a/examples/80x86/dos/watcom/l/bomb/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=. -i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/bomb/make_b1.bat b/examples/80x86/dos/watcom/l/bomb/make_b1.bat
deleted file mode 100644
index 97e62e1d..00000000
--- a/examples/80x86/dos/watcom/l/bomb/make_b1.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Bomb1 example, 80x86, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bomb1.obj %SRCDIR%\bomb1.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% @bomb1.rsp
-@echo off
diff --git a/examples/80x86/dos/watcom/l/bomb/make_b2.bat b/examples/80x86/dos/watcom/l/bomb/make_b2.bat
deleted file mode 100644
index 1fd48cf9..00000000
--- a/examples/80x86/dos/watcom/l/bomb/make_b2.bat
+++ /dev/null
@@ -1,60 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Bomb2 example, 80x86, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\statetbl.obj %SRCDIR%\statetbl.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bomb2.obj %SRCDIR%\bomb2.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% @bomb2.rsp
-@echo off
diff --git a/examples/80x86/dos/watcom/l/bomb/make_b3.bat b/examples/80x86/dos/watcom/l/bomb/make_b3.bat
deleted file mode 100644
index 61b706fc..00000000
--- a/examples/80x86/dos/watcom/l/bomb/make_b3.bat
+++ /dev/null
@@ -1,60 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Bomb3 example, 80x86, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\statetbl.obj %SRCDIR%\statetbl.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bomb3.obj %SRCDIR%\bomb3.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% @bomb3.rsp
-@echo off
diff --git a/examples/80x86/dos/watcom/l/bomb/make_b4.bat b/examples/80x86/dos/watcom/l/bomb/make_b4.bat
deleted file mode 100644
index 551018a4..00000000
--- a/examples/80x86/dos/watcom/l/bomb/make_b4.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Bomb4 example, 80x86, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bomb4.obj %SRCDIR%\bomb4.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% @bomb4.rsp
-@echo off
diff --git a/examples/80x86/dos/watcom/l/bomb/statetbl.cpp b/examples/80x86/dos/watcom/l/bomb/statetbl.cpp
deleted file mode 100644
index 13c898e7..00000000
--- a/examples/80x86/dos/watcom/l/bomb/statetbl.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//****************************************************************************
-// Product: Generic State-Table event processor
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h" // for the C99-standard exact-width integer types
-#include "statetbl.h"
-
- // see also embedded-systems-friendly assertions in Chapter 6
-#include
-
-//............................................................................
-void StateTable::init(void) {
- (*m_initial)(this, (Event *)0); // top-most initial transition
-
- assert(m_state < m_nStates); // the initial tran. must change state
-}
-//............................................................................
-void StateTable::dispatch(Event const *e) {
- assert(e->sig < m_nSignals); // require the signal in range
-
- Tran t = m_state_table[m_state*m_nSignals + e->sig];
- (*t)(this, e); // execute the transition function
-
- assert(m_state < m_nStates); // ensure that state stays in range
-}
-//............................................................................
-void StateTable::empty(StateTable *, Event const *) {
-}
diff --git a/examples/80x86/dos/watcom/l/bomb/statetbl.h b/examples/80x86/dos/watcom/l/bomb/statetbl.h
deleted file mode 100644
index 81963c50..00000000
--- a/examples/80x86/dos/watcom/l/bomb/statetbl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-//****************************************************************************
-// Product: Generic State-Table event processor
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef statetbl_h
-#define statetbl_h
-
-struct Event {
- uint16_t sig; // signal of the event
- // add event parameters by subclassing the Event structure...
-};
-
-class StateTable; // forward declaration
-typedef void (*Tran)(StateTable *me, Event const *e); // pointer-to-function
-
-class StateTable {
-public:
- void init(void);
- void dispatch(Event const *e);
- static void empty(StateTable *me, Event const *e);
-
-protected:
- // protected ctor prevents direct instantiation (abstract class)
- StateTable(Tran const *table, uint8_t n_states, uint8_t n_signals,
- Tran initial)
- : m_state(n_states),
- m_state_table(table), m_nStates(n_states), m_nSignals(n_signals),
- m_initial(initial) {}
-
- void tran(uint8_t target) { m_state = target; }
-
-private:
- uint8_t m_state; // the current active state
- Tran const *m_state_table; // the State-Table
- uint8_t m_nStates; // number of states
- uint8_t m_nSignals; // number of signals
- Tran m_initial; // the initial transition
-};
-
-#define TRAN(target_) (me->tran(target_))
-
-#endif // statetbl_h
diff --git a/examples/80x86/dos/watcom/l/calc/bsp.cpp b/examples/80x86/dos/watcom/l/calc/bsp.cpp
deleted file mode 100644
index 9b729a2d..00000000
--- a/examples/80x86/dos/watcom/l/calc/bsp.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-//****************************************************************************
-// Product: Board Support Package (BSP) for the Calculator example
-// Last Updated for Version: 4.1.05
-// Date of the Last Update: Aug 27, 2010
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2010 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "bsp.h"
-
-#include
-#include
-#include
-#include
-
-#define DISP_WIDTH 9
-
-static char l_display[DISP_WIDTH + 1]; // the calculator display
-static int l_len; // number of displayed characters
-
-//............................................................................
-void BSP_clear(void) {
- memset(l_display, ' ', DISP_WIDTH - 1);
- l_display[DISP_WIDTH - 1] = '0';
- l_display[DISP_WIDTH] = '\0';
- l_len = 0;
-}
-//............................................................................
-void BSP_insert(int keyId) {
- if (l_len == 0) {
- l_display[DISP_WIDTH - 1] = (char)keyId;
- ++l_len;
- }
- else if (l_len < (DISP_WIDTH - 1)) {
- memmove(&l_display[0], &l_display[1], DISP_WIDTH - 1);
- l_display[DISP_WIDTH - 1] = (char)keyId;
- ++l_len;
- }
-}
-//............................................................................
-void BSP_negate(void) {
- BSP_clear();
- l_display[DISP_WIDTH - 2] = '-';
-}
-//............................................................................
-void BSP_display(void) {
- cout << endl << '[' << l_display << "] ";
-}
-//............................................................................
-void BSP_exit(void) {
- cout << endl << "Bye! Bye" << endl;
- _exit(0);
-}
-//............................................................................
-double BSP_get_value(void) {
- return strtod(l_display, (char **)0);
-}
-//............................................................................
-int BSP_eval(double operand1, int oper, double operand2) {
- int ok = 1;
- double result;
- switch (oper) {
- case KEY_PLUS: {
- result = operand1 + operand2;
- break;
- }
- case KEY_MINUS: {
- result = operand1 - operand2;
- break;
- }
- case KEY_MULT: {
- result = operand1 * operand2;
- break;
- }
- case KEY_DIVIDE: {
- if ((operand2 < -1e-30) || (1e-30 < operand2)) {
- result = operand1 / operand2;
- }
- else {
- strcpy(l_display, " Error 0 "); // error: divide by zero
- ok = 0;
- }
- break;
- }
- }
- if (ok) {
- if ((-0.000001 < result) && (result < 0.000001)) {
- result = 0.0;
- }
- if ((-99999999.0 < result) && (result < 99999999.0)) {
- sprintf(l_display, "%9.6g", result);
- }
- else {
- strcpy(l_display, " Error 1 "); // error: out of range
- ok = 0;
- }
- }
- return ok;
-}
-//............................................................................
-void BSP_message(char const *msg) {
- cout << msg;
-}
-//............................................................................
-// this function is used by the QP embedded systems-friendly assertions
-extern "C" void Q_onAssert(char const * const file, int line) {
- cout << "Assertion failed in " << file << " , line " << line
- << flush << endl;
- _exit(-1);
-}
diff --git a/examples/80x86/dos/watcom/l/calc/calc.cpp b/examples/80x86/dos/watcom/l/calc/calc.cpp
deleted file mode 100644
index ad547669..00000000
--- a/examples/80x86/dos/watcom/l/calc/calc.cpp
+++ /dev/null
@@ -1,521 +0,0 @@
-//****************************************************************************
-// Product: Calculator Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "bsp.h" // board support package
-#include "calc.h"
-
-class Calc : public QHsm {
-private:
- double m_operand1; // the value of operand 1
- uint8_t m_operator; // operator key entered
-
-public:
- Calc() : QHsm((QStateHandler)&Calc::initial) { // ctor
- }
-
-private:
- static QState initial (Calc *me, QEvt const *e); // initial pseudostate
- static QState on (Calc *me, QEvt const *e); // state handler
- static QState error (Calc *me, QEvt const *e); // state handler
- static QState ready (Calc *me, QEvt const *e); // state handler
- static QState result (Calc *me, QEvt const *e); // state handler
- static QState begin (Calc *me, QEvt const *e); // state handler
- static QState negated1 (Calc *me, QEvt const *e); // state handler
- static QState operand1 (Calc *me, QEvt const *e); // state handler
- static QState zero1 (Calc *me, QEvt const *e); // state handler
- static QState int1 (Calc *me, QEvt const *e); // state handler
- static QState frac1 (Calc *me, QEvt const *e); // state handler
- static QState opEntered(Calc *me, QEvt const *e); // state handler
- static QState negated2 (Calc *me, QEvt const *e); // state handler
- static QState operand2 (Calc *me, QEvt const *e); // state handler
- static QState zero2 (Calc *me, QEvt const *e); // state handler
- static QState int2 (Calc *me, QEvt const *e); // state handler
- static QState frac2 (Calc *me, QEvt const *e); // state handler
- static QState final (Calc *me, QEvt const *e); // state handler
-};
-
-// Local objects -------------------------------------------------------------
-static Calc l_calc; // the calculator instance
-
-// Global objects ------------------------------------------------------------
-QHsm * const the_calc = &l_calc;
-
-// HSM definition ------------------------------------------------------------
-QState Calc::initial(Calc *me, QEvt const * /* e */) {
- BSP_clear();
- return Q_TRAN(&Calc::on);
-}
-//............................................................................
-QState Calc::on(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("on-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("on-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_message("on-INIT;");
- return Q_TRAN(&Calc::ready);
- }
- case C_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::on); // transition-to-self
- }
- case OFF_SIG: {
- return Q_TRAN(&Calc::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Calc::error(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("error-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("error-EXIT;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::ready(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("ready-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("ready-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_message("ready-INIT;");
- return Q_TRAN(&Calc::begin);
- }
- case DIGIT_0_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::zero1);
- }
- case DIGIT_1_9_SIG: {
- BSP_clear();
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int1);
- }
- case POINT_SIG: {
- BSP_clear();
- BSP_insert((int)'0');
- BSP_insert((int)'.');
- return Q_TRAN(&Calc::frac1);
- }
- case OPER_SIG: {
- me->m_operand1 = BSP_get_value();
- me->m_operator = ((CalcEvt const *)e)->key_code;
- return Q_TRAN(&Calc::opEntered);
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::result(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("result-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("result-EXIT;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Calc::ready);
-}
-//............................................................................
-QState Calc::begin(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("begin-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("begin-EXIT;");
- return Q_HANDLED();
- }
- case OPER_SIG: {
- if (((CalcEvt const *)e)->key_code == KEY_MINUS) {
- return Q_TRAN(&Calc::negated1);
- }
- break;
- }
- }
- return Q_SUPER(&Calc::ready);
-}
-//............................................................................
-QState Calc::negated1(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("negated1-ENTRY;");
- BSP_negate();
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("negated1-EXIT;");
- return Q_HANDLED();
- }
- case OPER_SIG: {
- if (((CalcEvt const *)e)->key_code == KEY_MINUS) {
- ; // explicitly ignore
- return Q_HANDLED(); // event handled
- }
- break;
- }
- case CE_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::begin);
- }
- case DIGIT_0_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::zero1);
- }
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int1);
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac1);
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::negated2(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("negated2-ENTRY;");
- BSP_negate();
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("negated2-EXIT;");
- return Q_HANDLED();
- }
- case OPER_SIG: {
- if (((CalcEvt const *)e)->key_code == KEY_MINUS) {
- ; // explicitly ignore
- return Q_HANDLED(); // event handled
- }
- break;
- }
- case CE_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::opEntered);
- }
- case DIGIT_0_SIG: {
- return Q_TRAN(&Calc::zero2);
- }
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int2);
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac2);
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::operand1(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("operand1-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("operand1-EXIT;");
- return Q_HANDLED();
- }
- case CE_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::begin);
- }
- case OPER_SIG: {
- me->m_operand1 = BSP_get_value();
- me->m_operator = ((CalcEvt const *)e)->key_code;
- return Q_TRAN(&Calc::opEntered);
- }
- case EQUALS_SIG: {
- return Q_TRAN(&Calc::result);
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::zero1(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("zero1-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("zero1-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int1);
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac1);
- }
- }
- return Q_SUPER(&Calc::operand1);
-}
-//............................................................................
-QState Calc::int1(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("int1-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("int1-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac1);
- }
- }
- return Q_SUPER(&Calc::operand1);
-}
-//............................................................................
-QState Calc::frac1(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("frac1-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("frac1-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Calc::operand1);
-}
-//............................................................................
-QState Calc::opEntered(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("opEntered-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("opEntered-EXIT;");
- return Q_HANDLED();
- }
- case OPER_SIG: {
- if (((CalcEvt const *)e)->key_code == KEY_MINUS) {
- BSP_clear();
- return Q_TRAN(&Calc::negated2);
- }
- break;
- }
- case DIGIT_0_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::zero2);
- }
- case DIGIT_1_9_SIG: {
- BSP_clear();
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int2);
- }
- case POINT_SIG: {
- BSP_clear();
- BSP_insert((int)'0');
- BSP_insert((int)'.');
- return Q_TRAN(&Calc::frac2);
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::operand2(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("operand2-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("operand2-EXIT;");
- return Q_HANDLED();
- }
- case CE_SIG: {
- BSP_clear();
- return Q_TRAN(&Calc::opEntered);
- }
- case OPER_SIG: {
- if (BSP_eval(me->m_operand1, me->m_operator, BSP_get_value())) {
- me->m_operand1 = BSP_get_value();
- me->m_operator = ((CalcEvt const *)e)->key_code;
- return Q_TRAN(&Calc::opEntered);
- }
- else {
- return Q_TRAN(&Calc::error);
- }
- return Q_HANDLED();
- }
- case EQUALS_SIG: {
- if (BSP_eval(me->m_operand1, me->m_operator, BSP_get_value())) {
- return Q_TRAN(&Calc::result);
- }
- else {
- return Q_TRAN(&Calc::error);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Calc::on);
-}
-//............................................................................
-QState Calc::zero2(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("zero2-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("zero2-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::int2);
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac2);
- }
- }
- return Q_SUPER(&Calc::operand2);
-}
-//............................................................................
-QState Calc::int2(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("int2-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("int2-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_TRAN(&Calc::frac2);
- }
- }
- return Q_SUPER(&Calc::operand2);
-}
-//............................................................................
-QState Calc::frac2(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("frac2-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_message("frac2-EXIT;");
- return Q_HANDLED();
- }
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- BSP_insert(((CalcEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Calc::operand2);
-}
-//............................................................................
-QState Calc::final(Calc *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_message("final-ENTRY;");
- BSP_exit();
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-
diff --git a/examples/80x86/dos/watcom/l/calc/calc.h b/examples/80x86/dos/watcom/l/calc/calc.h
deleted file mode 100644
index 59b6e344..00000000
--- a/examples/80x86/dos/watcom/l/calc/calc.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//****************************************************************************
-// Product: Calculator Example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef calc_h
-#define calc_h
-
-using namespace QP;
-
-enum CalcSignals {
- C_SIG = Q_USER_SIG,
- CE_SIG,
- DIGIT_0_SIG,
- DIGIT_1_9_SIG,
- POINT_SIG,
- OPER_SIG,
- EQUALS_SIG,
- OFF_SIG
-};
-
-struct CalcEvt : public QEvt {
- uint8_t key_code; // code of the key
-};
-
-extern QHsm * const the_calc; // "opaque" pointer to calculator HSM
-
-#endif
diff --git a/examples/80x86/dos/watcom/l/calc/inc_qp.rsp b/examples/80x86/dos/watcom/l/calc/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/calc/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/calc/link_dbg.rsp b/examples/80x86/dos/watcom/l/calc/link_dbg.rsp
deleted file mode 100644
index 8aee16aa..00000000
--- a/examples/80x86/dos/watcom/l/calc/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\calc.exe File dbg\bsp.obj,dbg\main.obj,dbg\calc.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/calc/main.cpp b/examples/80x86/dos/watcom/l/calc/main.cpp
deleted file mode 100644
index 532d8d30..00000000
--- a/examples/80x86/dos/watcom/l/calc/main.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-//****************************************************************************
-// Product: Calculator Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "bsp.h" // board support package
-#include "calc.h"
-
-#include
-#include
-#include
-#include
-#include
-
-//............................................................................
-int main() {
-
- cout << "Calculator example, QEP version: "
- << QEP::getVersion() << endl
- << "Press '0' .. '9' to enter a digit\n"
- "Press '.' to enter the decimal point\n"
- "Press '+' or '#' to add\n"
- "Press '-' to subtract or negate a number\n"
- "Press '*' to multiply\n"
- "Press '/' to divide\n"
- "Press '=' or to get the result\n"
- "Press 'c' or 'C' to Cancel\n"
- "Press 'e' or 'E' to Cancel Entry\n"
- "Press to quit.\n\n";
-
- the_calc->init(); // trigger initial transition
-
- for (;;) { // event loop
- CalcEvt e; // Calculator event
-
- BSP_display(); // show the display
-
- cout << ": ";
- fflush(stdout); // cout.flush() doesn't work in Watcom!
- e.key_code = (uint8_t)_getche(); // get a char with echo
-
- switch (e.key_code) {
- case 'c': // intentionally fall through
- case 'C': {
- ((QEvt *)&e)->sig = C_SIG;
- break;
- }
- case 'e': // intentionally fall through
- case 'E': {
- ((QEvt *)&e)->sig = CE_SIG;
- break;
- }
- case '0': {
- ((QEvt *)&e)->sig = DIGIT_0_SIG;
- break;
- }
- case '1': // intentionally fall through
- case '2': // intentionally fall through
- case '3': // intentionally fall through
- case '4': // intentionally fall through
- case '5': // intentionally fall through
- case '6': // intentionally fall through
- case '7': // intentionally fall through
- case '8': // intentionally fall through
- case '9': {
- ((QEvt *)&e)->sig = DIGIT_1_9_SIG;
- break;
- }
- case '.': {
- ((QEvt *)&e)->sig = POINT_SIG;
- break;
- }
- case '+': // intentionally fall through
- case '-': // intentionally fall through
- case '*': // intentionally fall through
- case '/': {
- ((QEvt *)&e)->sig = OPER_SIG;
- break;
- }
- case '#': { // alternative '+'
- ((QEvt *)&e)->sig = OPER_SIG;
- e.key_code = '+';
- break;
- }
- case '=': // intentionally fall through
- case '\r': { // Enter key
- ((QEvt *)&e)->sig = EQUALS_SIG;
- break;
- }
- case '\33': { // ESC key
- ((QEvt *)&e)->sig = OFF_SIG;
- break;
- }
- default: {
- ((QEvt *)&e)->sig = 0; // invalid event
- break;
- }
- }
-
- if (((QEvt *)&e)->sig != 0) { // valid event generated?
- the_calc->dispatch(&e); // dispatch event
- }
- }
-
- return 0;
-}
diff --git a/examples/80x86/dos/watcom/l/calc/make.bat b/examples/80x86/dos/watcom/l/calc/make.bat
deleted file mode 100644
index 368ba489..00000000
--- a/examples/80x86/dos/watcom/l/calc/make.bat
+++ /dev/null
@@ -1,63 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Calc example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-echo default selected
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\calc.obj %SRCDIR%\calc.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/comp/alarm.cpp b/examples/80x86/dos/watcom/l/comp/alarm.cpp
deleted file mode 100644
index 348cdd68..00000000
--- a/examples/80x86/dos/watcom/l/comp/alarm.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//****************************************************************************
-// Product: Orthogonal Component state pattern example
-// Last Updated for Version: 5.1.0
-// Date of the Last Update: Sep 30, 2013
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "alarm.h"
-#include "clock.h"
-
-#include
-
-Q_DEFINE_THIS_FILE
-
-// FSM definition ------------------------------------------------------------
-QState Alarm::initial(Alarm *me, QEvt const *e) {
- (void)e; // avoid compiler warning about unused parameter
- me->m_alarm_time = 12*60;
- return Q_TRAN(&Alarm::off);
-}
-//............................................................................
-QState Alarm::off(Alarm *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // while in the off state, the alarm is kept in decimal format
- me->m_alarm_time = (me->m_alarm_time/60)*100+me->m_alarm_time%60;
- printf("*** Alarm OFF %02ld:%02ld\n",
- me->m_alarm_time/100, me->m_alarm_time%100);
- fflush(stdout);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- // upon exit, the alarm is converted to binary format
- me->m_alarm_time = (me->m_alarm_time/100)*60+me->m_alarm_time%100;
- return Q_HANDLED();
- }
- case ALARM_ON_SIG: {
- // alarm in range?
- if ((me->m_alarm_time / 100 < 24)
- && (me->m_alarm_time % 100 < 60))
- {
- return Q_TRAN(&Alarm::on);
- }
- else { // alarm out of range -- clear and don't transition
- me->m_alarm_time = 0;
- printf("*** Alarm reset %02ld:%02ld\n",
- me->m_alarm_time/100, me->m_alarm_time%100);
- return Q_HANDLED();
- }
- }
- case ALARM_SET_SIG: {
- // while setting, the alarm is kept in decimal format
- me->m_alarm_time = (10 * me->m_alarm_time
- + ((SetEvt const *)e)->digit) % 10000;
- printf("*** Alarm SET %02ld:%02ld\n",
- me->m_alarm_time/100, me->m_alarm_time%100);
- fflush(stdout);
- return Q_HANDLED();
- }
- }
- return Q_IGNORED();
-}
-//............................................................................
-QState Alarm::on(Alarm *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("*** Alarm ON %02ld:%02ld\n",
- me->m_alarm_time/60, me->m_alarm_time%60);
- fflush(stdout);
- return Q_HANDLED();
- }
- case ALARM_SET_SIG: {
- printf("*** Cannot set Alarm when it is ON\n");
- fflush(stdout);
- return Q_HANDLED();
- }
- case ALARM_OFF_SIG: {
- return Q_TRAN(&Alarm::off);
- }
- case TIME_SIG: {
- if (((TimeEvt *)e)->current_time == me->m_alarm_time) {
- printf("ALARM!!!\n");
- // asynchronously post the event to the container AO
- APP_alarmClock->POST(Q_NEW(QEvt, ALARM_SIG), me);
- }
- return Q_HANDLED();
- }
- }
- return Q_IGNORED();
-}
diff --git a/examples/80x86/dos/watcom/l/comp/bsp.cpp b/examples/80x86/dos/watcom/l/comp/bsp.cpp
deleted file mode 100644
index 92e24638..00000000
--- a/examples/80x86/dos/watcom/l/comp/bsp.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Eatcom
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-#include
-
-using namespace QP;
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)();
-static void interrupt (*l_dosKbdISR)();
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-static void interrupt ISR_tmr() {
- QF_ISR_ENTRY();
-
- QF::tick(); //<-- process the QF clock tick
-
- QF_ISR_EXIT();
-}
-//............................................................................
-static void interrupt ISR_kbd() {
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- BSP_onKeyboardInput(key); // process the key (application specific)
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void BSP_init(int, char *[]) {
-}
-//............................................................................
-void QF::onStartup(void) {
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) { // restore the original DOS vectors ...
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-}
-//............................................................................
-extern "C" void Q_onAssert(char const Q_ROM *const Q_ROM_VAR file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- QF::stop();
-}
diff --git a/examples/80x86/dos/watcom/l/comp/bsp.h b/examples/80x86/dos/watcom/l/comp/bsp.h
deleted file mode 100644
index e5155354..00000000
--- a/examples/80x86/dos/watcom/l/comp/bsp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Watcom
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-void BSP_init(int argc, char *argv[]);
-void BSP_onKeyboardInput(uint8_t ch); // process the keyboard character
-
-#define BSP_TICKS_PER_SEC 18
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/comp/comp.cpp b/examples/80x86/dos/watcom/l/comp/comp.cpp
deleted file mode 100644
index 076f01ac..00000000
--- a/examples/80x86/dos/watcom/l/comp/comp.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-//****************************************************************************
-// Product: Orthogonal Component state pattern example
-// Last Updated for Version: 5.1.0
-// Date of the Last Update: Sep 30, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "alarm.h"
-#include "clock.h"
-
-#include
-
-Q_DEFINE_THIS_FILE
-
-//............................................................................
-class AlarmClock : public QActive { // the AlarmClock container active object
-private:
- Alarm m_alarmComp; // Alarm orthogonal component
- QTimeEvt m_timeEvt; // private time event generator
- uint32_t m_current_time; // the current time in seconds
-
-public:
- AlarmClock() // default ctor
- : QActive((QStateHandler)&AlarmClock::initial),
- m_timeEvt(TIME_SIG) {}
-
-private:
- // hierarchical state machine ...
- static QState initial (AlarmClock *me, QEvt const *e);
- static QState timekeeping(AlarmClock *me, QEvt const *e);
- static QState mode12hr (AlarmClock *me, QEvt const *e);
- static QState mode24hr (AlarmClock *me, QEvt const *e);
- static QState final (AlarmClock *me, QEvt const *e);
-};
-
-// HSM definition ------------------------------------------------------------
-QState AlarmClock::initial(AlarmClock *me, QEvt const *) {
- me->m_current_time = 0;
-
- // take the initial transition in the alarm component...
- me->m_alarmComp.init();
-
- return Q_TRAN(&AlarmClock::timekeeping);
-}
-//............................................................................
-QState AlarmClock::final(AlarmClock *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> final\n");
- printf("\nBye!Bye!\n");
- QF::stop(); // stop QF and cleanup
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState AlarmClock::timekeeping(AlarmClock *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // periodic timeout every second
- me->m_timeEvt.postEvery(me, BSP_TICKS_PER_SEC);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_timeEvt.disarm();
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- return Q_TRAN(&AlarmClock::mode24hr);
- }
- case CLOCK_12H_SIG: {
- return Q_TRAN(&AlarmClock::mode12hr);
- }
- case CLOCK_24H_SIG: {
- return Q_TRAN(&AlarmClock::mode24hr);
- }
- case ALARM_SIG: {
- printf("Wake up!!!\n");
- return Q_HANDLED();
- }
- case ALARM_SET_SIG:
- case ALARM_ON_SIG:
- case ALARM_OFF_SIG: {
- me->m_alarmComp.dispatch(e); // synchronously dispatch to comp.
- return Q_HANDLED();
- }
- case TERMINATE_SIG: {
- return Q_TRAN(&AlarmClock::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState AlarmClock::mode24hr(AlarmClock *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("*** 24-hour mode\n");
- return Q_HANDLED();
- }
- case TIME_SIG: {
- if (++me->m_current_time == 24*60) { // roll over in 24-hr mode?
- me->m_current_time = 0;
- }
- printf("%02ld:%02ld\n",
- me->m_current_time / 60, me->m_current_time % 60);
- TimeEvt pe; // temporary synchronous event for the component
- pe.sig = TIME_SIG;
- pe.current_time = me->m_current_time;
- me->m_alarmComp.dispatch(&pe); // synchronously dispatch to comp.
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&AlarmClock::timekeeping);
-}
-//............................................................................
-QState AlarmClock::mode12hr(AlarmClock *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("*** 12-hour mode\n");
- return Q_HANDLED();
- }
- case TIME_SIG: {
- if (++me->m_current_time == 12*60) { // roll over in 12-hr mode?
- me->m_current_time = 0;
- }
- uint32_t h = me->m_current_time/60;
- printf("%02ld:%02ld %s\n", (h % 12) ? (h % 12) : 12,
- me->m_current_time % 60, (h / 12) ? "PM" : "AM");
- TimeEvt pe; // temporary synchronous event for the component
- pe.sig = TIME_SIG;
- pe.current_time = me->m_current_time;
- me->m_alarmComp.dispatch(&pe); // synchronously dispatch to comp.
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&AlarmClock::timekeeping);
-}
-
-// test harness ==============================================================
-
-// Local-scope objects -------------------------------------------------------
-static AlarmClock l_alarmClock; // the AlarmClock active object
-static QEvt const *l_alarmClockQSto[10]; // queue storage for AlarmClock
-static TimeEvt l_smlPoolSto[10]; // small event pool
-
-// Global-scope objects (opaque pointer to the AlarmClock container) ---------
-QActive * const APP_alarmClock= &l_alarmClock; // AlarmClock active object
-
-//............................................................................
-int main(int argc, char *argv[]) {
- printf("Reminder state pattern\nQEP version: %s\nQF version: %s\n"
- "Press 'o' to turn the Alarm ON\n"
- "Press 'f' to turn the Alarm OFF\n"
- "Press '0'..'9' to set the Alarm time\n"
- "Press 'A' to set the Clock in 12-hour mode\n"
- "Press 'B' to set the Clock in 24-hour mode\n"
- "Press ESC to quit...\n",
- QEP::getVersion(), QF::getVersion());
-
- BSP_init(argc, argv); // initialize the BSP
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // publish-subscribe not used, no call to QF::psInit()
-
- // initialize event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
-
- // start the active objects...
- l_alarmClock.start(1, l_alarmClockQSto, Q_DIM(l_alarmClockQSto),
- (void *)0, 0, (QEvt *)0);
-
- return QF::run(); // run the QF application
-}
-//............................................................................
-void BSP_onKeyboardInput(uint8_t key) {
- switch (key) {
- case 24: { // 'o': Alarm on event?
- l_alarmClock.postFIFO(Q_NEW(QEvt, ALARM_ON_SIG));
- break;
- }
- case 33: { // 'f': Alarm off event?
- l_alarmClock.postFIFO(Q_NEW(QEvt, ALARM_OFF_SIG));
- break;
- }
- case 2: // '1'
- case 3: // '2'
- case 4: // '3'
- case 5: // '4'
- case 6: // '5'
- case 7: // '6'
- case 8: // '7'
- case 9: // '8'
- case 10: { // '9'
- SetEvt *e = Q_NEW(SetEvt, ALARM_SET_SIG);
- e->digit = (uint8_t)(key - 1);
- l_alarmClock.postFIFO(e);
- break;
- }
- case 11: { // '0'
- SetEvt *e = Q_NEW(SetEvt, ALARM_SET_SIG);
- e->digit = 0;
- l_alarmClock.postFIFO(e);
- break;
- }
- case 30: { // 'a': Clock 12H event?
- l_alarmClock.postFIFO(Q_NEW(QEvt, CLOCK_12H_SIG));
- break;
- }
- case 48: { // 'b': Clock 24H event?
- l_alarmClock.postFIFO(Q_NEW(QEvt, CLOCK_24H_SIG));
- break;
- }
- case 129: { // ESC pressed?
- l_alarmClock.postFIFO(Q_NEW(QEvt, TERMINATE_SIG));
- break;
- }
- }
-}
diff --git a/examples/80x86/dos/watcom/l/comp/inc_qp.rsp b/examples/80x86/dos/watcom/l/comp/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/comp/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/comp/link_dbg.rsp b/examples/80x86/dos/watcom/l/comp/link_dbg.rsp
deleted file mode 100644
index a058efc4..00000000
--- a/examples/80x86/dos/watcom/l/comp/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\comp.exe File dbg\bsp.obj,dbg\alarm.obj,dbg\comp.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/comp/make.bat b/examples/80x86/dos/watcom/l/comp/make.bat
deleted file mode 100644
index 4358c1c2..00000000
--- a/examples/80x86/dos/watcom/l/comp/make.bat
+++ /dev/null
@@ -1,61 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Orthogonal Component example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\alarm.obj %SRCDIR%\alarm.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\comp.obj %SRCDIR%\comp.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/defer/bsp.cpp b/examples/80x86/dos/watcom/l/defer/bsp.cpp
deleted file mode 100644
index 79e2b2f2..00000000
--- a/examples/80x86/dos/watcom/l/defer/bsp.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Eatcom
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-#include
-
-using namespace QP;
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)();
-static void interrupt (*l_dosKbdISR)();
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-static void interrupt ISR_tmr() {
- QF_ISR_ENTRY();
-
- QF::tick(); //<-- process the QF clock tick
-
- QF_ISR_EXIT();
-}
-//............................................................................
-static void interrupt ISR_kbd() {
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- BSP_onKeyboardInput(key); // process the key (application specific)
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void BSP_init(int, char *[]) {
-}
-//............................................................................
-void QF::onStartup(void) {
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) {
- // restore the original DOS vectors ...
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-}
-//............................................................................
-extern "C" void Q_onAssert(char const Q_ROM *const Q_ROM_VAR file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- QF::stop();
-}
-
diff --git a/examples/80x86/dos/watcom/l/defer/bsp.h b/examples/80x86/dos/watcom/l/defer/bsp.h
deleted file mode 100644
index e5155354..00000000
--- a/examples/80x86/dos/watcom/l/defer/bsp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Watcom
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-void BSP_init(int argc, char *argv[]);
-void BSP_onKeyboardInput(uint8_t ch); // process the keyboard character
-
-#define BSP_TICKS_PER_SEC 18
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/defer/defer.cpp b/examples/80x86/dos/watcom/l/defer/defer.cpp
deleted file mode 100644
index 11c68ca3..00000000
--- a/examples/80x86/dos/watcom/l/defer/defer.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-//****************************************************************************
-// Product: Deferred Event state pattern example
-// Last Updated for Version: 5.1.1
-// Date of the Last Update: Oct 08, 2013
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-
-#include // this example uses printf() to report status
-
-Q_DEFINE_THIS_FILE
-
-using namespace QP;
-
-//............................................................................
-enum TServerSignals {
- NEW_REQUEST_SIG = Q_USER_SIG, // the new request signal
- RECEIVED_SIG, // the request has been received
- AUTHORIZED_SIG, // the request has been authorized
- TERMINATE_SIG // terminate the application
-};
-//............................................................................
-struct RequestEvt : public QEvt {
- uint8_t ref_num; // reference number of the request
-};
-
-class TServer : public QActive { // Transaction Server active object
-private:
- QEQueue m_requestQueue; // native QF queue for deferred request events
- QEvt const *m_requestQSto[3]; // storage for the deferred queue buffer
-
- QTimeEvt m_receivedEvt; // private time event generator
- QTimeEvt m_authorizedEvt; // private time event generator
-
-public:
- TServer() // the default ctor
- : QActive((QStateHandler)&TServer::initial),
- m_receivedEvt(RECEIVED_SIG),
- m_authorizedEvt(AUTHORIZED_SIG)
- {
- m_requestQueue.init(m_requestQSto, Q_DIM(m_requestQSto));
- }
-
-private:
- // hierarchical state machine ...
- static QState initial (TServer *me, QEvt const *e);
- static QState idle (TServer *me, QEvt const *e);
- static QState busy (TServer *me, QEvt const *e);
- static QState receiving (TServer *me, QEvt const *e);
- static QState authorizing(TServer *me, QEvt const *e);
- static QState final (TServer *me, QEvt const *e);
-};
-
-// HSM definition ------------------------------------------------------------
-QState TServer::initial(TServer *me, QEvt const *) {
- return Q_TRAN(&TServer::idle);
-}
-//............................................................................
-QState TServer::final(TServer *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("final-ENTRY;\nBye!Bye!\n");
- QF::stop(); // terminate the application
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState TServer::idle(TServer *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("idle-ENTRY;\n");
- // recall the request from the requestQueue
- if (me->recall(&me->m_requestQueue)) {
- printf("Request recalled\n");
- }
- else {
- printf("No deferred requests\n");
- }
- return Q_HANDLED();
- }
- case NEW_REQUEST_SIG: {
- printf("Processing request #%d\n",
- (int)((RequestEvt const *)e)->ref_num);
- return Q_TRAN(&TServer::receiving);
- }
- case TERMINATE_SIG: {
- return Q_TRAN(&TServer::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState TServer::busy(TServer *me, QEvt const *e) {
- switch (e->sig) {
- case NEW_REQUEST_SIG: {
- if (me->defer(&me->m_requestQueue, e)) { // could defer?
- printf("Request #%d deferred;\n",
- (int)((RequestEvt const *)e)->ref_num);
- }
- else {
- printf("Request #%d IGNORED;\n",
- (int)((RequestEvt const *)e)->ref_num);
- // notify the request sender that his request was denied...
- }
- return Q_HANDLED();
- }
- case TERMINATE_SIG: {
- return Q_TRAN(&TServer::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState TServer::receiving(TServer *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("receiving-ENTRY;\n");
- // one-shot timeout in 1 second
- me->m_receivedEvt.postIn(me, BSP_TICKS_PER_SEC);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_receivedEvt.disarm();
- return Q_HANDLED();
- }
- case RECEIVED_SIG: {
- return Q_TRAN(&TServer::authorizing);
- }
- }
- return Q_SUPER(&TServer::busy);
-}
-//............................................................................
-QState TServer::authorizing(TServer *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("authorizing-ENTRY;\n");
- // one-shot timeout in 2 seconds
- me->m_authorizedEvt.postIn(me, 2*BSP_TICKS_PER_SEC);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_authorizedEvt.disarm();
- return Q_HANDLED();
- }
- case AUTHORIZED_SIG: {
- return Q_TRAN(&TServer::idle);
- }
- }
- return Q_SUPER(&TServer::busy);
-}
-
-// test harness ==============================================================
-
-// Local-scope objects -------------------------------------------------------
-static TServer l_tserver; // the Transaction Server active object
-static QEvt const *l_tserverQSto[10]; // Event queue storage for TServer
-static RequestEvt l_smlPoolSto[10]; // small event pool
-
-//............................................................................
-int main(int argc, char *argv[]) {
- printf("Reminder state pattern\nQEP version: %s\nQF version: %s\n"
- "Press n to generate a new request\n"
- "Press ESC to quit...\n",
- QEP::getVersion(), QF::getVersion());
-
- BSP_init(argc, argv); // initialize the BSP
-
- QF::init(); // initialize the framework and the underlying RTOS/OS
-
-
- // publish-subscribe not used, no call to QF::psInit()
-
- // initialize event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
-
- // start the active objects...
- l_tserver.start(1, l_tserverQSto, Q_DIM(l_tserverQSto),
- (void *)0, 0, (QEvt *)0);
-
- return QF::run(); // run the QF application
-}
-//............................................................................
-void BSP_onKeyboardInput(uint8_t key) {
- switch (key) {
- case 49: { // 'n': new request?
- static uint8_t reqCtr = 0; // count the requests
- RequestEvt *e = Q_NEW(RequestEvt, NEW_REQUEST_SIG);
- e->ref_num = (++reqCtr); // set the reference number
- // post directly to TServer active object
- l_tserver.postFIFO(e); // post directly to TServer active object
- break;
- }
- case 129: { // ESC pressed?
- static QEvt const terminateEvt = { TERMINATE_SIG, 0};
- l_tserver.postFIFO(&terminateEvt);
- break;
- }
- }
-}
diff --git a/examples/80x86/dos/watcom/l/defer/inc_qp.rsp b/examples/80x86/dos/watcom/l/defer/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/defer/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/defer/link_dbg.rsp b/examples/80x86/dos/watcom/l/defer/link_dbg.rsp
deleted file mode 100644
index 7a2362e6..00000000
--- a/examples/80x86/dos/watcom/l/defer/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\defer.exe File dbg\bsp.obj,dbg\defer.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/defer/make.bat b/examples/80x86/dos/watcom/l/defer/make.bat
deleted file mode 100644
index aebf7433..00000000
--- a/examples/80x86/dos/watcom/l/defer/make.bat
+++ /dev/null
@@ -1,60 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Defer example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-mkdir %BINDIR%
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\defer.obj %SRCDIR%\defer.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/dpp/bsp.cpp b/examples/80x86/dos/watcom/l/dpp/bsp.cpp
deleted file mode 100644
index d30d6e4a..00000000
--- a/examples/80x86/dos/watcom/l/dpp/bsp.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-//****************************************************************************
-// Product: DPP example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-#include
-
-Q_DEFINE_THIS_FILE
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)();
-static void interrupt (*l_dosKbdISR)();
-static uint32_t l_delay = 0UL; // limit for the loop counter in busyDelay()
-
-#ifdef Q_SPY
- static uint16_t l_uart_base; // QS data uplink UART base address
- static QSTimeCtr l_tickTime; // keeps timetsamp at tick
- static uint8_t l_tmr;
- static uint8_t l_kbd;
-
- #define UART_16550_TXFIFO_DEPTH 16
-
- enum AppRecords { // application-specific trace records
- PHILO_STAT = QS_USER
- };
-#endif
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-void interrupt ISR_tmr() {
- QF_ISR_ENTRY();
-
- QF::TICK(&l_tmr); // call QF_tick() outside of critical section
-#ifdef Q_SPY
- l_tickTime += 0x10000; // add 16-bit rollover
-#endif
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void interrupt ISR_kbd() {
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from the 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
- if (key == (uint8_t)129) { // ESC key pressed?
- static QEvt const term = QEVT_INITIALIZER(TERMINATE_SIG);//const event
- QF::PUBLISH(&term, &l_kbd); // publish to all interested AOs
- }
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void QF::onStartup(void) {
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) { // restore the original DOS vectors ...
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- QS_EXIT(); // exit QS
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-#ifdef Q_SPY
- if ((inp(l_uart_base + 5) & (1 << 5)) != 0) { // THR empty?
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- QF_INT_DISABLE();
- block = QS::getBlock(&fifo); // try to get next block to transmit
- QF_INT_ENABLE();
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- }
-#endif
-}
-//............................................................................
-void BSP_init(int argc, char *argv[]) {
- if (argc > 1) {
- l_delay = atol(argv[1]); // set the delay counter for busy delay
- }
-
- char const *com = "COM1";
- if (argc > 2) {
- com = argv[2];
- com = com; // avoid the compiler warning about unused variable
- }
- if (!QS_INIT(com)) { // initialize QS
- Q_ERROR();
- }
-
- QS_OBJ_DICTIONARY(&l_tmr);
- QS_OBJ_DICTIONARY(&l_kbd);
-
- printf("Dining Philosopher Problem example"
- "\nQEP %s\nQF %s\n"
- "Press ESC to quit...\n",
- QEP::getVersion(),
- QF::getVersion());
-}
-//............................................................................
-void BSP_displyPhilStat(uint8_t n, char const *stat) {
- printf("Philosopher %2d is %s\n", (int)n, stat);
-
- QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
- QS_U8(1, n); // Philosopher number
- QS_STR(stat); // Philosopher status
- QS_END()
-}
-//............................................................................
-void BSP_busyDelay(void) {
- uint32_t volatile i = l_delay;
- while (i-- > 0UL) { // busy-wait loop
- }
-}
-//............................................................................
-void Q_onAssert(char const Q_ROM * const Q_ROM_VAR file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- QF::stop();
-}
-
-//----------------------------------------------------------------------------
-#ifdef Q_SPY // define QS callbacks
-
-//............................................................................
-static bool UART_config(char const *comName, uint32_t baud) {
- switch (comName[3]) { // Set the base address of the COMx port
- case '1': l_uart_base = (uint16_t)0x03F8; break; // COM1
- case '2': l_uart_base = (uint16_t)0x02F8; break; // COM2
- case '3': l_uart_base = (uint16_t)0x03E8; break; // COM3
- case '4': l_uart_base = (uint16_t)0x02E8; break; // COM4
- default: return (uint8_t)0; // COM port out of range failure
- }
- baud = (uint16_t)(115200UL / baud); // divisor for baud rate
- outp(l_uart_base + 3, (1 << 7)); // Set divisor access bit (DLAB)
- outp(l_uart_base + 0, (uint8_t)baud); // Load divisor
- outp(l_uart_base + 1, (uint8_t)(baud >> 8));
- outp(l_uart_base + 3, (1 << 1) | (1 << 0)); // LCR:8-bits,no p,1stop
- outp(l_uart_base + 4, (1 << 3) | (1 << 1) | (1 << 0)); // DTR,RTS,Out
- outp(l_uart_base + 1, 0); // Put UART into the polling FIFO mode
- outp(l_uart_base + 2, (1 << 2) | (1 << 0)); // FCR: enable, TX clear
-
- return true; // success
-}
-//............................................................................
-bool QS::onStartup(void const *arg) {
- static uint8_t qsBuf[1*1024]; // buffer for Quantum Spy
- initBuf(qsBuf, sizeof(qsBuf));
- return UART_config((char const *)arg, 115200UL);
-}
-//............................................................................
-void QS::onCleanup(void) {
-}
-//............................................................................
-QSTimeCtr QS::onGetTime(void) { // invoked with interrupts locked
- static uint32_t l_lastTime;
- uint32_t now;
- uint16_t count16; // 16-bit count from the 8254
-
- outp(0x43, 0); // latch the 8254's counter-0 count
- count16 = (uint16_t)inp(0x40); // read the low byte of counter-0
- count16 += ((uint16_t)inp(0x40) << 8); // add on the hi byte
-
- now = l_tickTime + (0x10000 - count16);
-
- if (l_lastTime > now) { // are we going "back" in time?
- now += 0x10000; // assume that there was one rollover
- }
- l_lastTime = now;
-
- return (QSTimeCtr)now;
-}
-//............................................................................
-void QS::onFlush(void) {
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- while ((block = getBlock(&fifo)) != (uint8_t *)0) {
- // busy-wait until TX FIFO empty
- while ((inp(l_uart_base + 5) & (1 << 5)) == 0) {
- }
-
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- fifo = UART_16550_TXFIFO_DEPTH; // re-load 16550 Tx FIFO depth
- }
-}
-#endif // Q_SPY
-//----------------------------------------------------------------------------
-
-
diff --git a/examples/80x86/dos/watcom/l/dpp/bsp.h b/examples/80x86/dos/watcom/l/dpp/bsp.h
deleted file mode 100644
index 7186afc3..00000000
--- a/examples/80x86/dos/watcom/l/dpp/bsp.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//****************************************************************************
-// Product: DPP example
-// Last Updated for Version: 4.2.00
-// Date of the Last Update: Jul 03, 2011
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2011 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#define BSP_TICKS_PER_SEC 18
-
-void BSP_init(int argc, char *argv[]);
-void BSP_displyPhilStat(uint8_t n, char const *stat);
-void BSP_busyDelay(void); // to artificially extend RTC processing
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/dpp/dpp.h b/examples/80x86/dos/watcom/l/dpp/dpp.h
deleted file mode 100644
index 22ffeb05..00000000
--- a/examples/80x86/dos/watcom/l/dpp/dpp.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef dpp_h
-#define dpp_h
-
-using namespace QP;
-
-enum DPPSignals {
- EAT_SIG = Q_USER_SIG, // published by Table to let a philosopher eat
- DONE_SIG, // published by Philosopher when done eating
- TERMINATE_SIG, // published by BSP to terminate the application
- MAX_PUB_SIG, // the last published signal
-
- HUNGRY_SIG, // posted from hungry Philosopher to Table
- TEST_SIG, // for testing
- MAX_SIG // the last signal
-};
-
-struct TableEvt : public QEvt {
- uint8_t philoNum; // philosopher number
-};
-
-enum { N_PHILO = 5 }; // number of philosophers
-
-void Philo_start(uint8_t n,
- uint8_t p, QEvt const *qSto[], uint32_t qLen);
-void Table_start(uint8_t p, QEvt const *qSto[], uint32_t qLen);
-
-extern QActive * const AO_Philo[N_PHILO]; // "opaque" pointers to Philo AO
-extern QActive * const AO_Table; // "opaque" pointer to Table AO
-
-#endif // dpp_h
diff --git a/examples/80x86/dos/watcom/l/dpp/inc_qp.rsp b/examples/80x86/dos/watcom/l/dpp/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/dpp/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/dpp/link_dbg.rsp b/examples/80x86/dos/watcom/l/dpp/link_dbg.rsp
deleted file mode 100644
index ed2b7729..00000000
--- a/examples/80x86/dos/watcom/l/dpp/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\dpp.exe File dbg\bsp.obj,dbg\main.obj,dbg\philo.obj,dbg\table.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/dpp/link_rel.rsp b/examples/80x86/dos/watcom/l/dpp/link_rel.rsp
deleted file mode 100644
index 701eba51..00000000
--- a/examples/80x86/dos/watcom/l/dpp/link_rel.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name rel\dpp.exe File rel\bsp.obj,rel\main.obj,rel\philo.obj,rel\table.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qep.lib
diff --git a/examples/80x86/dos/watcom/l/dpp/link_spy.rsp b/examples/80x86/dos/watcom/l/dpp/link_spy.rsp
deleted file mode 100644
index cd3173ee..00000000
--- a/examples/80x86/dos/watcom/l/dpp/link_spy.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name spy\dpp.exe File spy\bsp.obj,spy\main.obj,spy\philo.obj,spy\table.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qep.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qs.lib
diff --git a/examples/80x86/dos/watcom/l/dpp/main.cpp b/examples/80x86/dos/watcom/l/dpp/main.cpp
deleted file mode 100644
index 8de30fde..00000000
--- a/examples/80x86/dos/watcom/l/dpp/main.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//****************************************************************************
-// Product: DPP example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Jul 02, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-// Local-scope objects -------------------------------------------------------
-static QEvt const *l_tableQueueSto[N_PHILO];
-static QEvt const *l_philoQueueSto[N_PHILO][N_PHILO];
-static QSubscrList l_subscrSto[MAX_PUB_SIG];
-
-static QF_MPOOL_EL(TableEvt) l_smlPoolSto[2*N_PHILO]; // small event pool
-
-//............................................................................
-int main(int argc, char *argv[]) {
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- BSP_init(argc, argv); // initialize the BSP
-
- // object dictionaries...
- QS_OBJ_DICTIONARY(l_smlPoolSto);
- QS_OBJ_DICTIONARY(l_tableQueueSto);
- QS_OBJ_DICTIONARY(l_philoQueueSto[0]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[1]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[2]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[3]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[4]);
-
- QF::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe
-
- // initialize event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
-
- // start the active objects...
- uint8_t n;
- for (n = 0; n < N_PHILO; ++n) {
- AO_Philo[n]->start((uint8_t)(n + 1),
- l_philoQueueSto[n], Q_DIM(l_philoQueueSto[n]),
- (void *)0, 0, (QEvt *)0);
- }
- AO_Table->start((uint8_t)(N_PHILO + 1),
- l_tableQueueSto, Q_DIM(l_tableQueueSto),
- (void *)0, 0, (QEvt *)0);
-
- return QF::run(); // run the QF application
-}
-
diff --git a/examples/80x86/dos/watcom/l/dpp/make.bat b/examples/80x86/dos/watcom/l/dpp/make.bat
deleted file mode 100644
index a52f0dba..00000000
--- a/examples/80x86/dos/watcom/l/dpp/make.bat
+++ /dev/null
@@ -1,79 +0,0 @@
-@echo off
-:: ===========================================================================
-:: DPP example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-if not "%1"=="rel" goto spy
- echo rel selected
- set BINDIR=rel
- set CCFLAGS=-d0 -ml -3 -fpi87 -ot -dNDEBUG
- set LDFLAGS=@link_rel.rsp
-goto compile
-:spy
-if not "%1"=="spy" goto dbg
- echo spy selected
- set BINDIR=spy
- set CCFLAGS=-d2 -ml -3 -fpi87 -dQ_SPY
- set LDFLAGS=@link_spy.rsp
-goto compile
-:dbg
- echo default selected
- set BINDIR=dbg
- set CCFLAGS=-d2 -ml -3 -fpi87
- set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-:compile
-
-mkdir %BINDIR%
-
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\philo.obj %SRCDIR%\philo.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\table.obj %SRCDIR%\table.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/dpp/philo.cpp b/examples/80x86/dos/watcom/l/dpp/philo.cpp
deleted file mode 100644
index 831c504d..00000000
--- a/examples/80x86/dos/watcom/l/dpp/philo.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-//****************************************************************************
-// Product: DPP example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-Q_DEFINE_THIS_FILE
-
-// Active object class -------------------------------------------------------
-class Philo : public QActive {
-private:
- QTimeEvt m_timeEvt; // to timeout thinking or eating
-
-public:
- Philo();
-
-private:
- static QState initial (Philo *me, QEvt const *e);
- static QState thinking(Philo *me, QEvt const *e);
- static QState hungry (Philo *me, QEvt const *e);
- static QState eating (Philo *me, QEvt const *e);
-};
-
-// Local objects -------------------------------------------------------------
-static Philo l_philo[N_PHILO]; // storage for all Philos
-
-#define THINK_TIME (BSP_TICKS_PER_SEC/2)
-#define EAT_TIME (BSP_TICKS_PER_SEC/5)
-
- // helper macro to provide the ID of Philo "me_"
-#define PHILO_ID(me_) ((uint8_t)((me_) - l_philo))
-
-enum InternalSignals { // internal signals
- TIMEOUT_SIG = MAX_SIG
-};
-// Global objects ------------------------------------------------------------
-QActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AOs
- &l_philo[0],
- &l_philo[1],
- &l_philo[2],
- &l_philo[3],
- &l_philo[4]
-};
-
-//............................................................................
-Philo::Philo()
- : QActive((QStateHandler)&Philo::initial),
- m_timeEvt(TIMEOUT_SIG)
-{}
-//............................................................................
-QState Philo::initial(Philo *me, QEvt const *) {
- static uint8_t registered; // starts off with 0, per C-standard
- if (!registered) {
- QS_OBJ_DICTIONARY(&l_philo[0]);
- QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[1]);
- QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[2]);
- QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[3]);
- QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[4]);
- QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
-
- QS_FUN_DICTIONARY(&Philo::initial);
- QS_FUN_DICTIONARY(&Philo::thinking);
- QS_FUN_DICTIONARY(&Philo::hungry);
- QS_FUN_DICTIONARY(&Philo::eating);
-
- registered = (uint8_t)1;
- }
- QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
- QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
-
- me->subscribe(EAT_SIG);
-
- return Q_TRAN(&Philo::thinking);
-}
-//............................................................................
-QState Philo::thinking(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_timeEvt.postIn(me, THINK_TIME);
- return Q_HANDLED();
- }
- case TIMEOUT_SIG: {
- BSP_busyDelay();
- return Q_TRAN(&Philo::hungry);
- }
- case EAT_SIG: // intentionally fall-through
- case DONE_SIG: {
- // EAT or DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Philo::hungry(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- TableEvt *te = Q_NEW(TableEvt, HUNGRY_SIG);
- te->philoNum = PHILO_ID(me);
- AO_Table->POST(te, me);
- return Q_HANDLED();
- }
- case EAT_SIG: {
- if (((TableEvt *)e)->philoNum == PHILO_ID(me)) {
- BSP_busyDelay();
- return Q_TRAN(&Philo::eating);
- }
- break;
- }
- case DONE_SIG: {
- // DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Philo::eating(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_timeEvt.postIn(me, EAT_TIME);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- TableEvt *te = Q_NEW(TableEvt, DONE_SIG);
- te->philoNum = PHILO_ID(me);
- QF::PUBLISH(te, me);
- return Q_HANDLED();
- }
- case TIMEOUT_SIG: {
- BSP_busyDelay();
- return Q_TRAN(&Philo::thinking);
- }
- case EAT_SIG: // intentionally fall-through
- case DONE_SIG: {
- // EAT or DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-
diff --git a/examples/80x86/dos/watcom/l/dpp/table.cpp b/examples/80x86/dos/watcom/l/dpp/table.cpp
deleted file mode 100644
index 77b863aa..00000000
--- a/examples/80x86/dos/watcom/l/dpp/table.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-//****************************************************************************
-// Product: DPP example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-Q_DEFINE_THIS_FILE
-
-// Active object class -------------------------------------------------------
-class Table : public QActive {
-private:
- uint8_t m_fork[N_PHILO];
- uint8_t m_isHungry[N_PHILO];
-
-public:
- Table();
-
-private:
- static QState initial(Table *me, QEvt const *e);
- static QState serving(Table *me, QEvt const *e);
-};
-
-#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1)) % N_PHILO))
-#define LEFT(n_) ((uint8_t)(((n_) + 1) % N_PHILO))
-enum ForkState { FREE, USED };
-
-// Local objects -------------------------------------------------------------
-static Table l_table; // local Table object
-
-// Public-scope objects ------------------------------------------------------
-QActive * const AO_Table = &l_table; // "opaque" AO pointer
-
-//............................................................................
-Table::Table() : QActive((QStateHandler)&Table::initial) {
- uint8_t n;
- for (n = 0; n < N_PHILO; ++n) {
- m_fork[n] = FREE;
- m_isHungry[n] = 0;
- }
-}
-//............................................................................
-QState Table::initial(Table *me, QEvt const *) {
-
- QS_OBJ_DICTIONARY(&l_table);
- QS_FUN_DICTIONARY(&QHsm::top);
- QS_FUN_DICTIONARY(&Table::initial);
- QS_FUN_DICTIONARY(&Table::serving);
-
- QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
- QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
- QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
-
- QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
-
- me->subscribe(DONE_SIG);
- me->subscribe(TERMINATE_SIG);
-
- return Q_TRAN(&Table::serving);
-}
-//............................................................................
-QState Table::serving(Table *me, QEvt const *e) {
- uint8_t n, m;
- TableEvt *te;
- switch (e->sig) {
- case HUNGRY_SIG: {
- BSP_busyDelay();
- n = ((TableEvt const *)e)->philoNum;
- // phil ID must be in range and he must be not hungry
- Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
-
- BSP_displyPhilStat(n, "hungry ");
- m = LEFT(n);
- if ((me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)) {
- me->m_fork[m] = me->m_fork[n] = USED;
- te = Q_NEW(TableEvt, EAT_SIG);
- te->philoNum = n;
- QF::PUBLISH(te, me);
- BSP_displyPhilStat(n, "eating ");
- }
- else {
- me->m_isHungry[n] = 1;
- }
- return Q_HANDLED();
- }
- case DONE_SIG: {
- BSP_busyDelay();
- n = ((TableEvt const *)e)->philoNum;
- // phil ID must be in range and he must be not hungry
- Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
-
- BSP_displyPhilStat(n, "thinking");
- m = LEFT(n);
- // both forks of Phil[n] must be used
- Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
-
- me->m_fork[m] = me->m_fork[n] = FREE;
- m = RIGHT(n); // check the right neighbor
- if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
- me->m_fork[n] = me->m_fork[m] = USED;
- me->m_isHungry[m] = 0;
- te = Q_NEW(TableEvt, EAT_SIG);
- te->philoNum = m;
- QF::PUBLISH(te, me);
- BSP_displyPhilStat(m, "eating ");
- }
- m = LEFT(n); // check the left neighbor
- n = LEFT(m); // left fork of the left neighbor
- if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
- me->m_fork[m] = me->m_fork[n] = USED;
- me->m_isHungry[m] = 0;
- te = Q_NEW(TableEvt, EAT_SIG);
- te->philoNum = m;
- QF::PUBLISH(te, me);
- BSP_displyPhilStat(m, "eating ");
- }
- return Q_HANDLED();
- }
- case TERMINATE_SIG: {
- QF::stop();
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
diff --git a/examples/80x86/dos/watcom/l/game/bsp.cpp b/examples/80x86/dos/watcom/l/game/bsp.cpp
deleted file mode 100644
index 6bb8b7de..00000000
--- a/examples/80x86/dos/watcom/l/game/bsp.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game, BSP for 80x86, Open Watcom
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "game.h"
-#include "bsp.h"
-#include "video.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-
-Q_DEFINE_THIS_FILE
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)(void);
-static void interrupt (*l_dosKbdISR)(void);
-static void interrupt (*l_dosSpareISR)(void);
-
-#ifdef Q_SPY
- static uint16_t l_uart_base; // QS data uplink UART base address
- QSTimeCtr l_tickTime; // keeps timetsamp at tick
- static uint8_t l_tmr;
- static uint8_t l_kbd;
-
- #define UART_TXFIFO_DEPTH 16
-#endif
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-#define SPARE_VECTOR 0x81
-
-//............................................................................
-static void interrupt ISR_tmr(void) {
- QF_ISR_ENTRY();
-
- QF::TICK(&l_tmr); // process all armed time events
- static QEvt const tickEvt = { TIME_TICK_SIG, 0 };
- QF::PUBLISH(&tickEvt, &l_tmr); // publish the tick event
-
-#ifdef Q_SPY
- l_tickTime += 0x10000;
-#endif
-
-
- QF_ISR_EXIT();
-}
-//............................................................................
-static void interrupt ISR_kbd(void) {
- static uint8_t ship_pos = GAME_SHIP_Y;
-
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- switch (key) {
- case 200: // Up-arrow
- case 208: { // Down-arrow
- ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
- if ((key == (uint8_t)200) && (ship_pos > 0x00)) {
- --ship_pos;
- }
- else if ((key == (uint8_t)208)
- && (ship_pos < (GAME_SCREEN_HEIGHT - 3))) {
- ++ship_pos;
- }
- ope->x = (uint8_t)GAME_SHIP_X; // x-position is fixed
- ope->y = (uint8_t)ship_pos;
- AO_Ship->POST(ope, &l_kbd); // post to the ship
-
- Video::printNumAt(24, 24, Video::FGND_YELLOW, ship_pos);
- break;
- }
- case 57: { // Space
- static uint16_t ntrig = 0;
- static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0 };
- QF::PUBLISH(&fireEvt, &l_kbd);
-
- Video::printNumAt(47, 24, Video::FGND_YELLOW, ++ntrig);
- break;
- } // Esc
- case 129: {
- static QEvt const quitEvt = { PLAYER_QUIT_SIG, 0 };
- QF::PUBLISH(&quitEvt, &l_kbd);
- break;
- }
- }
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void BSP_init(int argc, char *argv[]) {
- char const *com = "COM1";
-
- com = com; // avoid compiler warning if QS is not used
-
- if (argc > 1) {
- com = argv[1];
- }
- if (!QS_INIT(com)) { // initialize QS
- Q_ERROR();
- }
-
- QS_OBJ_DICTIONARY(&l_tmr);
- QS_OBJ_DICTIONARY(&l_kbd);
-
- Video::clearScreen(Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 0, 80, 1, Video::BGND_RED | Video::BGND_BLINK);
- Video::clearRect( 0, 8, 80, 24, Video::BGND_BLACK | Video::FGND_WHITE);
- Video::clearRect( 0, 7, 80, 8, Video::BGND_BLUE);
- Video::clearRect( 0, 24, 80, 25, Video::BGND_BLUE);
-
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED | Video::BGND_BLINK);
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED | Video::BGND_BLINK);
-
- Video::printStrAt(35, 0, Video::FGND_WHITE, "FLY 'n' SHOOT");
- Video::printStrAt(15, 2, Video::FGND_BLACK,
- "Press UP-arrow to move the space ship up");
- Video::printStrAt(15, 3, Video::FGND_BLACK,
- "Press DOWN-arrow to move the space ship down");
- Video::printStrAt(15, 4, Video::FGND_BLACK,
- "Press SPACE to fire the missile");
- Video::printStrAt(15, 5, Video::FGND_BLACK,
- "Press ESC to quit the game");
- Video::printStrAt( 8, 24, Video::FGND_WHITE, "Ship Position:");
- Video::printStrAt(37, 24, Video::FGND_WHITE, "Triggers:");
- Video::printStrAt(61, 24, Video::FGND_WHITE, "Score:");
-
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED);
- Video::clearRect(47, 24, 51, 25, Video::BGND_RED);
- Video::clearRect(68, 24, 72, 25, Video::BGND_RED);
- Video::printNumAt(24, 24, Video::FGND_YELLOW, 0);
- Video::printNumAt(47, 24, Video::FGND_YELLOW, 0);
- Video::printNumAt(68, 24, Video::FGND_YELLOW, 0);
-}
-//............................................................................
-void BSP_drawBitmap(uint8_t const *bitmap, uint8_t width, uint8_t height) {
- Video::drawBitmapAt(0, 8, bitmap, width, height);
-}
-//............................................................................
-void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
- Video::drawStringAt(x, 8 + y*8, str);
-}
-//............................................................................
-void BSP_updateScore(uint16_t score) {
- if (score == 0) {
- Video::clearRect(68, 24, 72, 25, Video::BGND_RED);
- }
- Video::printNumAt(68, 24, Video::FGND_YELLOW, score);
-}
-//............................................................................
-void BSP_displayOn(void) {
-}
-//............................................................................
-void BSP_displayOff(void) {
- Video::clearRect( 0, 8, 80, 24, Video::BGND_BLACK | Video::FGND_WHITE);
-}
-
-//............................................................................
-void QF::onStartup(void) {
- uint16_t count;
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
- l_dosSpareISR = _dos_getvect(SPARE_VECTOR);
-
- QF_INT_DISABLE();
- count = (uint16_t)(((1193180 * 2) / BSP_TICKS_PER_SEC + 1) >> 1);
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, count & 0xFF); // load low byte of timer 0
- outp(0x40, (count >> 8) & 0xFF); // load high byte of timer 0
-
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- _dos_setvect(SPARE_VECTOR, l_dosTmrISR);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) {
- // restore the DOS system clock tick rate...
- QF_INT_DISABLE();
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, 0); // load low byte of timer 0
- outp(0x40, 0); // load high byte of timer 0
- // restore the original DOS vectors ...
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- _dos_setvect(SPARE_VECTOR, l_dosSpareISR);
- QF_INT_ENABLE();
-
- QS_EXIT(); // exit QS
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-#ifdef Q_SPY
- if ((inp(l_uart_base + 5) & (1 << 5)) != 0) { // Tx FIFO empty?
- uint16_t fifo = UART_TXFIFO_DEPTH; // depth of the 15550 Tx FIFO
- uint8_t const *block;
- QF_INT_DISABLE();
- block = QS::getBlock(&fifo); // try to get next block to transmit
- QF_INT_ENABLE();
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- }
-#endif
-}
-//----------------------------------------------------------------------------
-void Q_onAssert(char const Q_ROM * const Q_ROM_VAR file, int line) {
- Video::clearRect ( 0, 24, 80, 25, Video::BGND_RED);
- Video::printStrAt( 0, 24, Video::FGND_WHITE, "ASSERTION FAILED in file:");
- Video::printStrAt(26, 24, Video::FGND_YELLOW, file);
- Video::printStrAt(57, 24, Video::FGND_WHITE, "line:");
- Video::printNumAt(62, 24, Video::FGND_YELLOW, line);
-
- QF::stop(); // stop QF and cleanup
-}
-
-//----------------------------------------------------------------------------
-#ifdef Q_SPY
-
-//............................................................................
-static uint8_t UART_config(char const *comName, uint32_t baud) {
- switch (comName[3]) { // Set the base address of the COMx port
- case '1': l_uart_base = (uint16_t)0x03F8; break; // COM1
- case '2': l_uart_base = (uint16_t)0x02F8; break; // COM2
- case '3': l_uart_base = (uint16_t)0x03E8; break; // COM3
- case '4': l_uart_base = (uint16_t)0x02E8; break; // COM4
- default: return (uint8_t)0; // COM port out of range failure
- }
- baud = (uint16_t)(115200UL / baud); // divisor for baud rate
- outp(l_uart_base + 3, (1 << 7)); // Set divisor access bit (DLAB)
- outp(l_uart_base + 0, (uint8_t)baud); // Load divisor
- outp(l_uart_base + 1, (uint8_t)(baud >> 8));
- outp(l_uart_base + 3, (1 << 1) | (1 << 0)); // LCR:8-bits,no p,1stop
- outp(l_uart_base + 4, (1 << 3) | (1 << 1) | (1 << 0)); // DTR,RTS,Out
- outp(l_uart_base + 1, 0); // Put UART into the polling FIFO mode
- outp(l_uart_base + 2, (1 << 2) | (1 << 0)); // FCR: enable, TX clear
-
- return (uint8_t)1; // success
-}
-//............................................................................
-bool QS::onStartup(void const *arg) {
- static uint8_t qsBuf[1*1024]; // buffer for Quantum Spy
- initBuf(qsBuf, sizeof(qsBuf));
- // setup the QS filters...
- QS_FILTER_ON(QS_ALL_RECORDS);
-
-// QS_FILTER_OFF(QS_QEP_STATE_EMPTY);
-// QS_FILTER_OFF(QS_QEP_STATE_ENTRY);
-// QS_FILTER_OFF(QS_QEP_STATE_EXIT);
-// QS_FILTER_OFF(QS_QEP_STATE_INIT);
-// QS_FILTER_OFF(QS_QEP_INIT_TRAN);
-// QS_FILTER_OFF(QS_QEP_INTERN_TRAN);
-// QS_FILTER_OFF(QS_QEP_TRAN);
-// QS_FILTER_OFF(QS_QEP_IGNORED);
-
- QS_FILTER_OFF(QS_QF_ACTIVE_ADD);
- QS_FILTER_OFF(QS_QF_ACTIVE_REMOVE);
- QS_FILTER_OFF(QS_QF_ACTIVE_SUBSCRIBE);
- QS_FILTER_OFF(QS_QF_ACTIVE_UNSUBSCRIBE);
- QS_FILTER_OFF(QS_QF_ACTIVE_POST_FIFO);
- QS_FILTER_OFF(QS_QF_ACTIVE_POST_LIFO);
- QS_FILTER_OFF(QS_QF_ACTIVE_GET);
- QS_FILTER_OFF(QS_QF_ACTIVE_GET_LAST);
- QS_FILTER_OFF(QS_QF_EQUEUE_INIT);
- QS_FILTER_OFF(QS_QF_EQUEUE_POST_FIFO);
- QS_FILTER_OFF(QS_QF_EQUEUE_POST_LIFO);
- QS_FILTER_OFF(QS_QF_EQUEUE_GET);
- QS_FILTER_OFF(QS_QF_EQUEUE_GET_LAST);
- QS_FILTER_OFF(QS_QF_MPOOL_INIT);
- QS_FILTER_OFF(QS_QF_MPOOL_GET);
- QS_FILTER_OFF(QS_QF_MPOOL_PUT);
- QS_FILTER_OFF(QS_QF_PUBLISH);
- QS_FILTER_OFF(QS_QF_NEW);
- QS_FILTER_OFF(QS_QF_GC_ATTEMPT);
- QS_FILTER_OFF(QS_QF_GC);
-// QS_FILTER_OFF(QS_QF_TICK);
- QS_FILTER_OFF(QS_QF_TIMEEVT_ARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_AUTO_DISARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_DISARM_ATTEMPT);
- QS_FILTER_OFF(QS_QF_TIMEEVT_DISARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_REARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_POST);
- QS_FILTER_OFF(QS_QF_CRIT_ENTRY);
- QS_FILTER_OFF(QS_QF_CRIT_EXIT);
- QS_FILTER_OFF(QS_QF_ISR_ENTRY);
- QS_FILTER_OFF(QS_QF_ISR_EXIT);
-
- return UART_config((char const *)arg, 115200UL);
-}
-//............................................................................
-void QS::onCleanup(void) {
-}
-//............................................................................
-QSTimeCtr QS::onGetTime(void) { // invoked with interrupts locked
- static uint32_t l_lastTime;
- uint32_t now;
- uint16_t count16; // 16-bit count from the 8254
-
- outp(0x43, 0); // latch the 8254's counter-0 count
- count16 = (uint16_t)inp(0x40); // read the low byte of counter-0
- count16 += ((uint16_t)inp(0x40) << 8); // add on the hi byte
-
- now = l_tickTime + (0x10000 - count16);
-
- if (l_lastTime > now) { // are we going "back" in time?
- now += 0x10000; // assume that there was one rollover
- }
- l_lastTime = now;
-
- return (QSTimeCtr)now;
-}
-//............................................................................
-void QS::onFlush(void) {
- uint16_t b;
- while ((b = getByte()) != QS_EOD) { // next QS trace byte available?
- while ((inp(l_uart_base + 5) & (1 << 5)) == 0) { // not empty?
- }
- outp(l_uart_base + 0, (uint8_t)b); // put the byte to TX FIFO
- }
-}
-#endif // Q_SPY
-//----------------------------------------------------------------------------
diff --git a/examples/80x86/dos/watcom/l/game/bsp.h b/examples/80x86/dos/watcom/l/game/bsp.h
deleted file mode 100644
index 9fb35915..00000000
--- a/examples/80x86/dos/watcom/l/game/bsp.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.1.03
-// Date of the Last Update: Feb 19, 2010
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2010 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#define BSP_TICKS_PER_SEC 30
-#define BSP_SCREEN_WIDTH 80
-#define BSP_SCREEN_HEIGHT 16
-
-void BSP_init(int argc, char *argv[]);
-void BSP_drawBitmap(uint8_t const *bitmap,
- uint8_t width, // with of the bitmap in pixels
- uint8_t height); // height of the bitmap in pixels
-void BSP_drawNString(uint8_t x, // x in pixels
- uint8_t y, // y position in chars
- char const *str);
-void BSP_updateScore(uint16_t score);
-
-void BSP_displayOn(void);
-void BSP_displayOff(void);
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/game/game.h b/examples/80x86/dos/watcom/l/game/game.h
deleted file mode 100644
index 9fe193b3..00000000
--- a/examples/80x86/dos/watcom/l/game/game.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef game_h
-#define game_h
-
-using namespace QP;
-
-enum GameSignals { // signals used in the game
- TIME_TICK_SIG = Q_USER_SIG, // published from tick ISR
- PLAYER_TRIGGER_SIG, // published by Player (ISR) to trigger the Missile
- PLAYER_QUIT_SIG, // published by Player (ISR) to quit the game
- GAME_OVER_SIG, // published by Ship when it finishes exploding
-
- // insert other published signals here ...
- MAX_PUB_SIG, // the last published signal
-
- PLAYER_SHIP_MOVE_SIG, // posted by Player (ISR) to the Ship to move it
-
-
- BLINK_TIMEOUT_SIG, // signal for Tunnel's blink timeout event
- SCREEN_TIMEOUT_SIG, // signal for Tunnel's screen timeout event
-
- TAKE_OFF_SIG, // from Tunnel to Ship to grant permission to take off
- HIT_WALL_SIG, // from Tunnel to Ship when Ship hits the wall
- HIT_MINE_SIG, // from Mine to Ship or Missile when it hits the mine
- SHIP_IMG_SIG, // from Ship to the Tunnel to draw and check for hits
- MISSILE_IMG_SIG, // from Missile the Tunnel to draw and check for hits
- MINE_IMG_SIG, // sent by Mine to the Tunnel to draw the mine
- MISSILE_FIRE_SIG, // sent by Ship to the Missile to fire
- DESTROYED_MINE_SIG, // from Missile to Ship when Missile destroyed Mine
- EXPLOSION_SIG, // from any exploding object to render the explosion
- MINE_PLANT_SIG, // from Tunnel to the Mine to plant it
- MINE_DISABLED_SIG, // from Mine to Tunnel when it becomes disabled
- MINE_RECYCLE_SIG, // sent by Tunnel to Mine to recycle the mine
- SCORE_SIG, // from Ship to Tunnel to adjust game level based on score
-
- MAX_SIG // the last signal (keep always last)
-};
-
-struct ObjectPosEvt : public QEvt { // derive from the QEvt class
- uint8_t x; // the x-position of the object
- uint8_t y; // new y-position of the object
-};
-
-struct ObjectImageEvt : public QEvt { // derive from the QEvt class
- uint8_t x; // the x-position of the object
- int8_t y; // the y-position of the object
- uint8_t bmp; // the bitmap ID representing the object
-};
-
-struct MineEvt : public QEvt { // derive from the QEvt class
- uint8_t id; // the ID of the Mine
- MineEvt(QSignal sig, uint8_t id) {
- this->sig = sig;
- this->poolId_ = 0;
- this->id = id;
- }
-};
-
-struct ScoreEvt : public QEvt { // derive from the QEvt class
- uint16_t score; // the current score
- ScoreEvt(QSignal sig, uint16_t score) {
- this->sig = sig;
- this->poolId_ = 0;
- this->score = score;
- }
-};
-
-#define GAME_SCREEN_WIDTH BSP_SCREEN_WIDTH
-#define GAME_SCREEN_HEIGHT BSP_SCREEN_HEIGHT
-#define GAME_MINES_MAX 5
-#define GAME_MINES_DIST_MIN 10
-#define GAME_SPEED_X 1
-#define GAME_MISSILE_SPEED_X 2
-#define GAME_SHIP_X 10
-#define GAME_SHIP_Y (GAME_SCREEN_HEIGHT / 2)
-
-enum GameBitmapIds {
- PRESS_BUTTON_BMP,
- SHIP_BMP,
- MISSILE_BMP,
- MINE1_BMP,
- MINE2_BMP,
- MINE2_MISSILE_BMP,
- EXPLOSION0_BMP,
- EXPLOSION1_BMP,
- EXPLOSION2_BMP,
- EXPLOSION3_BMP,
- MAX_BMP
-};
-
-// opaque pointers to active objects in the application
-extern QActive * const AO_Tunnel;
-extern QActive * const AO_Ship;
-extern QActive * const AO_Missile;
-
-uint8_t do_bitmaps_overlap(uint8_t bmp_id1, uint8_t x1, uint8_t y1,
- uint8_t bmp_id2, uint8_t x2, uint8_t y2);
-
-// obtain instances of the Mines orthogonal components
-QHsm *Mine1_getInst(uint8_t id);
-QHsm *Mine2_getInst(uint8_t id);
-
-#endif // game_h
diff --git a/examples/80x86/dos/watcom/l/game/inc_qp.rsp b/examples/80x86/dos/watcom/l/game/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/game/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/game/link_dbg.rsp b/examples/80x86/dos/watcom/l/game/link_dbg.rsp
deleted file mode 100644
index e1c181f0..00000000
--- a/examples/80x86/dos/watcom/l/game/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\game.exe File dbg\bsp.obj,dbg\main.obj,dbg\mine1.obj,dbg\mine2.obj,dbg\missile.obj,dbg\ship.obj,dbg\tunnel.obj,dbg\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/game/link_rel.rsp b/examples/80x86/dos/watcom/l/game/link_rel.rsp
deleted file mode 100644
index ad813b11..00000000
--- a/examples/80x86/dos/watcom/l/game/link_rel.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name rel\game.exe File rel\bsp.obj,rel\main.obj,rel\mine1.obj,rel\mine2.obj,rel\missile.obj,rel\ship.obj,rel\tunnel.obj,rel\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qep.lib
diff --git a/examples/80x86/dos/watcom/l/game/link_spy.rsp b/examples/80x86/dos/watcom/l/game/link_spy.rsp
deleted file mode 100644
index 76b7ab11..00000000
--- a/examples/80x86/dos/watcom/l/game/link_spy.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name spy\game.exe File spy\bsp.obj,spy\main.obj,spy\mine1.obj,spy\mine2.obj,spy\missile.obj,spy\ship.obj,spy\tunnel.obj,spy\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qep.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qs.lib
diff --git a/examples/80x86/dos/watcom/l/game/main.cpp b/examples/80x86/dos/watcom/l/game/main.cpp
deleted file mode 100644
index 90525cdd..00000000
--- a/examples/80x86/dos/watcom/l/game/main.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-// Local-scope objects -------------------------------------------------------
-static QEvt const * l_missileQueueSto[2];
-static QEvt const * l_shipQueueSto[3];
-static QEvt const * l_tunnelQueueSto[GAME_MINES_MAX + 5];
-
-static union SmallEvents {
- void *e0; // minimum event size
- uint8_t e1[sizeof(QEvt)];
- // ... other event types to go into this pool
-} l_smlPoolSto[10]; // storage for the small event pool
-
-static union MediumEvents {
- void *e0; // minimum event size
- uint8_t e1[sizeof(ObjectPosEvt)];
- uint8_t e2[sizeof(ObjectImageEvt)];
- uint8_t e3[sizeof(MineEvt)];
- uint8_t e4[sizeof(ScoreEvt)];
- // ... other event types to go into this pool
-} l_medPoolSto[2*GAME_MINES_MAX + 8]; // storage for the medium event pool
-
-static QSubscrList l_subscrSto[MAX_PUB_SIG];
-
-//............................................................................
-int main(int argc, char *argv[]) {
-
- BSP_init(argc, argv); // initialize the Board Support Package
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // initialize the event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
- QF::poolInit(l_medPoolSto, sizeof(l_medPoolSto), sizeof(l_medPoolSto[0]));
-
- QF::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe
-
- // send object dictionaries for event queues...
- QS_OBJ_DICTIONARY(l_missileQueueSto);
- QS_OBJ_DICTIONARY(l_shipQueueSto);
- QS_OBJ_DICTIONARY(l_tunnelQueueSto);
-
- // send object dictionaries for event pools...
- QS_OBJ_DICTIONARY(l_smlPoolSto);
- QS_OBJ_DICTIONARY(l_medPoolSto);
-
- // send signal dictionaries for globally published events...
- QS_SIG_DICTIONARY(TIME_TICK_SIG, static_cast(0));
- QS_SIG_DICTIONARY(PLAYER_TRIGGER_SIG, static_cast(0));
- QS_SIG_DICTIONARY(PLAYER_QUIT_SIG, static_cast(0));
- QS_SIG_DICTIONARY(GAME_OVER_SIG, static_cast(0));
-
- // start the active objects...
- AO_Missile->start(1, // priority
- l_missileQueueSto, Q_DIM(l_missileQueueSto),// evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
- AO_Ship ->start(2, // priority
- l_shipQueueSto, Q_DIM(l_shipQueueSto), // evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
- AO_Tunnel ->start(3, // priority
- l_tunnelQueueSto, Q_DIM(l_tunnelQueueSto), // evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
-
- return QF::run(); // run the QF application
-}
diff --git a/examples/80x86/dos/watcom/l/game/make.bat b/examples/80x86/dos/watcom/l/game/make.bat
deleted file mode 100644
index 19842721..00000000
--- a/examples/80x86/dos/watcom/l/game/make.bat
+++ /dev/null
@@ -1,82 +0,0 @@
-@echo off
-:: ===========================================================================
-:: "Fly 'n' Shoot" game example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 19, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-if not "%1"=="rel" goto spy
- echo rel selected
- set BINDIR=rel
- set CCFLAGS=-d0 -ml -3 -fpi87 -ot -dNDEBUG
- set LDFLAGS=@link_rel.rsp
-goto compile
-:spy
-if not "%1"=="spy" goto dbg
- echo spy selected
- set BINDIR=spy
- set CCFLAGS=-d2 -ml -3 -fpi87 -dQ_SPY
- set LDFLAGS=@link_spy.rsp
-goto compile
-:dbg
- echo default selected
- set BINDIR=dbg
- set CCFLAGS=-d2 -ml -3 -fpi87
- set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-:compile
-
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\mine1.obj %SRCDIR%\mine1.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\mine2.obj %SRCDIR%\mine2.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\missile.obj %SRCDIR%\missile.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ship.obj %SRCDIR%\ship.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\tunnel.obj %SRCDIR%\tunnel.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\video.obj %SRCDIR%\video.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/game/mine1.cpp b/examples/80x86/dos/watcom/l/game/mine1.cpp
deleted file mode 100644
index 21fb07af..00000000
--- a/examples/80x86/dos/watcom/l/game/mine1.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Mine1 : public QHsm { // extend the QHsm class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Mine1(void) : QHsm((QStateHandler)&Mine1::initial) {}
-
-private:
- static QState initial (Mine1 *me, QEvt const *e);
- static QState unused (Mine1 *me, QEvt const *e);
- static QState used (Mine1 *me, QEvt const *e);
- static QState planted (Mine1 *me, QEvt const *e);
- static QState exploding(Mine1 *me, QEvt const *e);
-};
-
-static Mine1 l_mine1[GAME_MINES_MAX]; // a pool of type-1 mines
-
- // helper macro to provide the ID of this mine
-#define MINE_ID(me_) ((me_) - l_mine1)
-
-//............................................................................
-QHsm *Mine1_getInst(uint8_t id) {
- Q_REQUIRE(id < GAME_MINES_MAX);
- return &l_mine1[id];
-}
-//............................................................................
-QState Mine1::initial(Mine1 *me, QEvt const *) {
- static uint8_t dict_sent;
- if (!dict_sent) {
- QS_OBJ_DICTIONARY(&l_mine1[0]); // obj. dictionaries for Mine1 pool
- QS_OBJ_DICTIONARY(&l_mine1[1]);
- QS_OBJ_DICTIONARY(&l_mine1[2]);
- QS_OBJ_DICTIONARY(&l_mine1[3]);
- QS_OBJ_DICTIONARY(&l_mine1[4]);
-
- QS_FUN_DICTIONARY(&Mine1::initial); // fun. dictionaries for Mine1 HSM
- QS_FUN_DICTIONARY(&Mine1::unused);
- QS_FUN_DICTIONARY(&Mine1::used);
- QS_FUN_DICTIONARY(&Mine1::planted);
- QS_FUN_DICTIONARY(&Mine1::exploding);
-
- dict_sent = 1;
- }
-
- QS_SIG_DICTIONARY(MINE_PLANT_SIG, me); // local signals
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, me);
- QS_SIG_DICTIONARY(MINE_RECYCLE_SIG, me);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, me);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, me);
-
- return Q_TRAN(&Mine1::unused);
-}
-//............................................................................
-QState Mine1::unused(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_PLANT_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Mine1::planted);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine1::used(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_EXIT_SIG: {
- // tell the Tunnel that this mine is becoming disabled
- MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG);
- mev->id = MINE_ID(me);
- AO_Tunnel->POST(mev, me);
- return Q_HANDLED();
- }
- case MINE_RECYCLE_SIG: {
- return Q_TRAN(&Mine1::unused);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine1::planted(Mine1 *me, QEvt const *e) {
- uint8_t x;
- uint8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case TIME_TICK_SIG: {
- if (me->m_x >= GAME_SPEED_X) {
- ObjectImageEvt *oie;
-
- me->m_x -= GAME_SPEED_X; // move the mine 1 step
-
- // tell the Tunnel to draw the Mine
- oie = Q_NEW(ObjectImageEvt, MINE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MINE1_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Ship hitting this mine
- if (do_bitmaps_overlap(MINE1_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Hit event with the type of the Mine1
- static MineEvt const mine1_hit(HIT_MINE_SIG, 1);
- AO_Ship->POST(&mine1_hit, me);
-
- // go straight to 'disabled' and let the Ship do the exploding
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Missile hitting this mine
- if (do_bitmaps_overlap(MINE1_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Score event with the score for destroying Mine1
- static ScoreEvt const mine1_destroyed(DESTROYED_MINE_SIG, 25);
- AO_Missile->POST(&mine1_destroyed, me);
- return Q_TRAN(&Mine1::exploding);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine1::used);
-}
-//............................................................................
-QState Mine1::exploding(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move explosion by 1 step
-
- // tell the Game to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 1; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + 2); // y of explosion
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine1::used);
-}
diff --git a/examples/80x86/dos/watcom/l/game/mine2.cpp b/examples/80x86/dos/watcom/l/game/mine2.cpp
deleted file mode 100644
index 0d7d9786..00000000
--- a/examples/80x86/dos/watcom/l/game/mine2.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Mine2 : public QHsm { // extend the QHsm class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Mine2(void) : QHsm((QStateHandler)&Mine2::initial) {}
-
-private:
- static QState initial (Mine2 *me, QEvt const *e);
- static QState unused (Mine2 *me, QEvt const *e);
- static QState used (Mine2 *me, QEvt const *e);
- static QState planted (Mine2 *me, QEvt const *e);
- static QState exploding(Mine2 *me, QEvt const *e);
-};
-
-
-static Mine2 l_mine2[GAME_MINES_MAX]; // a pool of type-2 mines
-
- // helper macro to provide the ID of this mine
-#define MINE_ID(me_) ((me_) - l_mine2)
-
-//............................................................................
-QHsm *Mine2_getInst(uint8_t id) {
- Q_REQUIRE(id < GAME_MINES_MAX);
- return &l_mine2[id];
-}
-//............................................................................
-QState Mine2::initial(Mine2 *me, QEvt const *) {
- static uint8_t dict_sent;
- if (!dict_sent) {
- QS_OBJ_DICTIONARY(&l_mine2[0]); // obj. dictionaries for Mine2 pool
- QS_OBJ_DICTIONARY(&l_mine2[1]);
- QS_OBJ_DICTIONARY(&l_mine2[2]);
- QS_OBJ_DICTIONARY(&l_mine2[3]);
- QS_OBJ_DICTIONARY(&l_mine2[4]);
-
- QS_FUN_DICTIONARY(&Mine2::initial); // fun. dictionaries for Mine2 HSM
- QS_FUN_DICTIONARY(&Mine2::unused);
- QS_FUN_DICTIONARY(&Mine2::used);
- QS_FUN_DICTIONARY(&Mine2::planted);
- QS_FUN_DICTIONARY(&Mine2::exploding);
-
- dict_sent = 1;
- }
-
- QS_SIG_DICTIONARY(MINE_PLANT_SIG, me); // local signals
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, me);
- QS_SIG_DICTIONARY(MINE_RECYCLE_SIG, me);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, me);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, me);
-
- return Q_TRAN(&Mine2::unused);
-}
-//............................................................................
-QState Mine2::unused(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_PLANT_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Mine2::planted);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine2::used(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_EXIT_SIG: {
- // tell the Tunnel that this mine is becoming disabled
- MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG);
- mev->id = MINE_ID(me);
- AO_Tunnel->POST(mev, me);
- return Q_HANDLED();
- }
- case MINE_RECYCLE_SIG: {
- return Q_TRAN(&Mine2::unused);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine2::planted(Mine2 *me, QEvt const *e) {
- uint8_t x;
- uint8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case TIME_TICK_SIG: {
- if (me->m_x >= GAME_SPEED_X) {
- ObjectImageEvt *oie;
-
- me->m_x -= GAME_SPEED_X; // move the mine 1 step
-
- // tell the Tunnel to draw the Mine
- oie = Q_NEW(ObjectImageEvt, MINE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MINE2_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Ship hitting this mine
- if (do_bitmaps_overlap(MINE2_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Hit event with the type of the Mine2
- static MineEvt const mine2_hit(HIT_MINE_SIG, 2);
- AO_Ship->POST(&mine2_hit, me);
-
- // go straight to 'disabled' and let the Ship do the exploding
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Missile hitting this mine
- // NOTE: Mine type-2 is nastier than Mine type-1.
- // The type-2 mine can hit the Ship with any of its
- // "tentacles". However, it can be destroyed by the
- // Missile only by hitting its center, defined as
- // a smaller bitmap MINE2_MISSILE_BMP.
- if (do_bitmaps_overlap(MINE2_MISSILE_BMP,
- me->m_x, me->m_y, bmp, x, y))
- {
- // Score event with the score for destroying Mine2
- static ScoreEvt const mine2_destroyed(DESTROYED_MINE_SIG, 45);
- AO_Missile->POST(&mine2_destroyed, me);
- return Q_TRAN(&Mine2::exploding);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine2::used);
-}
-//............................................................................
-QState Mine2::exploding(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move explosion by 1 step
-
- // tell the Game to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 1; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + 2); // y of explosion
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine2::used);
-}
diff --git a/examples/80x86/dos/watcom/l/game/missile.cpp b/examples/80x86/dos/watcom/l/game/missile.cpp
deleted file mode 100644
index 7ebcda4b..00000000
--- a/examples/80x86/dos/watcom/l/game/missile.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-// Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Missile : public QActive { // extend the QActive class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Missile(void) : QActive((QStateHandler)&Missile::initial) {}
-
-private:
- static QState initial (Missile *me, QEvt const *e);
- static QState armed (Missile *me, QEvt const *e);
- static QState flying (Missile *me, QEvt const *e);
- static QState exploding(Missile *me, QEvt const *e);
-};
-
-
-static Missile l_missile; // the sole instance of the Missile active object
-
-// Public-scope objects ------------------------------------------------------
-QActive * const AO_Missile = &l_missile; // opaque pointer
-
-// HSM definition ------------------------------------------------------------
-//............................................................................
-QState Missile::initial(Missile *me, QEvt const *) {
- me->subscribe(TIME_TICK_SIG);
-
- QS_OBJ_DICTIONARY(&l_missile); // object dictionary for Missile object
-
- QS_FUN_DICTIONARY(&Missile::initial); // dictionaries for Missile HSM
- QS_FUN_DICTIONARY(&Missile::armed);
- QS_FUN_DICTIONARY(&Missile::flying);
- QS_FUN_DICTIONARY(&Missile::exploding);
-
- QS_SIG_DICTIONARY(MISSILE_FIRE_SIG, &l_missile); // local signals
- QS_SIG_DICTIONARY(HIT_WALL_SIG, &l_missile);
- QS_SIG_DICTIONARY(DESTROYED_MINE_SIG, &l_missile);
-
- return Q_TRAN(&Missile::armed);
-}
-//............................................................................
-QState Missile::armed(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case MISSILE_FIRE_SIG: {
- // initialize position from the Ship
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Missile::flying);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Missile::flying(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case TIME_TICK_SIG: {
- ObjectImageEvt *oie;
- if (me->m_x + GAME_MISSILE_SPEED_X < GAME_SCREEN_WIDTH) {
- me->m_x += GAME_MISSILE_SPEED_X;
- // tell the Tunnel to draw the Missile and test for wall hits
- oie = Q_NEW(ObjectImageEvt, MISSILE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MISSILE_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else { // Missile outside the range, make it ready to fire again
- return Q_TRAN(&Missile::armed);
- }
- return Q_HANDLED();
- }
- case HIT_WALL_SIG: {
- return Q_TRAN(&Missile::exploding);
- }
- case DESTROYED_MINE_SIG: {
- // tell the Ship the score for destroing this Mine
- AO_Ship->POST(e, me);
-
- // re-arm immediately & let the destroyed Mine do the exploding
- return Q_TRAN(&Missile::armed);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Missile::exploding(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move the explosion by one step
-
- // tell the Tunnel to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 3; // x-pos of explosion
- oie->y = (int8_t)((int)me->m_y - 4); // y-pos
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else { // explosion finished or moved outside the game
- return Q_TRAN(&Missile::armed);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
diff --git a/examples/80x86/dos/watcom/l/game/ship.cpp b/examples/80x86/dos/watcom/l/game/ship.cpp
deleted file mode 100644
index 806b68ff..00000000
--- a/examples/80x86/dos/watcom/l/game/ship.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-//Q_DEFINE_THIS_FILE
-
-#define SHIP_WIDTH 5
-#define SHIP_HEIGHT 3
-
-// local objects -------------------------------------------------------------
-class Ship : public QActive { // extend the QActive class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
- uint16_t m_score;
-
-public:
- Ship(void) : QActive((QStateHandler)&Ship::initial),
- m_x(GAME_SHIP_X), m_y(GAME_SHIP_Y) {}
-private:
- static QState initial (Ship *me, QEvt const *e);
- static QState active (Ship *me, QEvt const *e);
- static QState parked (Ship *me, QEvt const *e);
- static QState flying (Ship *me, QEvt const *e);
- static QState exploding(Ship *me, QEvt const *e);
-};
-
-static Ship l_ship; // the sole instance of the Ship active object
-
-// global objects ------------------------------------------------------------
-QActive * const AO_Ship = &l_ship; // opaque pointer to Ship AO
-
-// HSM definition ------------------------------------------------------------
-//............................................................................
-QState Ship::initial(Ship *me, QEvt const *) {
-
- me->subscribe(TIME_TICK_SIG);
- me->subscribe(PLAYER_TRIGGER_SIG);
-
-
- QS_OBJ_DICTIONARY(&l_ship); // object dictionary for Ship object
-
- QS_FUN_DICTIONARY(&Ship::initial); // function dictionaries for Ship HSM
- QS_FUN_DICTIONARY(&Ship::active);
- QS_FUN_DICTIONARY(&Ship::parked);
- QS_FUN_DICTIONARY(&Ship::flying);
- QS_FUN_DICTIONARY(&Ship::exploding);
-
- QS_SIG_DICTIONARY(PLAYER_SHIP_MOVE_SIG, &l_ship); // local signals
- QS_SIG_DICTIONARY(TAKE_OFF_SIG, &l_ship);
- QS_SIG_DICTIONARY(HIT_WALL_SIG, &l_ship);
- QS_SIG_DICTIONARY(HIT_MINE_SIG, &l_ship);
- QS_SIG_DICTIONARY(DESTROYED_MINE_SIG, &l_ship);
-
- return Q_TRAN(&Ship::active); // top-most initial transition
-}
-//............................................................................
-QState Ship::active(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: { // nested initial transition
- return Q_TRAN(&Ship::parked);
- }
- case PLAYER_SHIP_MOVE_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Ship::parked(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case TAKE_OFF_SIG: { // permition to take off granted
- return Q_TRAN(&Ship::flying);
- }
- }
- return Q_SUPER(&Ship::active);
-}
-//............................................................................
-QState Ship::flying(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- ScoreEvt *sev;
-
- me->m_score = 0; // reset the score
- sev = Q_NEW(ScoreEvt, SCORE_SIG);
- sev->score = me->m_score;
- AO_Tunnel->POST(sev, me);
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- // tell the Tunnel to draw the Ship and test for hits
- ObjectImageEvt *oie = Q_NEW(ObjectImageEvt, SHIP_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = SHIP_BMP;
- AO_Tunnel->POST(oie, me);
-
- ++me->m_score; // increment the score for surviving another tick
-
- if ((me->m_score % 10) == 0) { // is the score "round"?
- ScoreEvt *sev = Q_NEW(ScoreEvt, SCORE_SIG);
- sev->score = me->m_score;
- AO_Tunnel->POST(sev, me);
- }
-
- return Q_HANDLED();
- }
- case PLAYER_TRIGGER_SIG: { // trigger the Missile
- ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, MISSILE_FIRE_SIG);
- ope->x = me->m_x;
- ope->y = me->m_y + SHIP_HEIGHT - 1;
- AO_Missile->POST(ope, me);
- return Q_HANDLED();
- }
- case DESTROYED_MINE_SIG: {
- me->m_score += ((ScoreEvt const *)e)->score;
- // the score will be sent to the Tunnel by the next TIME_TICK
- return Q_HANDLED();
- }
- case HIT_WALL_SIG:
- case HIT_MINE_SIG: {
- return Q_TRAN(&Ship::exploding);
- }
- }
- return Q_SUPER(&Ship::active);
-}
-//............................................................................
-QState Ship::exploding(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if (me->m_exp_ctr < 15) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr;
-
- // tell the Tunnel to draw the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- oie->x = me->m_x; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + SHIP_HEIGHT);
- AO_Tunnel->POST(oie, me);
- }
- else {
- ScoreEvt *gameOver = Q_NEW(ScoreEvt, GAME_OVER_SIG);
- gameOver->score = me->m_score;
- AO_Tunnel->POST(gameOver, me);
- return Q_TRAN(&Ship::parked);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Ship::active);
-}
diff --git a/examples/80x86/dos/watcom/l/game/tunnel.cpp b/examples/80x86/dos/watcom/l/game/tunnel.cpp
deleted file mode 100644
index 44946cd8..00000000
--- a/examples/80x86/dos/watcom/l/game/tunnel.cpp
+++ /dev/null
@@ -1,787 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "game.h"
-#include "bsp.h"
-
-#include // for memmove() and memcpy()
-
-Q_DEFINE_THIS_FILE
-
-// Tunnel Active Object ------------------------------------------------------
-class Tunnel : public QActive { // extend the QActive class
-
- QTimeEvt m_blinkTimeEvt; // time event for blinking
- QTimeEvt m_screenTimeEvt; // time event for screen changes
-
- QHsm *m_mines[GAME_MINES_MAX]; // active mines
- QHsm *m_mine1_pool[GAME_MINES_MAX];
- QHsm *m_mine2_pool[GAME_MINES_MAX];
-
- uint8_t m_blink_ctr; // blink counter
-
- uint8_t m_last_mine_x;
- uint8_t m_last_mine_y;
-
- uint8_t m_wall_thickness_top;
- uint8_t m_wall_thickness_bottom;
- uint8_t m_minimal_gap;
-
-public:
- Tunnel(void);
-
-private: // HSM
- static QState initial (Tunnel *me, QEvt const *e);
- static QState final (Tunnel *me, QEvt const *e);
- static QState active (Tunnel *me, QEvt const *e);
- static QState playing (Tunnel *me, QEvt const *e);
- static QState demo (Tunnel *me, QEvt const *e);
- static QState game_over (Tunnel *me, QEvt const *e);
- static QState screen_saver (Tunnel *me, QEvt const *e);
- static QState screen_saver_hide(Tunnel *me, QEvt const *e);
- static QState screen_saver_show(Tunnel *me, QEvt const *e);
-
-private: // Helper functions
- void advance(void);
- void plantMine(void);
- void addImageAt(uint8_t bmp, uint8_t x, int8_t y);
- void dispatchToAllMines(QEvt const *e);
- uint8_t isWallHit(uint8_t bmp, uint8_t x_pos, uint8_t y_pos);
-};
-
-static void randomSeed(uint32_t seed); // random seed
-static uint32_t random(void); // pseudo-random generator
-
-static Tunnel l_tunnel; // the sole instance of the Tunnel active object
-
-// global objects ------------------------------------------------------------
-QActive * const AO_Tunnel = &l_tunnel; // opaque pointer to Tunnel
-
-// local objects -------------------------------------------------------------
-static uint32_t l_rnd; // random seed
-static uint8_t l_walls[GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8];
-static uint8_t l_frame[GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8];
-
-
-//............................................................................
-Tunnel::Tunnel(void) : QActive((QStateHandler)&Tunnel::initial),
- m_blinkTimeEvt(BLINK_TIMEOUT_SIG),
- m_screenTimeEvt(SCREEN_TIMEOUT_SIG),
- m_last_mine_x(0),
- m_last_mine_y(0)
-{
- for (uint8_t n = 0; n < GAME_MINES_MAX; ++n) {
- m_mine1_pool[n] = Mine1_getInst(n); // initialize mine1-type pool
- m_mine2_pool[n] = Mine2_getInst(n); // initialize mine2-type pool
- m_mines[n] = (QHsm *)0; // mine 'n' is unused
- }
-}
-
-// HSM definition ------------------------------------------------------------
-QState Tunnel::initial(Tunnel *me, QEvt const *) {
-
- for (uint8_t n = 0; n < GAME_MINES_MAX; ++n) {
- me->m_mine1_pool[n]->init(); // take the initial tran. for Mine1
- me->m_mine2_pool[n]->init(); // take the initial tran. for Mine2
- }
-
- randomSeed(1234); // seed the pseudo-random generator
-
- me->subscribe(TIME_TICK_SIG);
- me->subscribe(PLAYER_TRIGGER_SIG);
- me->subscribe(PLAYER_QUIT_SIG);
-
- QS_OBJ_DICTIONARY(&l_tunnel); // object dictionary for Tunnel object
- QS_OBJ_DICTIONARY(&l_tunnel.m_blinkTimeEvt);
- QS_OBJ_DICTIONARY(&l_tunnel.m_screenTimeEvt);
-
- QS_FUN_DICTIONARY(&Tunnel::initial); // fun. dictionaries for Tunnel HSM
- QS_FUN_DICTIONARY(&Tunnel::final);
- QS_FUN_DICTIONARY(&Tunnel::active);
- QS_FUN_DICTIONARY(&Tunnel::playing);
- QS_FUN_DICTIONARY(&Tunnel::demo);
- QS_FUN_DICTIONARY(&Tunnel::game_over);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver_hide);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver_show);
-
- QS_SIG_DICTIONARY(BLINK_TIMEOUT_SIG, &l_tunnel); // local signals
- QS_SIG_DICTIONARY(SCREEN_TIMEOUT_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MINE_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(EXPLOSION_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(SCORE_SIG, &l_tunnel);
-
- return Q_TRAN(&Tunnel::demo);
-}
-//............................................................................
-QState Tunnel::final(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // clear the screen
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- QF::stop(); // stop QF and cleanup
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Tunnel::active(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_DISABLED_SIG: {
- Q_ASSERT((((MineEvt const *)e)->id < GAME_MINES_MAX)
- && (me->m_mines[((MineEvt const *)e)->id] != (QHsm *)0));
- me->m_mines[((MineEvt const *)e)->id] = (QHsm *)0;
- return Q_HANDLED();
- }
- case PLAYER_QUIT_SIG: {
- return Q_TRAN(&Tunnel::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Tunnel::demo(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_last_mine_x = 0; // last mine at right edge of the tunnel
- me->m_last_mine_y = 0;
- // set the tunnel properties...
- me->m_wall_thickness_top = 0;
- me->m_wall_thickness_bottom = 0;
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3;
-
- // erase the tunnel walls
- memset(l_walls, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-
-
- me->m_blinkTimeEvt.postEvery(me, BSP_TICKS_PER_SEC/2); // 1/2 sec
-
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC*20); // 20 sec
-
- me->m_blink_ctr = 0; // init the blink counter
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_blinkTimeEvt.disarm();
- me->m_screenTimeEvt.disarm();
- return Q_HANDLED();
- }
- case BLINK_TIMEOUT_SIG: {
- me->m_blink_ctr ^= 1; // toggle the blink cunter
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver);
- }
- case TIME_TICK_SIG: {
- me->advance();
- if (me->m_blink_ctr != 0) {
- // add the text bitmap into the frame buffer
- me->addImageAt(PRESS_BUTTON_BMP,
- (GAME_SCREEN_WIDTH - 55)/2,
- (GAME_SCREEN_HEIGHT - 8)/2);
- }
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- return Q_HANDLED();
- }
- case PLAYER_TRIGGER_SIG: {
- return Q_TRAN(&Tunnel::playing);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::game_over(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_blinkTimeEvt.postEvery(me, BSP_TICKS_PER_SEC/2); // 1/2 sec
- me->m_screenTimeEvt.postIn(me,
- BSP_TICKS_PER_SEC*5); // 5 sec
- me->m_blink_ctr = 0;
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*9)/2, 0, "Game Over");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_blinkTimeEvt.disarm();
- me->m_screenTimeEvt.disarm();
- BSP_updateScore(0); // update the score on the display
- return Q_HANDLED();
- }
- case BLINK_TIMEOUT_SIG: {
- me->m_blink_ctr ^= 1; // toggle the blink couner
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*9)/2, 0,
- ((me->m_blink_ctr == 0)
- ? "Game Over"
- : " "));
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::demo);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::playing(Tunnel *me, QEvt const *e) {
- uint8_t x;
- int8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3;
-
- // erase the walls
- memset(l_walls, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-
- static QEvt const takeoff = { TAKE_OFF_SIG, 0 };
- AO_Ship->POST(&takeoff, me); // post the TAKEOFF sig
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- QEvt recycle;
- recycle.sig = MINE_RECYCLE_SIG;
- me->dispatchToAllMines(&recycle); // recycle all Mines
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- // render this frame on the display
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
-
- me->advance();
- me->plantMine();
- me->dispatchToAllMines(e);
-
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG:
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (int8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // did the Ship/Missile hit the tunnel wall?
- if (me->isWallHit(bmp, x, y)) {
- static QEvt const hit = { HIT_WALL_SIG, 0};
- if (e->sig == SHIP_IMG_SIG) {
- AO_Ship->POST(&hit, me);
- }
- else {
- AO_Missile->POST(&hit, me);
- }
- }
- me->addImageAt(bmp, x, y);
- me->dispatchToAllMines(e); // let Mines check for hits
- return Q_HANDLED();
- }
- case MINE_IMG_SIG:
- case EXPLOSION_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (int8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- me->addImageAt(bmp, x, y);
- return Q_HANDLED();
- }
- case SCORE_SIG: {
- BSP_updateScore(((ScoreEvt const *)e)->score);
-
- // increase difficulty of the game:
- // the tunnel gets narrower as the score goes up
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3
- - ((ScoreEvt const *)e)->score/2000;
- return Q_HANDLED();
- }
- case GAME_OVER_SIG: {
- uint16_t score = ((ScoreEvt const *)e)->score;
- char str[5];
-
- BSP_updateScore(score);
-
- // clear the screen
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
-
- // Output the final score to the screen
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*10)/2, 1, "Score:");
- str[4] = '\0'; // zero-terminate the string
- str[3] = '0' + (score % 10); score /= 10;
- str[2] = '0' + (score % 10); score /= 10;
- str[1] = '0' + (score % 10); score /= 10;
- str[0] = '0' + (score % 10);
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*10)/2 + 6*6, 1, str);
-
- return Q_TRAN(&Tunnel::game_over);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-// A random-pixel screen saver to avoid damage to the display
-QState Tunnel::screen_saver(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_hide);
- }
- case PLAYER_TRIGGER_SIG: {
- return Q_TRAN(&Tunnel::demo);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::screen_saver_hide(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_displayOff(); // power down the display
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC*3); // 3s timeout
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_screenTimeEvt.disarm();
- BSP_displayOn(); // power up the display
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_show);
- }
- }
- return Q_SUPER(&Tunnel::screen_saver);
-}
-//............................................................................
-QState Tunnel::screen_saver_show(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // clear the screen frame buffer
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- uint32_t rnd = random();
- me->addImageAt(PRESS_BUTTON_BMP,
- (uint8_t)(rnd % (GAME_SCREEN_WIDTH - 55)),
- (int8_t) (rnd % (GAME_SCREEN_HEIGHT - 8)));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC/3); // 1/3 sec
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_screenTimeEvt.disarm();
- // clear the screen frame buffer
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_hide);
- }
- }
- return Q_SUPER(&Tunnel::screen_saver);
-}
-
-// helper functions ----------------------------------------------------------
-//
-// The bitmap for the "Press Button" text:
-//
-// xxx.........................xxx........x...x...........
-// x..x........................x..x.......x...x...........
-// x..x.x.xx..xx...xxx..xxx....x..x.x..x.xxx.xxx..xx..xxx.
-// xxx..xx...x..x.x....x.......xxx..x..x..x...x..x..x.x..x
-// x....x....xxxx..xx...xx.....x..x.x..x..x...x..x..x.x..x
-// x....x....x.......x....x....x..x.x..x..x...x..x..x.x..x
-// x....x.....xxx.xxx..xxx.....xxx...xxx...x...x..xx..x..x
-// .......................................................
-///
-static uint8_t const press_button_bits[] = {
- 0x7F, 0x09, 0x09, 0x06, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x00,
- 0x38, 0x54, 0x54, 0x58, 0x00, 0x48, 0x54, 0x54, 0x24, 0x00,
- 0x48, 0x54, 0x54, 0x24, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x49,
- 0x49, 0x36, 0x00, 0x3C, 0x40, 0x40, 0x7C, 0x00, 0x04, 0x3F,
- 0x44, 0x00, 0x04, 0x3F, 0x44, 0x00, 0x38, 0x44, 0x44, 0x38,
- 0x00, 0x7C, 0x04, 0x04, 0x78
-};
-
-// bitmap of the Ship:
-//
-// x....
-// xxx..
-// xxxxx
-///
-static uint8_t const ship_bits[] = {
- 0x07, 0x06, 0x06, 0x04, 0x04
-};
-
-// bitmap of the Missile:
-//
-// xxx
-///
-static uint8_t const missile_bits[] = {
- 0x01, 0x01, 0x01
-};
-
-// bitmap of the Mine type-1:
-//
-// .x.
-// xxx
-// .x.
-///
-static uint8_t const mine1_bits[] = {
- 0x02, 0x07, 0x02
-};
-
-// bitmap of the Mine type-2:
-//
-// x..x
-// .xx.
-// .xx.
-// x..x
-///
-static uint8_t const mine2_bits[] = {
- 0x09, 0x06, 0x06, 0x09
-};
-
-// Mine type-2 is nastier than Mine type-1. The type-2 mine can
-// hit the Ship with any of its "tentacles". However, it can be
-// destroyed by the Missile only by hitting its center, defined as
-// the following bitmap:
-//
-// ....
-// .xx.
-// .xx.
-// ....
-///
-static uint8_t const mine2_missile_bits[] = {
- 0x00, 0x06, 0x06, 0x00
-};
-
-// The bitmap of the explosion stage 0:
-//
-// .......
-// .......
-// ...x...
-// ..x.x..
-// ...x...
-// .......
-// .......
-///
-static uint8_t const explosion0_bits[] = {
- 0x00, 0x00, 0x08, 0x14, 0x08, 0x00, 0x00
-};
-
-// The bitmap of the explosion stage 1:
-//
-// .......
-// .......
-// ..x.x..
-// ...x...
-// ..x.x..
-// .......
-// .......
-///
-static uint8_t const explosion1_bits[] = {
- 0x00, 0x00, 0x14, 0x08, 0x14, 0x00, 0x00
-};
-
-// The bitmap of the explosion stage 2:
-//
-// .......
-// .x...x.
-// ..x.x..
-// ...x...
-// ..x.x..
-// .x...x.
-// .......
-///
-static uint8_t const explosion2_bits[] = {
- 0x00, 0x22, 0x14, 0x08, 0x14, 0x22, 0x00
-};
-
-// The bitmap of the explosion stage 3:
-//
-// x..x..x
-// .x.x.x.
-// ..x.x..
-// xx.x.xx
-// ..x.x..
-// .x.x.x.
-// x..x..x
-///
-static uint8_t const explosion3_bits[] = {
- 0x49, 0x2A, 0x14, 0x6B, 0x14, 0x2A, 0x49
-};
-
-struct Bitmap { // the auxiliary structure to hold const bitmaps
- uint8_t const *bits; // the bits in the bitmap
- uint8_t width; // the width of the bitmap
-};
-
-static Bitmap const l_bitmap[MAX_BMP] = {
- { press_button_bits, Q_DIM(press_button_bits) },
- { ship_bits, Q_DIM(ship_bits) },
- { missile_bits, Q_DIM(missile_bits) },
- { mine1_bits, Q_DIM(mine1_bits) },
- { mine2_bits, Q_DIM(mine2_bits) },
- { mine2_missile_bits, Q_DIM(mine2_missile_bits) },
- { explosion0_bits, Q_DIM(explosion0_bits) },
- { explosion1_bits, Q_DIM(explosion1_bits) },
- { explosion2_bits, Q_DIM(explosion2_bits) },
- { explosion3_bits, Q_DIM(explosion3_bits) }
-};
-
-//............................................................................
-uint32_t random(void) { // a very cheap pseudo-random-number generator
- // "Super-Duper" Linear Congruential Generator (LCG)
- // LCG(2^32, 3*7*11*13*23, 0, seed)
- l_rnd = l_rnd * (3*7*11*13*23);
- return l_rnd >> 8;
-}
-//............................................................................
-void randomSeed(uint32_t seed) {
- l_rnd = seed;
-}
-//............................................................................
-void Tunnel::advance(void) {
- uint32_t rnd;
- uint32_t bmp1; // bimap representing 1 column of the image
-
- rnd = (random() & 0xFF);
-
- // reduce the top wall thickness 18.75% of the time
- if ((rnd < 48) && (m_wall_thickness_top > 0)) {
- --m_wall_thickness_top;
- }
-
- // reduce the bottom wall thickness 18.75% of the time
- if ((rnd > 208) && (m_wall_thickness_bottom > 0)) {
- --m_wall_thickness_bottom;
- }
-
- rnd = (random() & 0xFF);
-
- // grow the top wall thickness 18.75% of the time
- if ((rnd < 48)
- && ((GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom) > m_minimal_gap)
- && ((m_last_mine_x < (GAME_SCREEN_WIDTH - 5))
- || (m_last_mine_y > (m_wall_thickness_top + 1))))
- {
- ++m_wall_thickness_top;
- }
-
- // grow the bottom wall thickness 18.75% of the time
- if ((rnd > 208)
- && ((GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom) > m_minimal_gap)
- && ((m_last_mine_x < (GAME_SCREEN_WIDTH - 5))
- || (m_last_mine_y + 1
- < (GAME_SCREEN_HEIGHT - m_wall_thickness_bottom))))
- {
- ++m_wall_thickness_bottom;
- }
-
- // advance the Tunnel by 1 game step to the left
- memmove(l_walls, l_walls + GAME_SPEED_X,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8) - GAME_SPEED_X);
-
- bmp1 = (~(~0 << m_wall_thickness_top))
- | (~0 << (GAME_SCREEN_HEIGHT
- - m_wall_thickness_bottom));
-
- l_walls[GAME_SCREEN_WIDTH - 1] = (uint8_t)bmp1;
- l_walls[GAME_SCREEN_WIDTH + GAME_SCREEN_WIDTH - 1]
- = (uint8_t)(bmp1 >> 8);
-
- // copy the Tunnel layer to the main frame buffer
- memcpy(l_frame, l_walls, (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-}
-//............................................................................
-void Tunnel::plantMine(void) {
- uint32_t rnd = (random() & 0xFF);
-
- if (m_last_mine_x > 0) {
- --m_last_mine_x; // shift the last Mine 1 position to the left
- }
- // last mine far enough?
- if ((m_last_mine_x + GAME_MINES_DIST_MIN < GAME_SCREEN_WIDTH)
- && (rnd < 8)) // place the mines only 5% of the time
- {
- uint8_t n;
- for (n = 0; n < Q_DIM(m_mines); ++n) { // look for disabled mines
- if (m_mines[n] == (QHsm *)0) {
- break;
- }
- }
- if (n < Q_DIM(m_mines)) { // a disabled Mine found?
- ObjectPosEvt ope; // event to dispatch to the Mine
-
- rnd = (random() & 0xFFFF);
-
- if ((rnd & 1) == 0) { // choose the type of the mine
- m_mines[n] = m_mine1_pool[n];
- }
- else {
- m_mines[n] = m_mine2_pool[n];
- }
-
- // new Mine is planted in the last column of the tunnel
- m_last_mine_x = GAME_SCREEN_WIDTH;
-
- // choose a random y-position for the Mine in the Tunnel
- rnd %= (GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom - 4);
- m_last_mine_y = m_wall_thickness_top + 2 + rnd;
-
- ope.sig = MINE_PLANT_SIG;
- ope.x = m_last_mine_x;
- ope.y = m_last_mine_y;
- m_mines[n]->dispatch(&ope); // direct dispatch
- }
- }
-}
-//............................................................................
-void Tunnel::dispatchToAllMines(QEvt const *e) {
- uint8_t n;
- for (n = 0; n < GAME_MINES_MAX; ++n) {
- if (m_mines[n] != (QHsm *)0) { // is the mine used?
- m_mines[n]->dispatch(e);
- }
- }
-}
-//............................................................................
-void Tunnel::addImageAt(uint8_t bmp, uint8_t x_pos, int8_t y_pos) {
- uint8_t x; // the x-index of the ship image
- uint8_t w; // the width of the image
-
- Q_REQUIRE(bmp < Q_DIM(l_bitmap));
-
- w = l_bitmap[bmp].width;
- if (w > GAME_SCREEN_WIDTH - x_pos) {
- w = GAME_SCREEN_WIDTH - x_pos;
- }
- for (x = 0; x < w; ++x) {
- uint32_t bmp1;
- if (y_pos >= 0) {
- bmp1 = (l_bitmap[bmp].bits[x] << (uint8_t)y_pos);
- }
- else {
- bmp1 = (l_bitmap[bmp].bits[x] >> (uint8_t)(-y_pos));
- }
- l_frame[x_pos + x] |= (uint8_t)bmp1;
- l_frame[x_pos + x + GAME_SCREEN_WIDTH] |= (uint8_t)(bmp1 >> 8);
- }
-}
-//............................................................................
-uint8_t Tunnel::isWallHit(uint8_t bmp, uint8_t x_pos, uint8_t y_pos) {
- uint8_t x;
- uint8_t w; // the width of the image
-
- Q_REQUIRE(bmp < Q_DIM(l_bitmap));
-
- w = l_bitmap[bmp].width;
- if (w > GAME_SCREEN_WIDTH - x_pos) {
- w = GAME_SCREEN_WIDTH - x_pos;
- }
- for (x = 0; x < w; ++x) {
- uint32_t bmp1 = ((uint32_t)l_bitmap[bmp].bits[x] << y_pos);
- if (((l_walls[x_pos + x] & (uint8_t)bmp1) != 0)
- || ((l_walls[x_pos + x + GAME_SCREEN_WIDTH]
- & (uint8_t)(bmp1 >> 8)) != 0))
- {
- return (uint8_t)1;
- }
- }
- return (uint8_t)0;
-}
-//............................................................................
-uint8_t do_bitmaps_overlap(uint8_t bmp_id1, uint8_t x1, uint8_t y1,
- uint8_t bmp_id2, uint8_t x2, uint8_t y2)
-{
- uint8_t x;
- uint8_t x0;
- uint8_t w;
- uint32_t bits1;
- uint32_t bits2;
- Bitmap const *bmp1;
- Bitmap const *bmp2;
-
- Q_REQUIRE((bmp_id1 < Q_DIM(l_bitmap)) && (bmp_id2 < Q_DIM(l_bitmap)));
-
- bmp1 = &l_bitmap[bmp_id1];
- bmp2 = &l_bitmap[bmp_id2];
-
- // is the incoming object starting to overlap the Mine bitmap?
- if ((x1 <= x2) && (x1 + bmp2->width > x2)) {
- x0 = x2 - x1;
- w = x1 + bmp2->width - x2;
- if (w > bmp1->width) {
- w = bmp1->width;
- }
- for (x = 0; x < w; ++x) { // scan over the overlapping columns
- bits1 = ((uint32_t)bmp2->bits[x + x0] << y2);
- bits2 = ((uint32_t)bmp1->bits[x] << y1);
- if ((bits1 & bits2) != 0) { // do the bits overlap?
- return (uint8_t)1; // yes!
- }
- }
- }
- else {
- if ((x1 > x2) && (x2 + bmp1->width > x1)) {
- x0 = x1 - x2;
- w = x2 + bmp1->width - x1;
- if (w > bmp2->width) {
- w = bmp2->width;
- }
- for (x = 0; x < w; ++x) { // scan over the overlapping columns
- bits1 = ((uint32_t)bmp1->bits[x + x0] << y1);
- bits2 = ((uint32_t)bmp2->bits[x] << y2);
- if ((bits1 & bits2) != 0) { // do the bits overlap?
- return (uint8_t)1; // yes!
- }
- }
- }
- }
- return (uint8_t)0; // the bitmaps do not overlap
-}
diff --git a/examples/80x86/dos/watcom/l/game/video.cpp b/examples/80x86/dos/watcom/l/game/video.cpp
deleted file mode 100644
index 6a35c1fd..00000000
--- a/examples/80x86/dos/watcom/l/game/video.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 02, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "video.h"
-
-#include
-#include
-
-#define VIDEO_BASE 0xB800
-#define VIDEO_WIDTH 80
-#define VIDEO_HEIGHT 25
-
-//............................................................................
-void Video::clearScreen(uint8_t bgColor) {
- system("CLS");
- clearRect(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT, bgColor);
-}
-//............................................................................
-void Video::clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor)
-{
- for ( ; y1 < y2; ++y1) {
- uint8_t x;
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y1 * VIDEO_WIDTH) + x1) * 2));
- for (x = x1; x < x2; ++x) {
- pscr[0] = ' '; // Put space in video RAM
- pscr[1] = bgColor; // Put video attribute in video RAM
- pscr += 2;
- }
- }
-}
-//............................................................................
-void Video::printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str)
-{
- // calculate position on the video RAM (VGA)
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) * 2));
- while (*str != (uint8_t)0) {
- pscr[0] = *str++; // Put character in video RAM
- pscr[1] &= ~0x0F; // clear the foreground color
- pscr[1] |= color; // Put video attribute in video RAM
- pscr += 2;
- }
-}
-//............................................................................
-void Video::printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num) {
- char buf[4];
- buf[3] = (char)0;
- buf[2] = (char)('0' + num % 10);
- num /= 10;
- buf[1] = (char)('0' + num % 10);
- num /= 10;
- buf[0] = (char)('0' + num % 10);
- if (buf[0] == '0') {
- buf[0] = ' ';
- }
- printStrAt(x, y, color, buf);
-}
-//............................................................................
-void Video::drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height)
-{
- uint8_t far *pscrX = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) << 1));
- uint8_t ix, iy;
- uint8_t w = width;
- uint8_t h = height;
-
- // perform the clipping
- if (x > VIDEO_WIDTH) {
- x = VIDEO_WIDTH;
- }
- if (y > VIDEO_HEIGHT) {
- y = VIDEO_HEIGHT;
- }
- if (w > VIDEO_WIDTH - x) {
- w = VIDEO_WIDTH - x;
- }
- if (h > VIDEO_HEIGHT - y) {
- h = VIDEO_HEIGHT - y;
- }
-
- for (ix = 0; ix < w; ++ix, pscrX += 2) { // loop over x
- uint8_t far *pscrXY = pscrX;
- for (iy = 0; iy < h; ++iy, pscrXY += 2*VIDEO_WIDTH) {
- static uint8_t const pixel[2] = { 0x20, 0xDB };
- uint8_t byte = bitmap[ix + (iy >> 3)*width];
- *pscrXY = pixel[(byte >> (iy & 0x7)) & 1];
- }
- }
-}
-//............................................................................
-void Video::drawStringAt(uint8_t x, uint8_t y, char const *str) {
- static uint8_t const font5x7[95][5] = {
- { 0x00, 0x00, 0x00, 0x00, 0x00 }, // ' '
- { 0x00, 0x00, 0x4F, 0x00, 0x00 }, // !
- { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
- { 0x14, 0x7F, 0x14, 0x7F, 0x14 }, // #
- { 0x24, 0x2A, 0x7F, 0x2A, 0x12 }, // $
- { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %
- { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
- { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
- { 0x00, 0x1C, 0x22, 0x41, 0x00 }, // (
- { 0x00, 0x41, 0x22, 0x1C, 0x00 }, // )
- { 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
- { 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
- { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,
- { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
- { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
- { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
- { 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0
- { 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
- { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
- { 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
- { 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
- { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
- { 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
- { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
- { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
- { 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
- { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
- { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
- { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
- { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
- { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
- { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
- { 0x32, 0x49, 0x79, 0x41, 0x3E }, // @
- { 0x7E, 0x11, 0x11, 0x11, 0x7E }, // A
- { 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
- { 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
- { 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
- { 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
- { 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
- { 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
- { 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
- { 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
- { 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
- { 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
- { 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
- { 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
- { 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
- { 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
- { 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
- { 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
- { 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
- { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
- { 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
- { 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
- { 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
- { 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
- { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
- { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
- { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
- { 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
- { 0x02, 0x04, 0x08, 0x10, 0x20 }, /* \ */
- { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
- { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
- { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
- { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `
- { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
- { 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
- { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
- { 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
- { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
- { 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
- { 0x0C, 0x52, 0x52, 0x52, 0x3E }, // g
- { 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
- { 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
- { 0x20, 0x40, 0x44, 0x3D, 0x00 }, // j
- { 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
- { 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
- { 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
- { 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
- { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
- { 0x7C, 0x14, 0x14, 0x14, 0x08 }, // p
- { 0x08, 0x14, 0x14, 0x18, 0x7C }, // q
- { 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
- { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
- { 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
- { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
- { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
- { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
- { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
- { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y
- { 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z
- { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {
- { 0x00, 0x00, 0x7F, 0x00, 0x00 }, // |
- { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }
- { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
- };
-
- while (*str != '\0') {
- drawBitmapAt(x, y, font5x7[*str - ' '], 5, 8);
- ++str;
- x += 6;
- }
-}
diff --git a/examples/80x86/dos/watcom/l/game/video.h b/examples/80x86/dos/watcom/l/game/video.h
deleted file mode 100644
index 2b221a63..00000000
--- a/examples/80x86/dos/watcom/l/game/video.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef video_h
-#define video_h
-
-class Video {
-public:
- enum VideoColor {
- // foreground colors ...
- FGND_BLACK = 0x00,
- FGND_BLUE = 0x01,
- FGND_GREEN = 0x02,
- FGND_CYAN = 0x03,
- FGND_RED = 0x04,
- FGND_PURPLE = 0x05,
- FGND_BROWN = 0x06,
- FGND_LIGHT_GRAY = 0x07,
- FGND_DARK_GRAY = 0x08,
- FGND_LIGHT_BLUE = 0x09,
- FGND_LIGHT_GREEN = 0x0A,
- FGND_LIGHT_CYAN = 0x0B,
- FGND_LIGHT_RED = 0x0C,
- FGND_LIGHT_PURPLE = 0x0D,
- FGND_YELLOW = 0x0E,
- FGND_WHITE = 0x0F,
- // background colors ...
- BGND_BLACK = 0x00,
- BGND_BLUE = 0x10,
- BGND_GREEN = 0x20,
- BGND_CYAN = 0x30,
- BGND_RED = 0x40,
- BGND_PURPLE = 0x50,
- BGND_BROWN = 0x60,
- BGND_LIGHT_GRAY = 0x70,
-
- BGND_BLINK = 0x80
- };
- static void clearScreen(uint8_t bgColor);
- static void clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor);
- static void printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str);
- static void printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num);
-
- static void drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height);
-
- static void drawStringAt(uint8_t x, uint8_t y, char const *str);
-};
-
-#endif // video_h
-
diff --git a/examples/80x86/dos/watcom/l/history/history.cpp b/examples/80x86/dos/watcom/l/history/history.cpp
deleted file mode 100644
index fd93eecd..00000000
--- a/examples/80x86/dos/watcom/l/history/history.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-//****************************************************************************
-// Product: History state pattern example
-// Last Updated for Version: 5.2.0
-// Date of the Last Update: Dec 27, 2013
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qep_port.h"
-#include "qassert.h"
-
-#include
-#include
-#include
-
-Q_DEFINE_THIS_FILE
-
-using namespace QP;
-
-//............................................................................
-enum ToasterOvenSignals {
- OPEN_SIG = Q_USER_SIG,
- CLOSE_SIG,
- TOAST_SIG,
- BAKE_SIG,
- OFF_SIG,
- TERMINATE_SIG // terminate the application
-};
-//............................................................................
-class ToasterOven : public QHsm {
-private:
- QStateHandler m_doorClosed_history;
-
-public:
- ToasterOven() : QHsm((QStateHandler)&ToasterOven::initial) { }
-
-private:
- static QState initial (ToasterOven *me, QEvt const *e);
- static QState doorClosed(ToasterOven *me, QEvt const *e);
- static QState off (ToasterOven *me, QEvt const *e);
- static QState heating (ToasterOven *me, QEvt const *e);
- static QState toasting (ToasterOven *me, QEvt const *e);
- static QState baking (ToasterOven *me, QEvt const *e);
- static QState doorOpen (ToasterOven *me, QEvt const *e);
- static QState final (ToasterOven *me, QEvt const *e);
-};
-//............................................................................
-QState ToasterOven::initial(ToasterOven *me, QEvt const *) {
- me->m_doorClosed_history = Q_STATE_CAST(&ToasterOven::off);
- return Q_TRAN(&ToasterOven::doorClosed);
-}
-//............................................................................
-QState ToasterOven::final(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> final\n");
- printf("\nBye!Bye!\n");
- _exit(0); // exit the application
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState ToasterOven::doorClosed(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("door-Closed;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_doorClosed_history = me->state(); //<-save the HISTORY
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- return Q_TRAN(&ToasterOven::off);
- }
- case OPEN_SIG: {
- return Q_TRAN(&ToasterOven::doorOpen);
- }
- case TOAST_SIG: {
- return Q_TRAN(&ToasterOven::toasting);
- }
- case BAKE_SIG: {
- return Q_TRAN(&ToasterOven::baking);
- }
- case OFF_SIG: {
- return Q_TRAN(&ToasterOven::off);
- }
- case TERMINATE_SIG: {
- return Q_TRAN(&ToasterOven::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState ToasterOven::off(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("toaster-Off;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&ToasterOven::doorClosed);
-}
-//............................................................................
-QState ToasterOven::heating(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("heater-On;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- printf("heater-Off;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&ToasterOven::doorClosed);
-}
-//............................................................................
-QState ToasterOven::toasting(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("toasting;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&ToasterOven::heating);
-}
-//............................................................................
-QState ToasterOven::baking(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("baking;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&ToasterOven::heating);
-}
-//............................................................................
-QState ToasterOven::doorOpen(ToasterOven *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("door-Open,lamp-On;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- printf("lamp-Off;");
- return Q_HANDLED();
- }
- case CLOSE_SIG: {
- return Q_TRAN(me->m_doorClosed_history);//<-tranisition to HISTORY
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-// test harness ==============================================================
-
-#include
-
-static ToasterOven l_test;
-
-int main() {
- printf("History state pattern\nQEP version: %s\n"
- "Press 'o' to OPEN the door\n"
- "Press 'c' to CLOSE the door\n"
- "Press 't' to start TOASTING\n"
- "Press 'b' to start BAKING\n"
- "Press 'f' to turn the oven OFF\n"
- "Press ESC to quit...\n",
- QEP::getVersion());
-
- l_test.init(); // trigger the initial transition before dispatching events
-
- for (;;) {
- printf("\n");
- uint8_t c = (uint8_t)_getch(); // read one character from the console
- printf("%c: ", c);
-
- QEvt e;
- switch (c) {
- case 'o': e.sig = OPEN_SIG; break;
- case 'c': e.sig = CLOSE_SIG; break;
- case 't': e.sig = TOAST_SIG; break;
- case 'b': e.sig = BAKE_SIG; break;
- case 'f': e.sig = OFF_SIG; break;
- case 0x1B: e.sig = TERMINATE_SIG; break;
- }
- l_test.dispatch(&e); // dispatch the event into the state machine
- }
- return 0;
-}
-//............................................................................
-void Q_onAssert(char const Q_ROM * const file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- _exit(-1);
-}
diff --git a/examples/80x86/dos/watcom/l/history/inc_qp.rsp b/examples/80x86/dos/watcom/l/history/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/history/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/history/link_dbg.rsp b/examples/80x86/dos/watcom/l/history/link_dbg.rsp
deleted file mode 100644
index f4081852..00000000
--- a/examples/80x86/dos/watcom/l/history/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\history.exe File dbg\history.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/history/make.bat b/examples/80x86/dos/watcom/l/history/make.bat
deleted file mode 100644
index a5db10e9..00000000
--- a/examples/80x86/dos/watcom/l/history/make.bat
+++ /dev/null
@@ -1,58 +0,0 @@
-@echo off
-:: ===========================================================================
-:: History example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\history.obj %SRCDIR%\history.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/hook/hook.cpp b/examples/80x86/dos/watcom/l/hook/hook.cpp
deleted file mode 100644
index 2596c854..00000000
--- a/examples/80x86/dos/watcom/l/hook/hook.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-//****************************************************************************
-// Product: Ultimate Hook state pattern example
-// Last Updated for Version: 5.2.0
-// Date of the Last Update: Dec 27, 2013
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qep_port.h"
-#include "qassert.h"
-
-#include
-#include
-#include
-
-Q_DEFINE_THIS_FILE
-
-using namespace QP;
-
-class UltimateHook : public QHsm {
-public:
- UltimateHook() : QHsm((QStateHandler)&UltimateHook::initial) {
- }
-
-private:
- static QState initial (UltimateHook *me, QEvt const *e);
- static QState generic (UltimateHook *me, QEvt const *e);
- static QState specific(UltimateHook *me, QEvt const *e);
- static QState final (UltimateHook *me, QEvt const *e);
-};
-
-enum UltimateHookSignals {
- A_SIG = Q_USER_SIG,
- B_SIG,
- C_SIG,
- D_SIG
-};
-
-//............................................................................
-QState UltimateHook::initial(UltimateHook *me, QEvt const *) {
- return Q_TRAN(&UltimateHook::generic);
-}
-//............................................................................
-QState UltimateHook::final(UltimateHook *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> final\n");
- printf("\nBye!Bye!\n");
- exit(0);
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState UltimateHook::generic(UltimateHook *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: {
- printf("generic:init;");
- return Q_TRAN(&UltimateHook::specific);
- }
- case A_SIG: {
- printf("generic:A;");
- return Q_HANDLED();
- }
- case B_SIG: {
- printf("generic:B;");
- return Q_HANDLED();
- }
- case C_SIG: {
- printf("generic:C(reset);");
- return Q_TRAN(&UltimateHook::generic);
- }
- case D_SIG: {
- return Q_TRAN(&UltimateHook::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState UltimateHook::specific(UltimateHook *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("specific:entry;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- printf("specific:exit;");
- return 0;
- }
- case A_SIG: {
- printf("specific:A;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&UltimateHook::generic);
-}
-// test harness ==============================================================
-
-#include
-
-static UltimateHook l_test;
-
-int main() {
- printf("Ultimate Hook pattern\nQEP version: %s\n"
- "Press 'a'..'c' to inject signals A..C\n"
- "Press 'd' or ESC to inject signal D and quit\n",
- QEP::getVersion());
-
- l_test.init(); // trigger the initial transition before dispatching events
-
- for (;;) {
- printf("\n");
- uint8_t c;
- c = (uint8_t)getch(); // read one character from the console
- printf("%c: ", c);
-
- QEvt e;
- switch (c) {
- case 'a': e.sig = A_SIG; break;
- case 'b': e.sig = B_SIG; break;
- case 'c': e.sig = C_SIG; break;
- case 'd':
- case 0x1B: e.sig = D_SIG; break; // terminate
- }
- l_test.dispatch(&e); // dispatch the event into the state machine
- }
- return 0;
-}
-//............................................................................
-void Q_onAssert(char const Q_ROM * const file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- _exit(-1);
-}
diff --git a/examples/80x86/dos/watcom/l/hook/inc_qp.rsp b/examples/80x86/dos/watcom/l/hook/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/hook/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/hook/link_dbg.rsp b/examples/80x86/dos/watcom/l/hook/link_dbg.rsp
deleted file mode 100644
index cbb92b31..00000000
--- a/examples/80x86/dos/watcom/l/hook/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\hook.exe File dbg\hook.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/hook/make.bat b/examples/80x86/dos/watcom/l/hook/make.bat
deleted file mode 100644
index 22058cf4..00000000
--- a/examples/80x86/dos/watcom/l/hook/make.bat
+++ /dev/null
@@ -1,58 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Ultimate Hook example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\hook.obj %SRCDIR%\hook.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/LOG_PASS.TXT b/examples/80x86/dos/watcom/l/qhsmtst/LOG_PASS.TXT
deleted file mode 100644
index ec4c0412..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/LOG_PASS.TXT
+++ /dev/null
@@ -1,23 +0,0 @@
-QHsmTst example, QEP 5.3.1
-top-INIT;s-ENTRY;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY;
-A:s21-A;s211-EXIT;s21-EXIT;s21-ENTRY;s21-INIT;s211-ENTRY;
-B:s21-B;s211-EXIT;s211-ENTRY;
-D:s211-D;s211-EXIT;s21-INIT;s211-ENTRY;
-E:s-E;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s11-ENTRY;
-I:s1-I;
-F:s1-F;s11-EXIT;s1-EXIT;s2-ENTRY;s21-ENTRY;s211-ENTRY;
-I:s2-I;
-I:s-I;
-F:s2-F;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s11-ENTRY;
-A:s1-A;s11-EXIT;s1-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY;
-B:s1-B;s11-EXIT;s11-ENTRY;
-D:s1-D;s11-EXIT;s1-EXIT;s-INIT;s1-ENTRY;s11-ENTRY;
-D:s11-D;s11-EXIT;s1-INIT;s11-ENTRY;
-E:s-E;s11-EXIT;s1-EXIT;s1-ENTRY;s11-ENTRY;
-G:s11-G;s11-EXIT;s1-EXIT;s2-ENTRY;s21-ENTRY;s211-ENTRY;
-H:s211-H;s211-EXIT;s21-EXIT;s2-EXIT;s-INIT;s1-ENTRY;s11-ENTRY;
-H:s11-H;s11-EXIT;s1-EXIT;s-INIT;s1-ENTRY;s11-ENTRY;
-C:s1-C;s11-EXIT;s1-EXIT;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY;
-G:s21-G;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY;
-C:s1-C;s11-EXIT;s1-EXIT;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY;
-C:s2-C;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY;
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/inc_qp.rsp b/examples/80x86/dos/watcom/l/qhsmtst/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/link_dbg.rsp b/examples/80x86/dos/watcom/l/qhsmtst/link_dbg.rsp
deleted file mode 100644
index 3eb29f30..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\qhsmtst.exe File dbg\main.obj,dbg\qhsmtst.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/main.cpp b/examples/80x86/dos/watcom/l/qhsmtst/main.cpp
deleted file mode 100644
index d0e0e144..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/main.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-//****************************************************************************
-// Product: QHsmTst Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qep_port.h"
-#include "qassert.h"
-#include "qhsmtst.h"
-
-#include
-#include
-#include
-#include
-
-Q_DEFINE_THIS_FILE
-
-// Local objects -------------------------------------------------------------
-static FILE *l_outFile = (FILE *)0;
-static void dispatch(QSignal sig);
-
-//............................................................................
-int main(int argc, char *argv[ ]) {
- if (argc > 1) { // file name provided?
- l_outFile = fopen(argv[1], "w");
- }
-
- if (l_outFile == (FILE *)0) { // interactive version?
- l_outFile = stdout;
-
- printf("QHsmTst example, built on %s at %s\n"
- "QEP: %s.\nPress ESC to quit...\n",
- __DATE__, __TIME__, QEP::getVersion());
-
- the_hsm->init(); // trigger the initial tran. in the test HSM
-
- for (;;) { // event loop
- printf("\n>");
-
- int c;
- c = _getche(); // get a character from the console with echo
- printf(": ");
-
- QEvt e;
- if ('a' <= c && c <= 'i') { // in range?
- e.sig = (QSignal)(c - 'a' + A_SIG);
- }
- else if ('A' <= c && c <= 'I') { // in range?
- e.sig = (QSignal)(c - 'A' + A_SIG);
- }
- else if (c == '\33') { // the ESC key?
- e.sig = TERMINATE_SIG; // terminate the interactive test
- }
- else {
- e.sig = IGNORE_SIG;
- }
-
- the_hsm->dispatch(&e); // dispatch the event
- }
- }
- else { // batch version
- printf("QHsmTst, output saved to %s\n", argv[1]);
- fprintf(l_outFile,
- "QHsmTst example, QEP %s\n", QEP::getVersion());
-
- the_hsm->init(); // trigger the initial tran. in the test HSM
-
- // dynamic transitions
- dispatch(A_SIG);
- dispatch(B_SIG);
- dispatch(D_SIG);
- dispatch(E_SIG);
- dispatch(I_SIG);
- dispatch(F_SIG);
- dispatch(I_SIG);
- dispatch(I_SIG);
- dispatch(F_SIG);
- dispatch(A_SIG);
- dispatch(B_SIG);
- dispatch(D_SIG);
- dispatch(D_SIG);
- dispatch(E_SIG);
- dispatch(G_SIG);
- dispatch(H_SIG);
- dispatch(H_SIG);
- dispatch(C_SIG);
- dispatch(G_SIG);
- dispatch(C_SIG);
- dispatch(C_SIG);
-
- fclose(l_outFile);
- }
-
- return 0;
-}
-//............................................................................
-void Q_onAssert(char const Q_ROM * const file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- _exit(-1);
-}
-//............................................................................
-void BSP_display(char const *msg) {
- fprintf(l_outFile, msg);
-}
-//............................................................................
-void BSP_exit(void) {
- printf("Bye, Bye!");
- _exit(0);
-}
-//............................................................................
-static void dispatch(QSignal sig) {
- QEvt e;
- Q_REQUIRE((A_SIG <= sig) && (sig <= I_SIG));
- e.sig = sig;
- fprintf(l_outFile, "\n%c:", 'A' + sig - A_SIG);
- the_hsm->dispatch(&e); // dispatch the event
-}
-
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/make.bat b/examples/80x86/dos/watcom/l/qhsmtst/make.bat
deleted file mode 100644
index 2b3fec2a..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/make.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-@echo off
-:: ===========================================================================
-:: QHsmTst example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-mkir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qhsmtst.obj %SRCDIR%\qhsmtst.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.cpp b/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.cpp
deleted file mode 100644
index 3ad610ac..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-//****************************************************************************
-// Product: QHsmTst Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qep_port.h"
-#include "qhsmtst.h"
-
-// local-scope objects .......................................................
-class QHsmTst : public QHsm {
- int8_t m_foo; // extended state variable
-
-public:
- QHsmTst() : QHsm((QStateHandler)&QHsmTst::initial) { // ctor
- }
-
-protected:
- static QState initial(QHsmTst *me, QEvt const *e);// initial pseudostate
- static QState s (QHsmTst *me, QEvt const *e); // state-handler
- static QState s1 (QHsmTst *me, QEvt const *e); // state-handler
- static QState s11 (QHsmTst *me, QEvt const *e); // state-handler
- static QState s2 (QHsmTst *me, QEvt const *e); // state-handler
- static QState s21 (QHsmTst *me, QEvt const *e); // state-handler
- static QState s211 (QHsmTst *me, QEvt const *e); // state-handler
-};
-
-static QHsmTst l_hsmtst; // the sole instance of the state machine object
-
-// global-scope definitions --------------------------------------------------
-extern QHsm * const the_hsm = &l_hsmtst; // the opaque pointer
-
-//............................................................................
-QState QHsmTst::initial(QHsmTst *me, QEvt const *) {
- BSP_display("top-INIT;");
- me->m_foo = 0; // initialize extended state variable
- return Q_TRAN(&QHsmTst::s2);
-}
-
-//............................................................................
-QState QHsmTst::s(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_display("s-INIT;");
- return Q_TRAN(&QHsmTst::s11);
- }
- case E_SIG: {
- BSP_display("s-E;");
- return Q_TRAN(&QHsmTst::s11);
- }
- case I_SIG: { // internal transition with a guard
- if (me->m_foo) {
- BSP_display("s-I;");
- me->m_foo = 0;
- return Q_HANDLED();
- }
- break;
- }
- case TERMINATE_SIG: {
- BSP_exit();
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState QHsmTst::s1(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s1-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s1-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_display("s1-INIT;");
- return Q_TRAN(&QHsmTst::s11);
- }
- case A_SIG: {
- BSP_display("s1-A;");
- return Q_TRAN(&QHsmTst::s1);
- }
- case B_SIG: {
- BSP_display("s1-B;");
- return Q_TRAN(&QHsmTst::s11);
- }
- case C_SIG: {
- BSP_display("s1-C;");
- return Q_TRAN(&QHsmTst::s2);
- }
- case D_SIG: { // transition with a gurad
- if (!me->m_foo) {
- BSP_display("s1-D;");
- me->m_foo = 1;
- return Q_TRAN(&QHsmTst::s);
- }
- break;
- }
- case F_SIG: {
- BSP_display("s1-F;");
- return Q_TRAN(&QHsmTst::s211);
- }
- case I_SIG: { // internal transition
- BSP_display("s1-I;");
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsmTst::s);
-}
-//............................................................................
-QState QHsmTst::s11(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s11-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s11-EXIT;");
- return Q_HANDLED();
- }
- case D_SIG: { // transition with a gurad
- if (me->m_foo) {
- BSP_display("s11-D;");
- me->m_foo = 0;
- return Q_TRAN(&QHsmTst::s1);
- }
- break;
- }
- case G_SIG: {
- BSP_display("s11-G;");
- return Q_TRAN(&QHsmTst::s211);
- }
- case H_SIG: {
- BSP_display("s11-H;");
- return Q_TRAN(&QHsmTst::s);
- }
- }
- return Q_SUPER(&QHsmTst::s1);
-}
-//............................................................................
-QState QHsmTst::s2(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s2-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s2-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_display("s2-INIT;");
- return Q_TRAN(&QHsmTst::s211);
- }
- case C_SIG: {
- BSP_display("s2-C;");
- return Q_TRAN(&QHsmTst::s1);
- }
- case F_SIG: {
- BSP_display("s2-F;");
- return Q_TRAN(&QHsmTst::s11);
- }
- case I_SIG: { // internal transition with a guard
- if (!me->m_foo) {
- BSP_display("s2-I;");
- me->m_foo = (uint8_t)1;
- return Q_HANDLED();
- }
- break;
- }
- }
- return Q_SUPER(&QHsmTst::s);
-}
-//............................................................................
-QState QHsmTst::s21(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s21-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s21-EXIT;");
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- BSP_display("s21-INIT;");
- return Q_TRAN(&QHsmTst::s211);
- }
- case A_SIG: {
- BSP_display("s21-A;");
- return Q_TRAN(&QHsmTst::s21);
- }
- case B_SIG: {
- BSP_display("s21-B;");
- return Q_TRAN(&QHsmTst::s211);
- }
- case G_SIG: {
- BSP_display("s21-G;");
- return Q_TRAN(&QHsmTst::s1);
- }
- }
- return Q_SUPER(&QHsmTst::s2);
-}
-//............................................................................
-QState QHsmTst::s211(QHsmTst *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_display("s211-ENTRY;");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- BSP_display("s211-EXIT;");
- return Q_HANDLED();
- }
- case D_SIG: {
- BSP_display("s211-D;");
- return Q_TRAN(&QHsmTst::s21);
- }
- case H_SIG: {
- BSP_display("s211-H;");
- return Q_TRAN(&QHsmTst::s);
- }
- }
- return Q_SUPER(&QHsmTst::s21);
-}
diff --git a/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.h b/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.h
deleted file mode 100644
index e100e114..00000000
--- a/examples/80x86/dos/watcom/l/qhsmtst/qhsmtst.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//****************************************************************************
-// Product: QHsmTst Example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef qhsmtst_h
-#define qhsmtst_h
-
-using namespace QP;
-
-enum QHsmTstSignals {
- A_SIG = Q_USER_SIG,
- B_SIG,
- C_SIG,
- D_SIG,
- E_SIG,
- F_SIG,
- G_SIG,
- H_SIG,
- I_SIG,
- TERMINATE_SIG,
- IGNORE_SIG,
- MAX_SIG
-};
-
-extern QHsm * const the_hsm; // opaque pointer to the test HSM
-
-// BSP functions to dispaly a message and exit
-void BSP_display(char const *msg);
-void BSP_exit(void);
-
-#endif // qhsmtst_h
diff --git a/examples/80x86/dos/watcom/l/reminder/bsp.cpp b/examples/80x86/dos/watcom/l/reminder/bsp.cpp
deleted file mode 100644
index 79e2b2f2..00000000
--- a/examples/80x86/dos/watcom/l/reminder/bsp.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Eatcom
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-#include
-
-using namespace QP;
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)();
-static void interrupt (*l_dosKbdISR)();
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-static void interrupt ISR_tmr() {
- QF_ISR_ENTRY();
-
- QF::tick(); //<-- process the QF clock tick
-
- QF_ISR_EXIT();
-}
-//............................................................................
-static void interrupt ISR_kbd() {
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- BSP_onKeyboardInput(key); // process the key (application specific)
-
- QF_ISR_EXIT();
-}
-//............................................................................
-void BSP_init(int, char *[]) {
-}
-//............................................................................
-void QF::onStartup(void) {
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) {
- // restore the original DOS vectors ...
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-}
-//............................................................................
-extern "C" void Q_onAssert(char const Q_ROM *const Q_ROM_VAR file, int line) {
- fprintf(stderr, "Assertion failed in %s, line %d", file, line);
- QF::stop();
-}
-
diff --git a/examples/80x86/dos/watcom/l/reminder/bsp.h b/examples/80x86/dos/watcom/l/reminder/bsp.h
deleted file mode 100644
index e5155354..00000000
--- a/examples/80x86/dos/watcom/l/reminder/bsp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//****************************************************************************
-// Product: DOS console-based BSP, Open Watcom
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-void BSP_init(int argc, char *argv[]);
-void BSP_onKeyboardInput(uint8_t ch); // process the keyboard character
-
-#define BSP_TICKS_PER_SEC 18
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/reminder/inc_qp.rsp b/examples/80x86/dos/watcom/l/reminder/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/reminder/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/reminder/link_dbg.rsp b/examples/80x86/dos/watcom/l/reminder/link_dbg.rsp
deleted file mode 100644
index b44602be..00000000
--- a/examples/80x86/dos/watcom/l/reminder/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\reminder.exe File dbg\bsp.obj,dbg\reminder.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/reminder/make.bat b/examples/80x86/dos/watcom/l/reminder/make.bat
deleted file mode 100644
index ef375eca..00000000
--- a/examples/80x86/dos/watcom/l/reminder/make.bat
+++ /dev/null
@@ -1,59 +0,0 @@
-@echo off
-:: ===========================================================================
-:: Reminder example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-set BINDIR=dbg
-set CCFLAGS=-d2 -ml -3 -fpi87
-set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\reminder.obj %SRCDIR%\reminder.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/reminder/reminder.cpp b/examples/80x86/dos/watcom/l/reminder/reminder.cpp
deleted file mode 100644
index 955b41b3..00000000
--- a/examples/80x86/dos/watcom/l/reminder/reminder.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-//****************************************************************************
-// Product: Reminder state pattern example
-// Last Updated for Version: 5.2.0
-// Date of the Last Update: Dec 27, 2013
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "qassert.h"
-
-#include
-
-Q_DEFINE_THIS_FILE
-
-using namespace QP;
-
-//............................................................................
-enum SensorSignals {
- TERMINATE_SIG = Q_USER_SIG, // terminate the application
- TIMEOUT_SIG, // the periodic timeout signal
- DATA_READY_SIG, // the invented reminder signal
-
- MAX_SIG // keep always last
-};
-//............................................................................
-class Sensor : public QActive { // the Sensor active object
-private:
- QTimeEvt m_timeEvt; // private time event generator
- uint16_t m_pollCtr;
- uint16_t m_procCtr;
-
-public:
- Sensor()
- : QActive((QStateHandler)&Sensor::initial),
- m_timeEvt(TIMEOUT_SIG)
- {}
-
-private:
- // hierarchical state machine ...
- static QState initial (Sensor *me, QEvt const *e);
- static QState polling (Sensor *me, QEvt const *e);
- static QState processing(Sensor *me, QEvt const *e);
- static QState idle (Sensor *me, QEvt const *e);
- static QState busy (Sensor *me, QEvt const *e);
- static QState final (Sensor *me, QEvt const *e);
-};
-
-// HSM definition ------------------------------------------------------------
-QState Sensor::initial(Sensor *me, QEvt const *) {
- me->m_pollCtr = 0;
- me->m_procCtr = 0;
-
- // NOTE: don't forget to subscribe to any signals of interest,
- // if you're using publish-subscribe...
- //
- // subscribe(...);
-
- return Q_TRAN(&Sensor::polling);
-}
-//............................................................................
-QState Sensor::final(Sensor *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> final\n");
- printf("\nBye!Bye!\n");
- QF::stop(); // stop QF and cleanup
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Sensor::polling(Sensor *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // periodic timeout every 1/2 second
- me->m_timeEvt.postEvery(me, BSP_TICKS_PER_SEC/2);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_timeEvt.disarm();
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- return Q_TRAN(&Sensor::processing);
- }
- case TIMEOUT_SIG: {
- // NOTE: this constant event is statically pre-allocated.
- // It can be posted/published as any other event.
- static const QEvt dataReadyEvt = { DATA_READY_SIG, 0 };
-
- ++me->m_pollCtr;
- printf("poll %3d\n", me->m_pollCtr);
- if ((me->m_pollCtr & 0x3) == 0) { // modulo 4
- me->postFIFO(&dataReadyEvt);
- }
- return Q_HANDLED();
- }
- case TERMINATE_SIG: {
- return Q_TRAN(&Sensor::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Sensor::processing(Sensor *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: {
- return Q_TRAN(&Sensor::idle);
- }
- }
- return Q_SUPER(&Sensor::polling);
-}
-//............................................................................
-QState Sensor::idle(Sensor *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> idle\n");
- return Q_HANDLED();
- }
- case DATA_READY_SIG: {
- return Q_TRAN(&Sensor::busy);
- }
- }
- return Q_SUPER(&Sensor::processing);
-}
-//............................................................................
-QState Sensor::busy(Sensor *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- printf("-> busy\n");
- return Q_HANDLED();
- }
- case TIMEOUT_SIG: {
- ++me->m_procCtr;
- printf("process %3d\n", me->m_procCtr);
- if ((me->m_procCtr & 0x1) == 0) { // modulo 2
- return Q_TRAN(&Sensor::idle);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Sensor::processing);
-}
-
-// test harness ==============================================================
-
-// Local-scope objects -------------------------------------------------------
-static Sensor l_sensor; // the Sensor active object
-static QEvt const *l_sensorQSto[10]; // Event queue storage for Sensor
-static void *l_regPoolSto[100/sizeof(void *)]; // 100 bytes for the event pool
-
-//............................................................................
-int main(int argc, char *argv[]) {
- printf("Reminder state pattern\nQEP version: %s\nQF version: %s\n"
- "Press ESC to quit...\n",
- QEP::getVersion(), QF::getVersion());
-
- BSP_init(argc, argv); // initialize the BSP
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // publish-subscribe not used, no call to QF::psInit()
-
- // initialize event pools...
- QF::poolInit(l_regPoolSto, sizeof(l_regPoolSto), sizeof(QEvt));
-
- // start the active objects...
- l_sensor.start(1, l_sensorQSto, Q_DIM(l_sensorQSto),
- (void *)0, 0, (QEvt *)0);
-
- return QF::run(); // run the QF application
-}
-//............................................................................
-void BSP_onKeyboardInput(uint8_t key) {
- switch (key) {
- case 129: { // ESC pressed?
- l_sensor.postFIFO(Q_NEW(QEvt, TERMINATE_SIG));
- break;
- }
- }
-}
diff --git a/examples/80x86/dos/watcom/l/sls/bsp.cpp b/examples/80x86/dos/watcom/l/sls/bsp.cpp
deleted file mode 100644
index 7ad2e078..00000000
--- a/examples/80x86/dos/watcom/l/sls/bsp.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-//****************************************************************************
-// Product: Board Support Package (BSP) for the UI example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "bsp.h"
-#include "video.h"
-
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-
-Q_DEFINE_THIS_FILE
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)();
-static void interrupt (*l_dosKbdISR)();
-
-#ifdef Q_SPY
- static uint16_t l_uart_base; // QS data uplink UART base address
- QSTimeCtr l_tickTime; // keeps timetsamp at tick
-
- #define UART_TXFIFO_DEPTH 16
-#endif
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-static void interrupt ISR_tmr() {
- QF_ISR_ENTRY();
-
- QF::tick(); // process all armed time events
-
-#ifdef Q_SPY
- l_tickTime += 0x10000;
-#endif
-
- QF_ISR_EXIT();
-}
-//............................................................................
-static void interrupt ISR_kbd() {
- QF_ISR_ENTRY();
-
- uint8_t key = inp(0x60); // key scan code from 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- KeyboardEvt *ke;
- switch (key) {
- default: {
-// Video::printNumAt(1, 24, Video::FGND_YELLOW, key);
- break;
- }
- case 11: { // '0'
- KeyboardEvt *ke = Q_NEW(KeyboardEvt, DIGIT_0_SIG);
- ke->key_code = '0';
- AO_UI->postFIFO(ke);
- break;
- }
- case 2: // '1'
- case 3: // '2'
- case 4: // '3'
- case 5: // '4'
- case 6: // '5'
- case 7: // '6'
- case 8: // '7'
- case 9: // '8'
- case 10: { // '9'
- ke = Q_NEW(KeyboardEvt, DIGIT_1_9_SIG);
- ke->key_code = '0' + (key - 1);
- AO_UI->postFIFO(ke);
- break;
- }
- case 52: { // '.'
- ke = Q_NEW(KeyboardEvt, POINT_SIG);
- ke->key_code = '.';
- AO_UI->postFIFO(ke);
- break;
- }
- case 12: { // '-'
- ke = Q_NEW(KeyboardEvt, NEG_SIG);
- ke->key_code = '-';
- AO_UI->postFIFO(ke);
- break;
- }
- case 46: { // 'c'
- static QEvt const ce = { C_SIG, 0 };
- AO_UI->postFIFO(&ce);
- break;
- }
- case 18: { // 'e'
- static QEvt const cee = { CE_SIG, 0 };
- AO_UI->postFIFO(&cee);
- break;
- }
- case 28: { // ENTER
- static QEvt const ee = { ENTER_SIG, 0 };
- AO_UI->postFIFO(&ee);
- break;
- }
- case 200: { // UP-arrow
- static QEvt const ue = { UP_SIG, 0 };
- AO_UI->postFIFO(&ue);
- break;
- }
- case 208: { // DOWN-arrow
- static QEvt const de = { DOWN_SIG, 0 };
- AO_UI->postFIFO(&de);
- break;
- }
- case 59: { // F1
- static QEvt const he = { HELP_SIG, 0 };
- AO_UI->postFIFO(&he);
- break;
- }
- case 129: { // ESC
- static QEvt const qe = { QUIT_SIG, 0 };
- QF::publish(&qe);
- break;
- }
- }
-
- QF_ISR_EXIT();
-}
-
-//............................................................................
-void BSP_init(int argc, char *argv[]) {
- char const *com = "COM1";
-
- com = com; // avoid compiler warning if QS is not used
-
- if (argc > 1) {
- com = argv[1];
- }
- if (!QS_INIT(com)) { // initialize QS
- Q_ERROR();
- }
-}
-//............................................................................
-void QF::onStartup(void) {
- uint16_t count;
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- count = (uint16_t)(((1193180 * 2) / BSP_TICKS_PER_SEC + 1) >> 1);
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, count & 0xFF); // load low byte of timer 0
- outp(0x40, (count >> 8) & 0xFF); // load high byte of timer 0
-
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) { // restore the DOS system clock tick rate...
- QF_INT_DISABLE();
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, 0); // load low byte of timer 0
- outp(0x40, 0); // load high byte of timer 0
- // restore the original DOS vectors ...
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_DISABLE();
-
- QS_EXIT(); // exit QS
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QF::onIdle(void) { // NOTE: entered with interrupts DISABLED
- QF_INT_ENABLE(); // must at least enable interrupts
-#ifdef Q_SPY
- if ((inp(l_uart_base + 5) & (1 << 5)) != 0) { // Tx FIFO empty?
- uint16_t fifo = UART_TXFIFO_DEPTH; // depth of the 15550 Tx FIFO
- uint8_t const *block;
- QF_INT_DISABLE();
- block = QS::getBlock(&fifo); // try to get next block to transmit
- QF_INT_ENABLE();
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- }
-#endif
-}
-//............................................................................
-// this function is used by the QP embedded systems-friendly assertions
-extern "C" void Q_onAssert(char const * const file, int line) {
- Video::clearRect(0, 24, 80, 25, Video::BGND_RED);
- Video::printStrAt(0, 24, Video::FGND_WHITE, "ASSERTION FAILED in file:");
- Video::printStrAt(26, 24, Video::FGND_YELLOW, file);
- Video::printStrAt(57, 24, Video::FGND_WHITE, "line:");
- Video::printNumAt(62, 24, Video::FGND_YELLOW, line);
- _exit(-1);
-}
-
-//----------------------------------------------------------------------------
-#ifdef Q_SPY
-
-//............................................................................
-static uint8_t UART_config(char const *comName, uint32_t baud) {
- switch (comName[3]) { // Set the base address of the COMx port
- case '1': l_uart_base = (uint16_t)0x03F8; break; // COM1
- case '2': l_uart_base = (uint16_t)0x02F8; break; // COM2
- case '3': l_uart_base = (uint16_t)0x03E8; break; // COM3
- case '4': l_uart_base = (uint16_t)0x02E8; break; // COM4
- default: return (uint8_t)0; // COM port out of range failure
- }
- baud = (uint16_t)(115200UL / baud); // divisor for baud rate
- outp(l_uart_base + 3, (1 << 7)); // Set divisor access bit (DLAB)
- outp(l_uart_base + 0, (uint8_t)baud); // Load divisor
- outp(l_uart_base + 1, (uint8_t)(baud >> 8));
- outp(l_uart_base + 3, (1 << 1) | (1 << 0)); // LCR:8-bits,no p,1stop
- outp(l_uart_base + 4, (1 << 3) | (1 << 1) | (1 << 0)); // DTR,RTS,Out
- outp(l_uart_base + 1, 0); // Put UART into the polling FIFO mode
- outp(l_uart_base + 2, (1 << 2) | (1 << 0)); // FCR: enable, TX clear
-
- return (uint8_t)1; // success
-}
-//............................................................................
-uint8_t QS::onStartup(void const *arg) {
- static uint8_t qsBuf[1*1024]; // buffer for Quantum Spy
- initBuf(qsBuf, sizeof(qsBuf));
-
- QS_FILTER_ON(QS_SIG_DICTIONARY);
- QS_FILTER_ON(QS_OBJ_DICTIONARY);
- QS_FILTER_ON(QS_FUN_DICTIONARY);
- QS_FILTER_ON(QS_ASSERT);
-
- QS_FILTER_ON(QS_QEP_STATE_EMPTY);
- QS_FILTER_ON(QS_QEP_STATE_ENTRY);
- QS_FILTER_ON(QS_QEP_STATE_EXIT);
- QS_FILTER_ON(QS_QEP_STATE_INIT);
- QS_FILTER_ON(QS_QEP_INIT_TRAN);
- QS_FILTER_ON(QS_QEP_INTERN_TRAN);
- QS_FILTER_ON(QS_QEP_TRAN);
- QS_FILTER_ON(QS_QEP_IGNORED);
-
- QS_FILTER_ON(QS_QF_ACTIVE_ADD);
- QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
- QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
- QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
- QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
- QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
- QS_FILTER_ON(QS_QF_ACTIVE_GET);
- QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
- QS_FILTER_ON(QS_QF_EQUEUE_INIT);
- QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
- QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
- QS_FILTER_ON(QS_QF_EQUEUE_GET);
- QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
- QS_FILTER_ON(QS_QF_MPOOL_INIT);
- QS_FILTER_ON(QS_QF_MPOOL_GET);
- QS_FILTER_ON(QS_QF_MPOOL_PUT);
- QS_FILTER_ON(QS_QF_PUBLISH);
- QS_FILTER_ON(QS_QF_NEW);
- QS_FILTER_ON(QS_QF_GC_ATTEMPT);
- QS_FILTER_ON(QS_QF_GC);
-// QS_FILTER_ON(QS_QF_TICK);
- QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
- QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
- QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
- QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
- QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
- QS_FILTER_ON(QS_QF_TIMEEVT_POST);
-// QS_FILTER_ON(QS_QF_INT_LOCK);
-// QS_FILTER_ON(QS_QF_INT_UNLOCK);
-// QS_FILTER_ON(QS_QF_ISR_ENTRY);
-// QS_FILTER_ON(QS_QF_ISR_EXIT);
-
- return UART_config((char const *)arg, 115200UL);
-}
-//............................................................................
-void QS::onCleanup(void) {
-}
-//............................................................................
-QSTimeCtr QS::onGetTime(void) { // invoked with interrupts locked
- static uint32_t l_lastTime;
- uint32_t now;
- uint16_t count16; // 16-bit count from the 8254
-
- outp(0x43, 0); // latch the 8254's counter-0 count
- count16 = (uint16_t)inp(0x40); // read the low byte of counter-0
- count16 += ((uint16_t)inp(0x40) << 8); // add on the hi byte
-
- now = l_tickTime + (0x10000 - count16);
-
- if (l_lastTime > now) { // are we going "back" in time?
- now += 0x10000; // assume that there was one rollover
- }
- l_lastTime = now;
-
- return (QSTimeCtr)now;
-}
-//............................................................................
-void QS::onFlush(void) {
- uint16_t b;
- while ((b = getByte()) != QS_EOD) { // next QS trace byte available?
- while ((inp(l_uart_base + 5) & (1 << 5)) == 0) { // not empty?
- }
- outp(l_uart_base + 0, (uint8_t)b); // put the byte to TX FIFO
- }
-}
-#endif // Q_SPY
-//----------------------------------------------------------------------------
diff --git a/examples/80x86/dos/watcom/l/sls/bsp.h b/examples/80x86/dos/watcom/l/sls/bsp.h
deleted file mode 100644
index bfa0630a..00000000
--- a/examples/80x86/dos/watcom/l/sls/bsp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//****************************************************************************
-// Product: Board Support Package (BSP) for the UI example
-// Last Updated for Version: 4.0.01
-// Date of the Last Update: Sep 19, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#define BSP_TICKS_PER_SEC 50
-
-void BSP_init(int argc, char *argv[]);
-void BSP_exit(void);
-
-#endif // bsp_h
diff --git a/examples/80x86/dos/watcom/l/sls/inc_qp.rsp b/examples/80x86/dos/watcom/l/sls/inc_qp.rsp
deleted file mode 100644
index 3cd99813..00000000
--- a/examples/80x86/dos/watcom/l/sls/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\dos\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/dos/watcom/l/sls/link_dbg.rsp b/examples/80x86/dos/watcom/l/sls/link_dbg.rsp
deleted file mode 100644
index 9aa20b65..00000000
--- a/examples/80x86/dos/watcom/l/sls/link_dbg.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name dbg\sls.exe File dbg\bsp.obj,dbg\main.obj,dbg\num_ent.obj,dbg\ui.obj,dbg\ui_help.obj,dbg\ui_nu_lr.obj,dbg\ui_num.obj,dbg\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\dbg\qep.lib
diff --git a/examples/80x86/dos/watcom/l/sls/link_rel.rsp b/examples/80x86/dos/watcom/l/sls/link_rel.rsp
deleted file mode 100644
index 25042e2f..00000000
--- a/examples/80x86/dos/watcom/l/sls/link_rel.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name rel\sls.exe File rel\bsp.obj,rel\main.obj,rel\num_ent.obj,rel\ui.obj,rel\ui_help.obj,rel\ui_nu_lr.obj,rel\ui_num.obj,rel\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\rel\qep.lib
diff --git a/examples/80x86/dos/watcom/l/sls/link_spy.rsp b/examples/80x86/dos/watcom/l/sls/link_spy.rsp
deleted file mode 100644
index ac07b731..00000000
--- a/examples/80x86/dos/watcom/l/sls/link_spy.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name spy\sls.exe File spy\bsp.obj,spy\main.obj,spy\num_ent.obj,spy\ui.obj,spy\ui_help.obj,spy\ui_nu_lr.obj,spy\ui_num.obj,spy\video.obj Library ..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qf.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qep.lib,..\..\..\..\..\..\ports\80x86\dos\watcom\l\spy\qs.lib
diff --git a/examples/80x86/dos/watcom/l/sls/main.cpp b/examples/80x86/dos/watcom/l/sls/main.cpp
deleted file mode 100644
index b2b219a7..00000000
--- a/examples/80x86/dos/watcom/l/sls/main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "bsp.h" // board support package
-#include "num_ent.h"
-#include "ui.h"
-
-// Local-scope objects -------------------------------------------------------
-static QEvt const * l_uiQueueSto[5];
-static union {
- void *vp;
- KeyboardEvt qe;
-} l_smlPoolSto[5]; // small event pool
-static QSubscrList l_subscrSto[MAX_PUB_SIG];
-
-//............................................................................
-int main(int argc, char *argv[]) {
-
- BSP_init(argc, argv); // initialize the Board Support Package
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // initialize the event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
-// QF::poolInit(l_medPoolSto, sizeof(l_medPoolSto), sizeof(l_medPoolSto[0]));
-
- QF::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe
-
- // setup the QS filters...
- // send object dictionaries for event queues...
- QS_OBJ_DICTIONARY(l_uiQueueSto);
-
- // send object dictionaries for event pools...
- QS_OBJ_DICTIONARY(l_smlPoolSto);
-// QS_OBJ_DICTIONARY(l_medPoolSto);
-
- // send signal dictionaries for globally published events...
- QS_SIG_DICTIONARY(QUIT_SIG, 0);
-
- // start the active objects...
- AO_UI->start(1, // priority
- l_uiQueueSto, Q_DIM(l_uiQueueSto), // evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
-
- return QF::run(); // run the QF application
-}
diff --git a/examples/80x86/dos/watcom/l/sls/make.bat b/examples/80x86/dos/watcom/l/sls/make.bat
deleted file mode 100644
index 0f02fa73..00000000
--- a/examples/80x86/dos/watcom/l/sls/make.bat
+++ /dev/null
@@ -1,74 +0,0 @@
-@echo off
-:: ===========================================================================
-:: SLS example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-if not "%1"=="rel" goto dbg
- echo rel selected
- set BINDIR=rel
- set CCFLAGS=-d0 -ml -3 -fpi87 -ot -dNDEBUG
- set LDFLAGS=@link_rel.rsp
-goto compile
-:dbg
- echo default selected
- set BINDIR=dbg
- set CCFLAGS=-d2 -ml -3 -fpi87
- set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-:compile
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\num_ent.obj %SRCDIR%\num_ent.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ui.obj %SRCDIR%\ui.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ui_help.obj %SRCDIR%\ui_help.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ui_nu_lr.obj %SRCDIR%\ui_nu_lr.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ui_num.obj %SRCDIR%\ui_num.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\video.obj %SRCDIR%\video.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/dos/watcom/l/sls/new.h b/examples/80x86/dos/watcom/l/sls/new.h
deleted file mode 100644
index f2ed1f76..00000000
--- a/examples/80x86/dos/watcom/l/sls/new.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* new.h
-
- Access to operator new() and newhandler()
-
- Copyright (c) 1990, 1992 by Borland International
- All Rights Reserved.
-*/
-
-#if !defined(__NEW_H)
-#define __NEW_H
-
-inline void *operator new(size_t, void *ptr) {
- return ptr;
-}
-//inline void *operator new[] (size_t, void *ptr) {
-// return ptr;
-//}
-
-#endif /* __NEW_H */
-
diff --git a/examples/80x86/dos/watcom/l/sls/num_ent.cpp b/examples/80x86/dos/watcom/l/sls/num_ent.cpp
deleted file mode 100644
index 0483a4b1..00000000
--- a/examples/80x86/dos/watcom/l/sls/num_ent.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-//****************************************************************************
-// Product: Number data entry
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "video.h"
-
-#include
-#include
-#include
-
-//............................................................................
-NumEntry::NumEntry(void) // ctor
- : QHsm((QStateHandler)&NumEntry::initial)
-{}
-//............................................................................
-NumEntry::~NumEntry() { // xtor
-}
-//............................................................................
-void NumEntry::config(uint8_t x, uint8_t y, uint8_t color) {
- m_x = x;
- m_y = y;
- m_color = color;
-}
-//............................................................................
-void NumEntry::insert(uint8_t keyId) {
- if (m_len == 0) {
- m_str[NUM_STR_WIDTH - 1] = (char)keyId;
- }
- else if (m_len < (NUM_STR_WIDTH - 1)) {
- memmove(&m_str[0], &m_str[1], NUM_STR_WIDTH - 1);
- m_str[NUM_STR_WIDTH - 1] = (char)keyId;
- }
- ++m_len;
- Video::printStrAt(m_x, m_y, m_color, m_str);
-}
-//............................................................................
-double NumEntry::get(void) {
- return strtod(m_str, (char **)0);
-}
-
-// HSM definition ------------------------------------------------------------
-QState NumEntry::initial(NumEntry *me, QEvt const * /* e */) {
- // send functions dictionaries for NumEntry states...
- QS_FUN_DICTIONARY(&NumEntry::top);
- QS_FUN_DICTIONARY(&NumEntry::negative);
- QS_FUN_DICTIONARY(&NumEntry::zero);
- QS_FUN_DICTIONARY(&NumEntry::integer);
- QS_FUN_DICTIONARY(&NumEntry::fraction);
-
- // send signal dictionaries for signals specific to NumEntry...
- QS_SIG_DICTIONARY(C_SIG, me);
- QS_SIG_DICTIONARY(DIGIT_0_SIG, me);
- QS_SIG_DICTIONARY(DIGIT_1_9_SIG, me);
- QS_SIG_DICTIONARY(POINT_SIG, me);
- QS_SIG_DICTIONARY(NEG_SIG, me);
-
-
- return Q_TRAN(&NumEntry::zero);
-}
-//............................................................................
-QState NumEntry::top(NumEntry *me, QEvt const *e) {
- switch (e->sig) {
- case C_SIG: {
- memset(me->m_str, ' ', NUM_STR_WIDTH - 1);
- me->m_str[NUM_STR_WIDTH - 1] = '0';
- me->m_str[NUM_STR_WIDTH] = '\0';
- me->m_len = 0;
- Video::printStrAt(me->m_x, me->m_y, me->m_color, me->m_str);
- return Q_TRAN(&NumEntry::zero);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState NumEntry::zero(NumEntry *me, QEvt const *e) {
- switch (e->sig) {
- case DIGIT_0_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- case NEG_SIG: {
- me->m_str[NUM_STR_WIDTH - 2] = '-';
- Video::printStrAt(me->m_x, me->m_y, me->m_color, me->m_str);
- return Q_TRAN(&NumEntry::negative);
- }
- case DIGIT_1_9_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_TRAN(&NumEntry::integer);
- }
- case POINT_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_TRAN(&NumEntry::fraction);
- }
- }
- return Q_SUPER(&NumEntry::top);
-}
-//............................................................................
-QState NumEntry::negative(NumEntry *me, QEvt const *e) {
- switch (e->sig) {
- case NEG_SIG:
- case DIGIT_0_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- case DIGIT_1_9_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_TRAN(&NumEntry::integer);
- }
- case POINT_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_TRAN(&NumEntry::fraction);
- }
- }
- return Q_SUPER(&NumEntry::top);
-}
-//............................................................................
-QState NumEntry::integer(NumEntry *me, QEvt const *e) {
- switch (e->sig) {
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_TRAN(&NumEntry::fraction);
- }
- }
- return Q_SUPER(&NumEntry::top);
-}
-//............................................................................
-QState NumEntry::fraction(NumEntry *me, QEvt const *e) {
- switch (e->sig) {
- case DIGIT_0_SIG: // intentionally fall through
- case DIGIT_1_9_SIG: {
- me->insert(((KeyboardEvt const *)e)->key_code);
- return Q_HANDLED();
- }
- case POINT_SIG: {
- ; // explicitly ignore
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&NumEntry::top);
-}
-
diff --git a/examples/80x86/dos/watcom/l/sls/num_ent.h b/examples/80x86/dos/watcom/l/sls/num_ent.h
deleted file mode 100644
index 87958eb8..00000000
--- a/examples/80x86/dos/watcom/l/sls/num_ent.h
+++ /dev/null
@@ -1,65 +0,0 @@
-//****************************************************************************
-// Product: Number data entry
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef num_ent_h
-#define num_ent_h
-
-using namespace QP;
-
-#define NUM_STR_WIDTH 13
-
-class NumEntry : public QHsm {
- char m_str[NUM_STR_WIDTH + 1]; // string representation of the number
- uint8_t m_len; // number of displayed characters
- uint8_t m_x; // x-coordinate of the number entry on the screen
- uint8_t m_y; // y-coordinate of the number entry on the screen
- uint8_t m_color; // foreground color of the number entry on the screen
-
-public:
- NumEntry(void); // ctor
- ~NumEntry(); // xtor
- void config(uint8_t x, uint8_t y, uint8_t color);
- void insert(uint8_t keyId);
- double get(void); // return the numerical value from the number entry
-
-private:
- static QState initial (NumEntry *me, QEvt const *e);
- static QState top (NumEntry *me, QEvt const *e);
- static QState negative(NumEntry *me, QEvt const *e);
- static QState zero (NumEntry *me, QEvt const *e);
- static QState integer (NumEntry *me, QEvt const *e);
- static QState fraction(NumEntry *me, QEvt const *e);
-};
-
-#endif // num_ent_h
diff --git a/examples/80x86/dos/watcom/l/sls/ui.cpp b/examples/80x86/dos/watcom/l/sls/ui.cpp
deleted file mode 100644
index 3274bf5a..00000000
--- a/examples/80x86/dos/watcom/l/sls/ui.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "video.h"
-
-// Local objects -------------------------------------------------------------
-static UI_mem l_ui_mem; // instantiate the UI state machine...
- // NOTE: this executes the ctor of the UI_top superstate
-
-// Global objects ------------------------------------------------------------
-QActive * const AO_UI = &l_ui_mem; // "opaque" pointer to UI Active Object
-
-
-// HSM definition ------------------------------------------------------------
-QState UI_top::initial(UI_top *me, QEvt const * /* e */) {
- // subscribe to events...
- me->subscribe(QUIT_SIG);
- // initialize the history
- me->m_history = (QStateHandler)&UI_num_sd::handler;
-
- // send object dictionaries for UI objects
- QS_OBJ_DICTIONARY(&l_ui_mem);
-
- // send function dictionaries for UI states...
- QS_FUN_DICTIONARY(&UI_top::handler);
- QS_FUN_DICTIONARY(&UI_top::final);
- QS_FUN_DICTIONARY(&UI_num::handler);
- QS_FUN_DICTIONARY(&UI_num_sd::handler);
- QS_FUN_DICTIONARY(&UI_num_lr::handler);
- QS_FUN_DICTIONARY(&UI_help::handler);
-
- // send signal dictionaries for signals specific to UI...
- QS_SIG_DICTIONARY(C_SIG, me);
- QS_SIG_DICTIONARY(CE_SIG, me);
- QS_SIG_DICTIONARY(DIGIT_0_SIG, me);
- QS_SIG_DICTIONARY(DIGIT_1_9_SIG, me);
- QS_SIG_DICTIONARY(POINT_SIG, me);
- QS_SIG_DICTIONARY(NEG_SIG, me);
- QS_SIG_DICTIONARY(ENTER_SIG, me);
- QS_SIG_DICTIONARY(UP_SIG, me);
- QS_SIG_DICTIONARY(DOWN_SIG, me);
- QS_SIG_DICTIONARY(HELP_SIG, me);
-
- return Q_TRAN(&UI_num::handler);
-}
-//............................................................................
-QState UI_top::handler(UI_top *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- uint8_t c;
- static char const * const help_unknown[] = {
- "Unknown Screen Help: ",
- " ",
- " ",
- " ",
- " "
- };
- me->m_help_text = help_unknown;
- me->m_help_len = Q_DIM(help_unknown);
-
- Video::clearScreen(Video::BGND_BLACK);
- Video::clearRect( 0, 0, 80, 7, Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 10, 80, 11, Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 23, 80, 24, Video::BGND_LIGHT_GRAY);
-
- c = Video::FGND_BLUE;
- Video::printStrAt(10, 0, c, " __");
- Video::printStrAt(10, 1, c, " / | _ _ -|- _ _");
- Video::printStrAt(10, 2, c, " \\__| | | _\\ | \\ | | | | \\ \\");
- Video::printStrAt(10, 3, c, " | \\_/ |_| | | | \\_| | | |");
- Video::printStrAt(10, 4, c, " |");
- c = Video::FGND_RED;
- Video::printStrAt(43, 0, c, " _ __ ");
- Video::printStrAt(43, 1, c, "| /_\\ | \\ TM");
- Video::printStrAt(43, 2, c, "| \\_ _ |__/ _");
- Video::printStrAt(43, 3, c, "| _\\ | |_");
- Video::printStrAt(43, 4, c, "|___ |_| | _|");
- Video::printStrAt(10, 5, Video::FGND_BLUE,
- "_____________________________________________________");
- Video::printStrAt(10, 6, Video::FGND_RED,
- "i n n o v a t i n g e m b e d d e d s y s t e m s");
- Video::printStrAt(2, 8, Video::FGND_WHITE,
- "State-Local Storage Example");
- Video::printStrAt(36, 8, Video::FGND_WHITE, "QEP/C++");
- Video::printStrAt(45, 8, Video::FGND_YELLOW, QEP::getVersion());
- Video::printStrAt(55, 8, Video::FGND_WHITE, "QF/C++");
- Video::printStrAt(64, 8, Video::FGND_YELLOW, QF::getVersion());
-
- Video::printStrAt(10, 23, Video::FGND_BLUE,
- "* Copyright (c) Quantum Leaps, LLC * www.state-machine.com *");
- Video::printStrAt(28, 24, Video::FGND_LIGHT_RED,
- "<< Press Esc to quit >>");
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- Video::clearScreen(Video::BGND_BLACK); // clear the screen...
- return Q_HANDLED();
- }
- case QUIT_SIG: {
- return Q_TRAN(&UI_top::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState UI_top::final(UI_top *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- QF::stop(); // stop QF and cleanup
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-
diff --git a/examples/80x86/dos/watcom/l/sls/ui.h b/examples/80x86/dos/watcom/l/sls/ui.h
deleted file mode 100644
index 10075f04..00000000
--- a/examples/80x86/dos/watcom/l/sls/ui.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef ui_h
-#define ui_h
-
-using namespace QP;
-
-enum UserSignals {
- QUIT_SIG = Q_USER_SIG,
-
- // insert other published signals here ...
- MAX_PUB_SIG, // the last published signal
-
- C_SIG,
- CE_SIG,
- DIGIT_0_SIG,
- DIGIT_1_9_SIG,
- POINT_SIG,
- NEG_SIG,
- ENTER_SIG,
- UP_SIG,
- DOWN_SIG,
- HELP_SIG,
-
- MAX_SIG // the last signal (keep always last)
-};
-
-struct KeyboardEvt : public QEvt {
- uint8_t key_code; // code of the key
-};
-
-//............................................................................
-class UI_top : public QActive {
-public:
- QStateHandler m_history;
- char const * const *m_help_text;
- uint16_t m_help_len;
-
-public:
- UI_top(void) : QActive((QStateHandler)&UI_top::initial) {
- }
-
-public:
- static QState initial(UI_top *me, QEvt const *e); // initial pseudostate
- static QState handler(UI_top *me, QEvt const *e);
- static QState final (UI_top *me, QEvt const *e);
-};
-//............................................................................
-class UI_mem : public UI_top {
-private:
- uint8_t m_mem[100]; // maximum size of any substate (subclass) of UI_top
-};
-//............................................................................
-class UI_num : public UI_top {
-public:
- NumEntry m_num_entry;
-
-public:
- static QState handler(UI_num *me, QEvt const *e);
-};
-Q_ASSERT_COMPILE(sizeof(UI_num) < sizeof(UI_mem));
-
-//............................................................................
-class UI_num_sd : public UI_num { // standard deviation
-public:
- double m_n;
- double m_sum;
- double m_sum_sq;
-
-public:
- static QState handler(UI_num_sd *me, QEvt const *e);
-};
-Q_ASSERT_COMPILE(sizeof(UI_num_sd) < sizeof(UI_mem));
-
-//............................................................................
-class UI_num_lr : public UI_num { // linear regression
-public:
- double m_x;
- double m_n;
- double m_xsum;
- double m_xsum_sq;
- double m_ysum;
- double m_ysum_sq;
- double m_xysum;
-
-public:
- static QState handler(UI_num_lr *me, QEvt const *e);
-};
-Q_ASSERT_COMPILE(sizeof(UI_num_lr) < sizeof(UI_mem));
-
-//............................................................................
-class UI_help : public UI_top {
-public:
- uint16_t m_help_line;
-
-public:
- static QState handler(UI_help *me, QEvt const *e);
-};
-Q_ASSERT_COMPILE(sizeof(UI_help) < sizeof(UI_mem));
-
-//----------------------------------------------------------------------------
-extern QActive * const AO_UI; // "opaque" pointer to UI Active Object
-
-#endif
diff --git a/examples/80x86/dos/watcom/l/sls/ui_help.cpp b/examples/80x86/dos/watcom/l/sls/ui_help.cpp
deleted file mode 100644
index f15d19b1..00000000
--- a/examples/80x86/dos/watcom/l/sls/ui_help.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "video.h"
-
-#define HELP_X 3
-#define HELP_Y 14
-#define HELP_DX 28
-#define HELP_DY 5
-
-//............................................................................
-static void printHelp(char const * const *txt) {
- uint8_t y;
- for (y = 0; y < HELP_DY; ++y) {
- Video::printStrAt(HELP_X, HELP_Y + y, Video::FGND_YELLOW, txt[y]);
- }
-}
-
-//............................................................................
-QState UI_help::handler(UI_help *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // instantiate the state-local objects
- Video::printStrAt(2, 10, Video::FGND_BLACK,
- "Screen 0: Help ");
- Video::clearRect( 0, 11, 35, 23, Video::BGND_BLUE);
- Video::clearRect(35, 11, 80, 23, Video::BGND_BLACK);
-
- Video::printStrAt(36, 12, Video::FGND_LIGHT_GRAY,
- "Press DOWN-Arrow to scroll down");
- Video::printStrAt(36, 13, Video::FGND_LIGHT_GRAY,
- "Press UP-Arrow to scroll up");
-
- Video::printStrAt(36, 20, Video::FGND_WHITE,
- "Press F1 to return to last screen");
-
- Video::clearRect(HELP_X - 1, HELP_Y,
- HELP_X + HELP_DX + 1, HELP_Y + HELP_DY, Video::BGND_BLACK);
- Video::drawRect (HELP_X - 2, HELP_Y - 1,
- HELP_X + HELP_DX + 2, HELP_Y + HELP_DY + 1,
- Video::FGND_WHITE,2);
-
- me->m_help_line = 0;
- printHelp(me->m_help_text + me->m_help_line);
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- // destroy the state-local objects...
- return Q_HANDLED();
- }
- case DOWN_SIG: {
- if (me->m_help_line + HELP_DY < me->m_help_len) {
- ++me->m_help_line;
- printHelp(me->m_help_text + me->m_help_line);
- }
- return Q_HANDLED();
- }
- case UP_SIG: {
- if (me->m_help_line > 0) {
- --me->m_help_line;
- printHelp(me->m_help_text + me->m_help_line);
- }
- return Q_HANDLED();
- }
- case HELP_SIG: {
- return Q_TRAN(me->m_history); // go back to the last screen
- }
- }
- return Q_SUPER(&UI_top::handler);
-}
diff --git a/examples/80x86/dos/watcom/l/sls/ui_nu_lr.cpp b/examples/80x86/dos/watcom/l/sls/ui_nu_lr.cpp
deleted file mode 100644
index a2920560..00000000
--- a/examples/80x86/dos/watcom/l/sls/ui_nu_lr.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "video.h"
-
-#include
-#include
-
-#include // for placement new
-
-class UI_num_lr_xy : public UI_num_lr { // x/y entries
-public:
- static QState x_entry(UI_num_lr_xy *me, QEvt const *e);
- static QState y_entry(UI_num_lr_xy *me, QEvt const *e);
-};
-Q_ASSERT_COMPILE(sizeof(UI_num_lr_xy) < sizeof(UI_mem));
-
-// Local objects -------------------------------------------------------------
-static QEvt const l_clear_evt = { C_SIG, 0 };
-
-#define NUM_ENTRY1_X 3
-#define NUM_ENTRY1_Y 13
-
-#define NUM_ENTRY2_X (NUM_ENTRY1_X + NUM_STR_WIDTH + 4)
-#define NUM_ENTRY2_Y 13
-
-#define NUM_ENTRY_COLOR (Video::FGND_YELLOW)
-
-//............................................................................
-QState UI_num_lr::handler(UI_num_lr *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- uint8_t c;
- static char const * const help_lr[] = {
- "Linear Regression: ",
- "Fit the line y = a*x + b, ",
- "based on n samples (xi, yi).",
- "The coefficients a and b are",
- "calculated as follows: ",
- "a = Sxy / Sxx = ",
- " (Sum(xi*yi) ",
- " -Sum(xi)*Sum(yi)/n) ",
- " /(Sum(xi*xi)-(Sum(xi)**2/n;",
- "b = yave - a*xave = ",
- " Sum(yi)/n - a*Sum(xi)/n; "
- };
- // instantiate the state-local objects
- me->m_help_text = help_lr;
- me->m_help_len = Q_DIM(help_lr);
- me->m_n = 0.0;
- me->m_xsum = 0.0;
- me->m_xsum_sq = 0.0;
- me->m_ysum = 0.0;
- me->m_ysum_sq = 0.0;
- me->m_xysum = 0.0;
-
- Video::printStrAt(2, 10, Video::FGND_BLACK,
- "Screen 2: Linear Regression ");
- Video::clearRect( 0, 11, 35, 23, Video::BGND_BLUE);
- Video::clearRect(35, 11, 80, 23, Video::BGND_BLACK);
-
- c = Video::FGND_LIGHT_GRAY;
- Video::printStrAt(36, 12, c,
- "Press '-' to enter a negative number");
- Video::printStrAt(36, 13, c,
- "Press '0' .. '9' to enter a digit");
- Video::printStrAt(36, 14, c,
- "Press '.' to enter the decimal point");
- Video::printStrAt(36, 15, c,
- "Press to move from x to y");
- Video::printStrAt(43, 16, c,
- "and again to enter the (x, y) sample");
- Video::printStrAt(36, 17, c,
- "Press 'e' or 'E' to Cancel last entry");
- Video::printStrAt(36, 18, c,
- "Press 'c' or 'C' to Cancel the data set");
-
- c = Video::FGND_WHITE;
- Video::printStrAt(36, 20, c,
- "Press UP-arrow for previous screen");
- Video::printStrAt(36, 21, c,
- "Press DOWN-arrow for next screen");
- Video::printStrAt(36, 22, c,
- "Press F1 for help");
-
- Video::clearRect(NUM_ENTRY1_X, NUM_ENTRY1_Y,
- NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 1,
- Video::BGND_BLACK);
-
- Video::clearRect(NUM_ENTRY2_X, NUM_ENTRY2_Y,
- NUM_ENTRY2_X + NUM_STR_WIDTH, NUM_ENTRY2_Y + 1,
- Video::BGND_BLACK);
-
- me->m_num_entry.config(NUM_ENTRY1_X, NUM_ENTRY1_Y,
- NUM_ENTRY_COLOR);
- me->m_num_entry.dispatch(&l_clear_evt);
-
- me->m_num_entry.config(NUM_ENTRY2_X, NUM_ENTRY2_Y,
- NUM_ENTRY_COLOR);
- me->m_num_entry.dispatch(&l_clear_evt);
-
- c = Video::FGND_WHITE; // labels
- Video::printStrAt(NUM_ENTRY1_X - 2, NUM_ENTRY1_Y, c, "x");
- Video::printStrAt(NUM_ENTRY2_X - 2, NUM_ENTRY2_Y, c, "y");
-
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 3,
- c, "y = a*x + b");
-
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 5,
- c, "n =");
-
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 6,
- c, "a =");
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 7,
- c, "b =");
-
- c = Video::FGND_YELLOW; // values
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 5, c, "0 ");
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 6, c, "N/A ");
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 7, c, "N/A ");
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- // destroy the state-local objects...
- // noting to destroy
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- // send function dictionaries for UI states...
- QS_FUN_DICTIONARY(&UI_num_lr_xy::x_entry);
- QS_FUN_DICTIONARY(&UI_num_lr_xy::y_entry);
-
- return Q_TRAN(&UI_num_lr_xy::x_entry);
- }
- case NEG_SIG:
- case DIGIT_0_SIG:
- case DIGIT_1_9_SIG:
- case POINT_SIG: {
- me->m_num_entry.dispatch(e); // dispatch to the number comp
- return Q_HANDLED();
- }
- case CE_SIG: {
- me->m_num_entry.dispatch(&l_clear_evt);
- return Q_HANDLED();
- }
- case C_SIG: {
- return Q_TRAN(&UI_num_lr::handler); // transition-to-self
- }
- case UP_SIG: {
- return Q_TRAN(&UI_num_sd::handler); // previous Screen
- }
- case DOWN_SIG: {
- return Q_TRAN(&UI_num_sd::handler); // next Screen
- }
- }
- return Q_SUPER(&UI_num::handler);
-}
-//............................................................................
-QState UI_num_lr_xy::x_entry(UI_num_lr_xy *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- Video::clearRect(NUM_ENTRY1_X, NUM_ENTRY1_Y,
- NUM_ENTRY1_X + NUM_STR_WIDTH, NUM_ENTRY1_Y + 1,
- Video::BGND_BLACK);
- // indicate the keyboard focus
- Video::drawRect(NUM_ENTRY1_X - 1, NUM_ENTRY1_Y - 1,
- NUM_ENTRY1_X + NUM_STR_WIDTH + 1, NUM_ENTRY1_Y + 2,
- Video::FGND_WHITE, 2);
-
- me->m_num_entry.config(NUM_ENTRY1_X, NUM_ENTRY1_Y,
- NUM_ENTRY_COLOR);
- me->m_num_entry.dispatch(&l_clear_evt);
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_x = me->m_num_entry.get();
- // remove the keyboard focus
- Video::drawRect(NUM_ENTRY1_X - 1, NUM_ENTRY1_Y - 1,
- NUM_ENTRY1_X + NUM_STR_WIDTH + 1, NUM_ENTRY1_Y + 2,
- Video::FGND_WHITE, 0);
- return Q_HANDLED();
- }
- case ENTER_SIG: {
- return Q_TRAN(&UI_num_lr_xy::y_entry);
- }
- }
- return Q_SUPER(&UI_num_lr::handler);
-}
-//............................................................................
-QState UI_num_lr_xy::y_entry(UI_num_lr_xy *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- Video::clearRect(NUM_ENTRY2_X, NUM_ENTRY2_Y,
- NUM_ENTRY2_X + NUM_STR_WIDTH, NUM_ENTRY2_Y + 1,
- Video::BGND_BLACK);
- // indicate the keyboard focus
- Video::drawRect(NUM_ENTRY2_X - 1, NUM_ENTRY2_Y - 1,
- NUM_ENTRY2_X + NUM_STR_WIDTH + 1, NUM_ENTRY2_Y + 2,
- Video::FGND_WHITE, 2);
-
- me->m_num_entry.config(NUM_ENTRY2_X, NUM_ENTRY2_Y,
- NUM_ENTRY_COLOR);
- me->m_num_entry.dispatch(&l_clear_evt);
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_num_entry.dispatch(&l_clear_evt);
- // remove the keyboard focus
- Video::drawRect(NUM_ENTRY2_X - 1, NUM_ENTRY2_Y - 1,
- NUM_ENTRY2_X + NUM_STR_WIDTH + 1, NUM_ENTRY2_Y + 2,
- Video::FGND_WHITE, 0);
- return Q_HANDLED();
- }
- case CE_SIG: {
- return Q_TRAN(&UI_num_lr_xy::x_entry);
- }
- case ENTER_SIG: {
- double tmp = me->m_num_entry.get(); // y
- char buf[14];
-
- me->m_n += 1.0;
- me->m_xsum += me->m_x;
- me->m_ysum += tmp;
- me->m_xsum_sq += me->m_x*me->m_x;
- me->m_ysum_sq += tmp*tmp;
- me->m_xysum += me->m_x*tmp;
-
- sprintf(buf, "%-12.6g", me->m_n); // n
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 5, Video::FGND_YELLOW, buf);
-
- tmp = me->m_xsum_sq - me->m_xsum * me->m_xsum / me->m_n;
- if ((tmp < -0.0000001) || (0.0000001 < tmp)) {
- double a = (me->m_xysum - me->m_xsum * me->m_ysum / me->m_n)
- / tmp;
- double b = (me->m_ysum - a * me->m_xsum) / me->m_n;
- sprintf(buf, "%-12.6g", a);
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 6, Video::FGND_YELLOW, buf);
- sprintf(buf, "%-12.6g", b);
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 7, Video::FGND_YELLOW, buf);
- }
- else {
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 6, Video::FGND_YELLOW, "N/A ");
- Video::printStrAt(NUM_ENTRY1_X + NUM_STR_WIDTH + 5,
- NUM_ENTRY1_Y + 7, Video::FGND_YELLOW, "N/A ");
- }
-
- return Q_TRAN(&UI_num_lr_xy::x_entry);
- }
- }
- return Q_SUPER(&UI_num_lr::handler);
-}
diff --git a/examples/80x86/dos/watcom/l/sls/ui_num.cpp b/examples/80x86/dos/watcom/l/sls/ui_num.cpp
deleted file mode 100644
index c637da96..00000000
--- a/examples/80x86/dos/watcom/l/sls/ui_num.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-//****************************************************************************
-// Product: UI with State-Local Storage Example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h" // the port of the QP framework
-#include "num_ent.h"
-#include "ui.h"
-#include "video.h"
-
-#include
-#include
-
-#include // for placement new
-
-// Local objects -------------------------------------------------------------
-static QEvt const l_clear_evt = { C_SIG, 0 };
-
-#define NUM_ENTRY_X 13
-#define NUM_ENTRY_Y 13
-#define NUM_ENTRY_COLOR (Video::FGND_YELLOW)
-
-//............................................................................
-QState UI_num::handler(UI_num *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // send object dictionaries for UI objects
- QS_OBJ_DICTIONARY(&me->m_num_entry);
-
- // instantiate the state-local objects
- new(&me->m_num_entry) NumEntry();
- // take the initial transition in the component
- me->m_num_entry.init();
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_history = me->state(); // store the history
- // destroy the state-local objects...
- me->m_num_entry.NumEntry::~NumEntry();
- return Q_HANDLED();
- }
- case Q_INIT_SIG: {
- return Q_TRAN(&UI_num_sd::handler);
- }
- case HELP_SIG: {
- return Q_TRAN(&UI_help::handler); // Help screen
- }
- }
- return Q_SUPER(&UI_top::handler);
-}
-//............................................................................
-QState UI_num_sd::handler(UI_num_sd *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- uint8_t c;
- static char const * const help_sd[] = {
- "Standard Deviation: ",
- "Find the mean value and the ",
- " root-mean-square (RMS) ",
- "deviation of n data samples ",
- "xi, where i = 1..n. ",
- "Mean value is calculated",
- "as follows: ",
- " = Sum(xi)/n; ",
- "Two RMS estimatators are ",
- "provided: ",
- "sig(n) = ",
- " sqrt(Sum(xi-)**2 / n);",
- "sig(n-1) = ",
- "sqrt(Sum(xi-)**2 / (n-1))"
- };
- // instantiate the state-local objects
- me->m_help_text = help_sd;
- me->m_help_len = Q_DIM(help_sd);
- me->m_n = 0.0;
- me->m_sum = 0.0;
- me->m_sum_sq = 0.0;
-
- Video::printStrAt(2, 10, Video::FGND_BLACK,
- "Screen 1: Standard Deviation ");
- Video::clearRect( 0, 11, 35, 23, Video::BGND_BLUE);
- Video::clearRect(35, 11, 80, 23, Video::BGND_BLACK);
-
- c = Video::FGND_LIGHT_GRAY;
- Video::printStrAt(36, 12, c,
- "Press '-' to enter a negative number");
- Video::printStrAt(36, 13, c,
- "Press '0' .. '9' to enter a digit");
- Video::printStrAt(36, 14, c,
- "Press '.' to enter the decimal point");
- Video::printStrAt(36, 15, c,
- "Press to enter the data sample");
- Video::printStrAt(36, 16, c,
- "Press 'e' or 'E' to Cancel last entry");
- Video::printStrAt(36, 17, c,
- "Press 'c' or 'C' to Cancel the data set");
-
- c = Video::FGND_WHITE;
- Video::printStrAt(36, 20, c,
- "Press UP-arrow for previous screen");
- Video::printStrAt(36, 21, c,
- "Press DOWN-arrow for next screen");
- Video::printStrAt(36, 22, c,
- "Press F1 for help");
-
- Video::clearRect(NUM_ENTRY_X, NUM_ENTRY_Y,
- NUM_ENTRY_X + NUM_STR_WIDTH, NUM_ENTRY_Y + 1,
- Video::BGND_BLACK);
- Video::drawRect(NUM_ENTRY_X - 1, NUM_ENTRY_Y - 1,
- NUM_ENTRY_X + NUM_STR_WIDTH + 1, NUM_ENTRY_Y + 2,
- Video::FGND_WHITE, 2);
-
- me->m_num_entry.config(NUM_ENTRY_X, NUM_ENTRY_Y, NUM_ENTRY_COLOR);
- me->m_num_entry.dispatch(&l_clear_evt);
-
- c = Video::FGND_WHITE; // labels
- Video::printStrAt(NUM_ENTRY_X - 1, NUM_ENTRY_Y + 4, c,
- "n =");
- Video::printStrAt(NUM_ENTRY_X - 1, NUM_ENTRY_Y + 5, c,
- " =");
- Video::printStrAt(NUM_ENTRY_X - 1, NUM_ENTRY_Y + 6, c,
- "sig(n) =");
- Video::printStrAt(NUM_ENTRY_X - 1, NUM_ENTRY_Y + 7, c,
- "sig(n-1) =");
-
- c = Video::FGND_YELLOW; // values
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 4, c,
- "0 ");
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 5, c,
- "N/A ");
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 6, c,
- "N/A ");
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 7, c,
- "N/A ");
-
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- // destroy the state-local objects...
- // noting to destroy
- return Q_HANDLED();
- }
- case C_SIG: {
- return Q_TRAN(&UI_num_sd::handler); // transition-to-self
- }
- case CE_SIG: {
- me->m_num_entry.dispatch(&l_clear_evt);
- return Q_HANDLED();
- }
- case UP_SIG: {
- return Q_TRAN(&UI_num_lr::handler); // previous Screen
- }
- case DOWN_SIG: {
- return Q_TRAN(&UI_num_lr::handler); // next Screen
- }
- case NEG_SIG:
- case DIGIT_0_SIG:
- case DIGIT_1_9_SIG:
- case POINT_SIG: {
- me->m_num_entry.dispatch(e); // dispatch to the number comp
- return Q_HANDLED();
- }
- case ENTER_SIG: {
- double tmp = me->m_num_entry.get();
- char buf[14];
-
- me->m_n += 1.0;
- me->m_sum += tmp;
- me->m_sum_sq += tmp*tmp;
-
- sprintf(buf, "%-12.6g", me->m_n);
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 4,
- Video::FGND_YELLOW, buf);
-
- tmp = me->m_sum / me->m_n; //
- sprintf(buf, "%-12.6g", tmp);
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 5,
- Video::FGND_YELLOW, buf);
-
- tmp = me->m_sum_sq / me->m_n - tmp*tmp;
- if (tmp >= 0.0) { // sigma(n)
- tmp = sqrt(tmp);
- sprintf(buf, "%-12.6g", tmp);
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 6,
- Video::FGND_YELLOW, buf);
- if (me->m_n > 1.0) { // sigma(n-1)
- tmp *= sqrt(me->m_n/(me->m_n - 1.0));
- sprintf(buf, "%-12.6g", tmp);
- Video::printStrAt(NUM_ENTRY_X + 10, NUM_ENTRY_Y + 7,
- Video::FGND_YELLOW, buf);
- }
- }
- me->m_num_entry.dispatch(&l_clear_evt);
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&UI_num::handler);
-}
diff --git a/examples/80x86/dos/watcom/l/sls/video.cpp b/examples/80x86/dos/watcom/l/sls/video.cpp
deleted file mode 100644
index 17aa472c..00000000
--- a/examples/80x86/dos/watcom/l/sls/video.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 04, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "video.h"
-
-#include
-#include
-
-Q_DEFINE_THIS_FILE
-
-#define VIDEO_BASE 0xB800
-#define VIDEO_WIDTH 80
-#define VIDEO_HEIGHT 25
-
-#define OFF(x_, y_) ((((y_) * VIDEO_WIDTH) + (x_)) * 2)
-
-//............................................................................
-void Video::clearScreen(uint8_t bgColor) {
- system("CLS");
- clearRect(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT, bgColor);
-}
-//............................................................................
-void Video::clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor)
-{
- for ( ; y1 < y2; ++y1) {
- uint8_t x;
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y1 * VIDEO_WIDTH) + x1) * 2));
- for (x = x1; x < x2; ++x) {
- pscr[0] = ' '; // Put space in video RAM
- pscr[1] = bgColor; // Put video attribute in video RAM
- pscr += 2;
- }
- }
-}
-//............................................................................
-void Video::drawRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t fgColor, uint8_t line)
-{
- static uint8_t const line_char[][6] = {
- { ' ', ' ', ' ', ' ', ' ', ' ' },
- { 0xDA, 0xBF, 0xC0, 0xD9, 0xC4, 0xB3 },
- { 0xC9, 0xBB, 0xC8, 0xBC, 0xCD, 0xBA }
- };
- enum {
- UL_CORNER,
- UR_CORNER,
- LL_CORNER,
- LR_CORNER,
- HOR_LINE,
- VER_LINE
- };
-
- Q_REQUIRE(line < Q_DIM(line_char));
- // calculate position on the video RAM (VGA)
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE, 0);
- uint16_t off;
- uint8_t xy;
-
- off = OFF(x1, y1);
- pscr[off] = line_char[line][UL_CORNER];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- off = OFF(x2 - 1, y1);
- pscr[off] = line_char[line][UR_CORNER];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- off = OFF(x1, y2 - 1);
- pscr[off] = line_char[line][LL_CORNER];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- off = OFF(x2 - 1, y2 - 1);
- pscr[off] = line_char[line][LR_CORNER];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- for (xy = x1 + 1; xy < x2 - 1; ++xy) {
- off = OFF(xy, y1);
- pscr[off] = line_char[line][HOR_LINE];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- off = OFF(xy, y2 - 1);
- pscr[off] = line_char[line][HOR_LINE];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
- }
- for (xy = y1 + 1; xy < y2 - 1; ++xy) {
- off = OFF(x1, xy);
- pscr[off] = line_char[line][VER_LINE];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
-
- off = OFF(x2 - 1, xy);
- pscr[off] = line_char[line][VER_LINE];
- pscr[off + 1] &= ~0x0F; // clear the foreground color
- pscr[off + 1] |= fgColor; // Put video attribute in video RAM
- }
-}
-//............................................................................
-void Video::printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str)
-{
- // calculate position on the video RAM (VGA)
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) * 2));
- while (*str != (uint8_t)0) {
- pscr[0] = *str++; // Put character in video RAM
- pscr[1] &= ~0x0F; // clear the foreground color
- pscr[1] |= color; // Put video attribute in video RAM
- pscr += 2;
- }
-}
-//............................................................................
-void Video::printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num) {
- char buf[4];
- buf[3] = (char)0;
- buf[2] = (char)('0' + num % 10);
- num /= 10;
- buf[1] = (char)('0' + num % 10);
- num /= 10;
- buf[0] = (char)('0' + num % 10);
- if (buf[0] == '0') {
- buf[0] = ' ';
- }
- printStrAt(x, y, color, buf);
-}
-//............................................................................
-void Video::drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height)
-{
- uint8_t far *pscrX = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) << 1));
- uint8_t ix, iy;
- uint8_t w = width;
- uint8_t h = height;
-
- // perform the clipping
- if (x > VIDEO_WIDTH) {
- x = VIDEO_WIDTH;
- }
- if (y > VIDEO_HEIGHT) {
- y = VIDEO_HEIGHT;
- }
- if (w > VIDEO_WIDTH - x) {
- w = VIDEO_WIDTH - x;
- }
- if (h > VIDEO_HEIGHT - y) {
- h = VIDEO_HEIGHT - y;
- }
-
- for (ix = 0; ix < w; ++ix, pscrX += 2) { // loop over x
- uint8_t far *pscrXY = pscrX;
- for (iy = 0; iy < h; ++iy, pscrXY += 2*VIDEO_WIDTH) {
- static uint8_t const pixel[2] = { 0x20, 0xDB };
- uint8_t byte = bitmap[ix + (iy >> 3)*width];
- *pscrXY = pixel[(byte >> (iy & 0x7)) & 1];
- }
- }
-}
-//............................................................................
-void Video::drawStringAt(uint8_t x, uint8_t y, char const *str) {
- static uint8_t const font5x7[95][5] = {
- { 0x00, 0x00, 0x00, 0x00, 0x00 }, // ' '
- { 0x00, 0x00, 0x4F, 0x00, 0x00 }, // !
- { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
- { 0x14, 0x7F, 0x14, 0x7F, 0x14 }, // #
- { 0x24, 0x2A, 0x7F, 0x2A, 0x12 }, // $
- { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %
- { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
- { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
- { 0x00, 0x1C, 0x22, 0x41, 0x00 }, // (
- { 0x00, 0x41, 0x22, 0x1C, 0x00 }, // )
- { 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
- { 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
- { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,
- { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
- { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
- { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
- { 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0
- { 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
- { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
- { 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
- { 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
- { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
- { 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
- { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
- { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
- { 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
- { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
- { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
- { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
- { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
- { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
- { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
- { 0x32, 0x49, 0x79, 0x41, 0x3E }, // @
- { 0x7E, 0x11, 0x11, 0x11, 0x7E }, // A
- { 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
- { 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
- { 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
- { 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
- { 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
- { 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
- { 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
- { 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
- { 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
- { 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
- { 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
- { 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
- { 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
- { 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
- { 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
- { 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
- { 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
- { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
- { 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
- { 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
- { 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
- { 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
- { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
- { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
- { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
- { 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
- { 0x02, 0x04, 0x08, 0x10, 0x20 }, /* \ */
- { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
- { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
- { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
- { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `
- { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
- { 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
- { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
- { 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
- { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
- { 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
- { 0x0C, 0x52, 0x52, 0x52, 0x3E }, // g
- { 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
- { 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
- { 0x20, 0x40, 0x44, 0x3D, 0x00 }, // j
- { 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
- { 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
- { 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
- { 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
- { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
- { 0x7C, 0x14, 0x14, 0x14, 0x08 }, // p
- { 0x08, 0x14, 0x14, 0x18, 0x7C }, // q
- { 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
- { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
- { 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
- { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
- { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
- { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
- { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
- { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y
- { 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z
- { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {
- { 0x00, 0x00, 0x7F, 0x00, 0x00 }, // |
- { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }
- { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
- };
-
- while (*str != '\0') {
- drawBitmapAt(x, y, font5x7[*str - ' '], 5, 8);
- ++str;
- x += 6;
- }
-}
diff --git a/examples/80x86/dos/watcom/l/sls/video.h b/examples/80x86/dos/watcom/l/sls/video.h
deleted file mode 100644
index 9637d8f3..00000000
--- a/examples/80x86/dos/watcom/l/sls/video.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef video_h
-#define video_h
-
-class Video {
-public:
- enum VideoColor {
- // foreground colors ...
- FGND_BLACK = 0x00,
- FGND_BLUE = 0x01,
- FGND_GREEN = 0x02,
- FGND_CYAN = 0x03,
- FGND_RED = 0x04,
- FGND_PURPLE = 0x05,
- FGND_BROWN = 0x06,
- FGND_LIGHT_GRAY = 0x07,
- FGND_DARK_GRAY = 0x08,
- FGND_LIGHT_BLUE = 0x09,
- FGND_LIGHT_GREEN = 0x0A,
- FGND_LIGHT_CYAN = 0x0B,
- FGND_LIGHT_RED = 0x0C,
- FGND_LIGHT_PURPLE = 0x0D,
- FGND_YELLOW = 0x0E,
- FGND_WHITE = 0x0F,
- // background colors ...
- BGND_BLACK = 0x00,
- BGND_BLUE = 0x10,
- BGND_GREEN = 0x20,
- BGND_CYAN = 0x30,
- BGND_RED = 0x40,
- BGND_PURPLE = 0x50,
- BGND_BROWN = 0x60,
- BGND_LIGHT_GRAY = 0x70,
-
- BGND_BLINK = 0x80
- };
- static void clearScreen(uint8_t bgColor);
- static void clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor);
- static void drawRect (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t fgColor, uint8_t line);
- static void printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str);
- static void printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num);
-
- static void drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height);
-
- static void drawStringAt(uint8_t x, uint8_t y, char const *str);
-};
-
-#endif // video_h
-
diff --git a/examples/80x86/qk/watcom/l/dpp/bsp.cpp b/examples/80x86/qk/watcom/l/dpp/bsp.cpp
deleted file mode 100644
index d12a3132..00000000
--- a/examples/80x86/qk/watcom/l/dpp/bsp.cpp
+++ /dev/null
@@ -1,391 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version, Open Watcom
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-#include "video.h"
-
-#include // to test the FPU
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-
-Q_DEFINE_THIS_FILE
-
-// Global-scope objects ------------------------------------------------------
-Lib1_context * volatile impure_ptr1;
-Lib2_context * volatile impure_ptr2;
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)(void);
-static void interrupt (*l_dosKbdISR)(void);
-static uint32_t l_delay = 0UL; // limit for the loop counter in busyDelay()
-
-#ifdef Q_SPY
- static uint16_t l_uart_base; // QS data uplink UART base address
- static QSTimeCtr l_tickTime; // keeps timetsamp at tick
- static uint8_t l_tmr;
- static uint8_t l_kbd;
-
- #define UART_16550_TXFIFO_DEPTH 16
-
- enum AppRecords { // application-specific trace records
- PHILO_STAT = QS_USER
- };
-#endif
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-#define TMR_ISR_PRIO (0xFF)
-#define KBD_ISR_PRIO (0xFF - 1)
-
-#define M_PI 3.14159265358979323846264338327950288
-
-static void dispPreemptions(uint8_t pisr); // for testing, see NOTE01
-static void busyDelay(void); // for testing, see NOTE02
-
-//............................................................................
-void interrupt ISR_tmr(void) {
- dispPreemptions(TMR_ISR_PRIO); // for testing only, NOTE01
-
- QK_ISR_ENTRY(); // inform QK about entering the ISR
-
- QF::TICK(&l_tmr); // call QF_tick() outside of critical section
-#ifdef Q_SPY
- l_tickTime += 0x10000; // add 16-bit rollover
-#endif
-
- busyDelay(); // for testing, NOTE02
- QK_ISR_EXIT(); // inform QK about exiting the ISR
-}
-//............................................................................
-void interrupt ISR_kbd(void) {
- dispPreemptions(KBD_ISR_PRIO); // for testing only, NOTE01
-
- QK_ISR_ENTRY(); // inform QK about entering the ISR
-
- uint8_t key = inp(0x60); // key code from the 8042 kbd controller
- uint8_t kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
- if (key == (uint8_t)129) { // ESC key pressed?
- static QEvt term = {TERMINATE_SIG, 0}; // static event
- QF::PUBLISH(&term, &l_kbd); // publish to all interested AOs
- }
- else {
- static QEvt test = {TEST_SIG, 0}; // static event
- AO_Table->POST(&test, &l_kbd); // post a test event to Table
- }
- Video::printNumAt(60, 12 + 0, Video::FGND_YELLOW, key); // display key
-
- busyDelay(); // for testing, NOTE02
- QK_ISR_EXIT(); // inform QK about exiting the ISR
-}
-//............................................................................
-void QF::onStartup(void) {
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) { // restore the original DOS vectors ...
- QF_INT_DISABLE();
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- QS_EXIT(); // exit QS
- _exit(0); // exit to DOS
-}
- //.........................................................................
-void QK::onIdle(void) {
-#ifdef Q_SPY
- if ((inp(l_uart_base + 5) & (1 << 5)) != 0) { // Tx FIFO empty?
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- QF_INT_DISABLE();
- block = QS::getBlock(&fifo); // try to get next block to transmit
- QF_INT_ENABLE();
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- }
-#endif
-}
-//............................................................................
-void BSP_init(int argc, char *argv[]) {
- if (argc > 1) {
- l_delay = atol(argv[1]); // set the delay counter for busy delay
- }
-
- char const *com = "COM1";
- if (argc > 2) {
- com = argv[2];
- com = com; // avoid the compiler warning about unused variable
- }
- if (!QS_INIT(com)) { // initialize QS
- Q_ERROR();
- }
-
- QS_OBJ_DICTIONARY(&l_tmr);
- QS_OBJ_DICTIONARY(&l_kbd);
-
- uint8_t n;
- Video::clearScreen(Video::BGND_BLACK);
- Video::clearRect( 0, 0, 80, 7, Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 11, 80, 12, Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 12, 41, 23, Video::BGND_BLUE);
- Video::clearRect(41, 12, 80, 23, Video::BGND_RED);
- Video::clearRect( 0, 23, 80, 24, Video::BGND_LIGHT_GRAY);
-
- n = Video::FGND_BLUE;
- Video::printStrAt(10, 0, n, " __");
- Video::printStrAt(10, 1, n, " / | _ _ -|- _ _");
- Video::printStrAt(10, 2, n, " \\__| | | _\\ | \\ | | | | \\ \\");
- Video::printStrAt(10, 3, n, " | \\_/ |_| | | | \\_| | | |");
- Video::printStrAt(10, 4, n, " |");
- n = Video::FGND_RED;
- Video::printStrAt(43, 0, n, " _ __ ");
- Video::printStrAt(43, 1, n, "| /_\\ | \\ TM");
- Video::printStrAt(43, 2, n, "| \\_ _ |__/ _");
- Video::printStrAt(43, 3, n, "| _\\ | |_");
- Video::printStrAt(43, 4, n, "|___ |_| | _|");
- Video::printStrAt(10, 5, Video::FGND_BLUE,
- "_____________________________________________________");
- Video::printStrAt(10, 6, Video::FGND_RED,
- "i n n o v a t i n g e m b e d d e d s y s t e m s");
- Video::printStrAt(18, 7, Video::FGND_WHITE,
- "Dining Philosophers Problem (DPP)");
- Video::printStrAt(18, 8, Video::FGND_WHITE, "QEP/C++");
- Video::printStrAt(28, 8, Video::FGND_YELLOW, QEP::getVersion());
- Video::printStrAt(18, 9, Video::FGND_WHITE, "QF/C++");
- Video::printStrAt(28, 9, Video::FGND_YELLOW, QF::getVersion());
- Video::printStrAt(18, 10, Video::FGND_WHITE, "QK/C++");
- Video::printStrAt(28, 10, Video::FGND_YELLOW, QK::getVersion());
- Video::printStrAt(41, 10, Video::FGND_WHITE, "Delay Counter");
- Video::printNumAt(56, 10, Video::FGND_YELLOW, l_delay);
-
- Video::printStrAt( 1, 11, Video::FGND_BLUE,
- "Active Object State Preemptions");
-
- Video::printStrAt(42, 11, Video::FGND_RED,
- "ISR Calls Data Preemptions");
- for (n = 0; n < N_PHILO; ++n) {
- Video::printStrAt( 1, 12 + n, Video::FGND_WHITE, "Philosopher");
- Video::printNumAt(12, 12 + n, Video::FGND_WHITE, n);
- }
- Video::printStrAt( 1, 12 + N_PHILO, Video::FGND_WHITE, "Table");
- Video::printStrAt(17, 12 + N_PHILO, Video::FGND_YELLOW, "serving");
-
- Video::printStrAt(42, 12 + 0, Video::FGND_WHITE, "kbdISR");
- Video::printStrAt(42, 12 + 1, Video::FGND_WHITE, "tmrISR");
-
- Video::printStrAt(10, 23, Video::FGND_BLUE,
- "* Copyright (c) Quantum Leaps, LLC * www.quantum-leaps.com *");
- Video::printStrAt(28, 24, Video::FGND_LIGHT_RED,
- "<< Press Esc to quit >>");
-}
-//............................................................................
-void BSP_displyPhilStat(uint8_t n, char const *stat) {
- Video::printStrAt(17, 12 + n, Video::FGND_YELLOW, stat);
-
- QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
- QS_U8(1, n); // Philosopher number
- QS_STR(stat); // Philosopher status
- QS_END()
-}
-//............................................................................
-void Q_onAssert(char const Q_ROM * const Q_ROM_VAR file, int line) {
- Video::clearRect(0, 24, 80, 25, Video::BGND_RED);
- Video::printStrAt(0, 24, Video::FGND_WHITE, "ASSERTION FAILED in file:");
- Video::printStrAt(26, 24, Video::FGND_YELLOW, file);
- Video::printStrAt(57, 24, Video::FGND_WHITE, "line:");
- Video::printNumAt(62, 24, Video::FGND_YELLOW, line);
- QF::stop();
-}
-//............................................................................
-void busyDelay(void) { // for testing
- uint32_t volatile i = l_delay << 4;
- while (i-- > 0UL) { // busy-wait loop
- }
-}
-//............................................................................
-void dispPreemptions(uint8_t pisr) { // for testing, see NOTE01
- if (pisr == TMR_ISR_PRIO) {
- static uint32_t tmrIsrCtr; // timer interrupt counter
- Video::printNumAt(51, 12 + 1, Video::FGND_YELLOW, ++tmrIsrCtr);
- }
- else if (pisr == KBD_ISR_PRIO) {
- static uint32_t kbdIsrCtr; // kbd interrupt counter
- Video::printNumAt(51, 12 + 0, Video::FGND_YELLOW, ++kbdIsrCtr);
- }
- else {
- Q_ERROR(); // unexpected interrupt priority
- }
-
- if (QK_intNest_ == (uint8_t)0) { // is this a task preemption?
- if (QK_currPrio_ > (uint8_t)0) {
- static uint32_t preCtr[QF_MAX_ACTIVE + 1];
- Video::printNumAt(30, 12 + QK_currPrio_ - 1, Video::FGND_YELLOW,
- ++preCtr[QK_currPrio_]);
- }
- }
- else if (QK_intNest_ == (uint8_t)1) { // this is an ISR preemption
- if (pisr == TMR_ISR_PRIO) { // TMR_ISR preempting KBD_ISR?
- static uint32_t kbdPreCtr; // kbd ISR preemption counter
- Video::printNumAt(71, 12 + 0, Video::FGND_YELLOW, ++kbdPreCtr);
- }
- else {
- static uint32_t tmrPreCtr; // tmr ISR preemption counter
- Video::printNumAt(71, 12 + 1, Video::FGND_YELLOW, ++tmrPreCtr);
- }
- }
- else {
- Q_ERROR(); // impossible ISR nesting level with just 2 ISRs
- }
-}
-
-//----------------------------------------------------------------------------
-void lib1_reent_init(uint8_t prio) {
- impure_ptr1->x = (double)prio * (M_PI / 6.0);
-}
-//............................................................................
-void lib1_test(void) {
- uint32_t volatile i = l_delay;
- while (i-- > 0UL) {
- double volatile r = sin(impure_ptr1->x) * sin(impure_ptr1->x)
- + cos(impure_ptr1->x) * cos(impure_ptr1->x);
- Q_ASSERT(fabs(r - 1.0) < 1e-99);
- }
-}
-//----------------------------------------------------------------------------
-void lib2_reent_init(uint8_t prio) {
- impure_ptr2->y = (double)prio * (M_PI / 6.0) + M_PI;
-}
-//............................................................................
-void lib2_test(void) {
- uint32_t volatile i = l_delay;
- while (i-- > 0UL) {
- double volatile r = sin(impure_ptr2->y) * sin(impure_ptr2->y)
- + cos(impure_ptr2->y) * cos(impure_ptr2->y);
- Q_ASSERT(fabs(r - 1.0) < 1e-99);
- }
-}
-
-//----------------------------------------------------------------------------
-#ifdef Q_SPY // define QS callbacks
-
-//............................................................................
-static bool UART_config(char const *comName, uint32_t baud) {
- switch (comName[3]) { // Set the base address of the COMx port
- case '1': l_uart_base = (uint16_t)0x03F8; break; // COM1
- case '2': l_uart_base = (uint16_t)0x02F8; break; // COM2
- case '3': l_uart_base = (uint16_t)0x03E8; break; // COM3
- case '4': l_uart_base = (uint16_t)0x02E8; break; // COM4
- default: return (uint8_t)0; // COM port out of range failure
- }
- baud = (uint16_t)(115200UL / baud); // divisor for baud rate
- outp(l_uart_base + 3, (1 << 7)); // Set divisor access bit (DLAB)
- outp(l_uart_base + 0, (uint8_t)baud); // Load divisor
- outp(l_uart_base + 1, (uint8_t)(baud >> 8));
- outp(l_uart_base + 3, (1 << 1) | (1 << 0)); // LCR:8-bits,no p,1stop
- outp(l_uart_base + 4, (1 << 3) | (1 << 1) | (1 << 0)); // DTR,RTS,Out
- outp(l_uart_base + 1, 0); // Put UART into the polling FIFO mode
- outp(l_uart_base + 2, (1 << 2) | (1 << 0)); // FCR: enable, TX clear
-
- return true; // success
-}
-//............................................................................
-bool QS::onStartup(void const *arg) {
- static uint8_t qsBuf[1*1024]; // buffer for Quantum Spy
- initBuf(qsBuf, sizeof(qsBuf));
- return UART_config((char const *)arg, 115200UL);
-}
-//............................................................................
-void QS::onCleanup(void) {
-}
-//............................................................................
-QSTimeCtr QS::onGetTime(void) { // invoked with interrupts locked
- static uint32_t l_lastTime;
- uint32_t now;
- uint16_t count16; // 16-bit count from the 8254
-
- outp(0x43, 0); // latch the 8254's counter-0 count
- count16 = (uint16_t)inp(0x40); // read the low byte of counter-0
- count16 += ((uint16_t)inp(0x40) << 8); // add on the hi byte
-
- now = l_tickTime + (0x10000 - count16);
-
- if (l_lastTime > now) { // are we going "back" in time?
- now += 0x10000; // assume that there was one rollover
- }
- l_lastTime = now;
-
- return (QSTimeCtr)now;
-}
-//............................................................................
-void QS::onFlush(void) {
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- while ((block = getBlock(&fifo)) != (uint8_t *)0) {
- // busy-wait until TX FIFO empty
- while ((inp(l_uart_base + 5) & (1 << 5)) == 0) {
- }
-
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- fifo = UART_16550_TXFIFO_DEPTH; // re-load 16550 Tx FIFO depth
- }
-}
-#endif // Q_SPY
-//----------------------------------------------------------------------------
-
-
-//****************************************************************************
-// NOTE01:
-// The function call to displayPreemptions() is added only to monitor the
-// "asynchronous" preemptions within the QK.
-//
-// NOTE02:
-// The call to busyDelay() is added only to extend the execution
-// time of the code to increase the chance of an "asynchronous" preemption.
-//
diff --git a/examples/80x86/qk/watcom/l/dpp/bsp.h b/examples/80x86/qk/watcom/l/dpp/bsp.h
deleted file mode 100644
index 056f75a5..00000000
--- a/examples/80x86/qk/watcom/l/dpp/bsp.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.2.00
-// Date of the Last Update: Jul 15, 2011
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2011 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#define BSP_TICKS_PER_SEC 18
-
-void BSP_init(int argc, char *argv[]);
-void BSP_displyPhilStat(uint8_t n, char const *stat);
-
-void lib1_reent_init(uint8_t seed);
-void lib1_test(void);
-
-void lib2_reent_init(uint8_t seed);
-void lib2_test(void);
-
-#endif // bsp_h
diff --git a/examples/80x86/qk/watcom/l/dpp/dpp.h b/examples/80x86/qk/watcom/l/dpp/dpp.h
deleted file mode 100644
index 22ffeb05..00000000
--- a/examples/80x86/qk/watcom/l/dpp/dpp.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef dpp_h
-#define dpp_h
-
-using namespace QP;
-
-enum DPPSignals {
- EAT_SIG = Q_USER_SIG, // published by Table to let a philosopher eat
- DONE_SIG, // published by Philosopher when done eating
- TERMINATE_SIG, // published by BSP to terminate the application
- MAX_PUB_SIG, // the last published signal
-
- HUNGRY_SIG, // posted from hungry Philosopher to Table
- TEST_SIG, // for testing
- MAX_SIG // the last signal
-};
-
-struct TableEvt : public QEvt {
- uint8_t philoNum; // philosopher number
-};
-
-enum { N_PHILO = 5 }; // number of philosophers
-
-void Philo_start(uint8_t n,
- uint8_t p, QEvt const *qSto[], uint32_t qLen);
-void Table_start(uint8_t p, QEvt const *qSto[], uint32_t qLen);
-
-extern QActive * const AO_Philo[N_PHILO]; // "opaque" pointers to Philo AO
-extern QActive * const AO_Table; // "opaque" pointer to Table AO
-
-#endif // dpp_h
diff --git a/examples/80x86/qk/watcom/l/dpp/inc_qp.rsp b/examples/80x86/qk/watcom/l/dpp/inc_qp.rsp
deleted file mode 100644
index e3734a9b..00000000
--- a/examples/80x86/qk/watcom/l/dpp/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\qk\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/qk/watcom/l/dpp/link_dbg.rsp b/examples/80x86/qk/watcom/l/dpp/link_dbg.rsp
deleted file mode 100644
index 039e450c..00000000
--- a/examples/80x86/qk/watcom/l/dpp/link_dbg.rsp
+++ /dev/null
@@ -1,2 +0,0 @@
-Name dbg\dpp.exe File dbg\bsp.obj,dbg\main.obj,dbg\philo.obj,dbg\table.obj,dbg\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qk.lib
-
diff --git a/examples/80x86/qk/watcom/l/dpp/link_rel.rsp b/examples/80x86/qk/watcom/l/dpp/link_rel.rsp
deleted file mode 100644
index 6b086bb5..00000000
--- a/examples/80x86/qk/watcom/l/dpp/link_rel.rsp
+++ /dev/null
@@ -1,2 +0,0 @@
-Name rel\dpp.exe File rel\bsp.obj,rel\main.obj,rel\philo.obj,rel\table.obj,rel\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qk.lib
-
diff --git a/examples/80x86/qk/watcom/l/dpp/link_spy.rsp b/examples/80x86/qk/watcom/l/dpp/link_spy.rsp
deleted file mode 100644
index 6205c123..00000000
--- a/examples/80x86/qk/watcom/l/dpp/link_spy.rsp
+++ /dev/null
@@ -1,2 +0,0 @@
-Name spy\dpp.exe File spy\bsp.obj,spy\main.obj,spy\philo.obj,spy\table.obj,spy\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qk.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qs.lib
-
diff --git a/examples/80x86/qk/watcom/l/dpp/main.cpp b/examples/80x86/qk/watcom/l/dpp/main.cpp
deleted file mode 100644
index 83bf2857..00000000
--- a/examples/80x86/qk/watcom/l/dpp/main.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-// Local-scope objects -------------------------------------------------------
-static QEvt const *l_tableQueueSto[N_PHILO];
-static QEvt const *l_philoQueueSto[N_PHILO][N_PHILO];
-static QSubscrList l_subscrSto[MAX_PUB_SIG];
-
-static union SmallEvents {
- void *e0; // minimum event size
- uint8_t e1[sizeof(TableEvt)];
- // ... other event types to go into this pool
-} l_smlPoolSto[2*N_PHILO]; // storage for the small event pool
-
-//............................................................................
-int main(int argc, char *argv[]) {
-
- BSP_init(argc, argv); // initialize the BSP
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // object dictionaries...
- QS_OBJ_DICTIONARY(l_smlPoolSto);
- QS_OBJ_DICTIONARY(l_tableQueueSto);
- QS_OBJ_DICTIONARY(l_philoQueueSto[0]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[1]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[2]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[3]);
- QS_OBJ_DICTIONARY(l_philoQueueSto[4]);
-
- // globally published signal dictionaries...
- QS_SIG_DICTIONARY(DONE_SIG, (void *)0);
- QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
- QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
-
- QF::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe
-
- // initialize event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
-
- // start the active objects...
- uint8_t n;
- for (n = 0; n < N_PHILO; ++n) {
- Philo_start(n, (uint8_t)(n + 1),
- l_philoQueueSto[n], Q_DIM(l_philoQueueSto[n]));
- }
- Table_start((uint8_t)(N_PHILO + 1),
- l_tableQueueSto, Q_DIM(l_tableQueueSto));
-
- return QF::run(); // run the QF application
-}
-
diff --git a/examples/80x86/qk/watcom/l/dpp/make.bat b/examples/80x86/qk/watcom/l/dpp/make.bat
deleted file mode 100644
index 53f75860..00000000
--- a/examples/80x86/qk/watcom/l/dpp/make.bat
+++ /dev/null
@@ -1,78 +0,0 @@
-@echo off
-:: ===========================================================================
-:: QP/C++ DPP example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 26, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-if not "%1"=="rel" goto spy
- echo rel selected
- set BINDIR=rel
- set CCFLAGS=-d0 -ml -3 -fpi87 -ot -dNDEBUG
- set LDFLAGS=@link_rel.rsp
-goto compile
-:spy
-if not "%1"=="spy" goto dbg
- echo spy selected
- set BINDIR=spy
- set CCFLAGS=-d2 -ml -3 -fpi87 -dQ_SPY
- set LDFLAGS=@link_spy.rsp
-goto compile
-:dbg
- echo default selected
- set BINDIR=dbg
- set CCFLAGS=-d2 -ml -3 -fpi87
- set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-:compile
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\philo.obj %SRCDIR%\philo.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\table.obj %SRCDIR%\table.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\video.obj %SRCDIR%\video.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/qk/watcom/l/dpp/philo.cpp b/examples/80x86/qk/watcom/l/dpp/philo.cpp
deleted file mode 100644
index 7fe56698..00000000
--- a/examples/80x86/qk/watcom/l/dpp/philo.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-#include /* for rand()/srand() */
-
-Q_DEFINE_THIS_FILE
-
-// Active object class -------------------------------------------------------
-class Philo : public QActive {
-private:
- ThreadContext m_context; // thread context
- QTimeEvt m_timeEvt; // to timeout thinking or eating
-
-public:
- Philo();
-
-private:
- static QState initial (Philo *me, QEvt const *e);
- static QState thinking(Philo *me, QEvt const *e);
- static QState hungry (Philo *me, QEvt const *e);
- static QState eating (Philo *me, QEvt const *e);
-
- friend void Philo_start(uint8_t n,
- uint8_t p, QEvt const *qSto[], uint32_t qLen);
-};
-
-// Local objects -------------------------------------------------------------
-static Philo l_philo[N_PHILO]; // storage for all Philos
-
-#define THINK_TIME (BSP_TICKS_PER_SEC/2)
-#define EAT_TIME (BSP_TICKS_PER_SEC/5)
-
- // helper macro to provide the ID of Philo "me_"
-#define PHILO_ID(me_) ((uint8_t)((me_) - l_philo))
-
-enum InternalSignals { // internal signals
- TIMEOUT_SIG = MAX_SIG
-};
-// Global objects ------------------------------------------------------------
-QActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AOs
- &l_philo[0],
- &l_philo[1],
- &l_philo[2],
- &l_philo[3],
- &l_philo[4]
-};
-
-//............................................................................
-void Philo_start(uint8_t n,
- uint8_t p, QEvt const *qSto[], uint32_t qLen)
-{
- Philo *me = &l_philo[n];
-
- impure_ptr1 = &me->m_context.lib1; // initialize reentrant library1
- lib1_reent_init(p);
- impure_ptr2 = &me->m_context.lib2; // initialize reentrant library2
- lib2_reent_init(p);
-
- me->start(p, qSto, qLen, &me->m_context,
- (uint8_t)(QK_LIB1_THREAD | QK_LIB2_THREAD | QK_FPU_THREAD));
-}
-//............................................................................
-Philo::Philo()
- : QActive((QStateHandler)&Philo::initial),
- m_timeEvt(TIMEOUT_SIG)
-{}
-//............................................................................
-QState Philo::initial(Philo *me, QEvt const *) {
- static uint8_t registered; // starts off with 0, per C-standard
- if (!registered) {
- QS_OBJ_DICTIONARY(&l_philo[0]);
- QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[1]);
- QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[2]);
- QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[3]);
- QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
- QS_OBJ_DICTIONARY(&l_philo[4]);
- QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
-
- QS_FUN_DICTIONARY(&Philo::initial);
- QS_FUN_DICTIONARY(&Philo::thinking);
- QS_FUN_DICTIONARY(&Philo::hungry);
- QS_FUN_DICTIONARY(&Philo::eating);
-
- srand(1234); // initialize the random number generator
-
- registered = (uint8_t)1;
- }
- QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
- QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
-
- me->subscribe(EAT_SIG);
-
- return Q_TRAN(&Philo::thinking);
-}
-//............................................................................
-QState Philo::thinking(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- QTimeEvtCtr think_time;
-
- QMutex mutex = QK::mutexLock(N_PHILO);
- think_time = (QTimeEvtCtr)(5.0*rand()/RAND_MAX + THINK_TIME);
- QK::mutexUnlock(mutex);
-
- me->m_timeEvt.postIn(me, think_time);
- return Q_HANDLED();
- }
- case TIMEOUT_SIG: {
- lib1_test();
- lib2_test();
- return Q_TRAN(&Philo::hungry);
- }
- case EAT_SIG: // intentionally fall-through
- case DONE_SIG: {
- // EAT or DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Philo::hungry(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
- pe->philoNum = PHILO_ID(me);
- AO_Table->POST(pe, me);
- return Q_HANDLED();
- }
- case EAT_SIG: {
- if (((TableEvt *)e)->philoNum == PHILO_ID(me)) {
- lib1_test();
- lib2_test();
- return Q_TRAN(&Philo::eating);
- }
- break;
- }
- case DONE_SIG: {
- // DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Philo::eating(Philo *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- QTimeEvtCtr eat_time;
-
- QMutex mutex = QK::mutexLock(N_PHILO);
- eat_time = (QTimeEvtCtr)(5.0*rand()/RAND_MAX + EAT_TIME);
- QK::mutexUnlock(mutex);
-
- me->m_timeEvt.postIn(me, eat_time);
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
- pe->philoNum = PHILO_ID(me);
- QF::PUBLISH(pe, me);
- return Q_HANDLED();
- }
- case TIMEOUT_SIG: {
- lib1_test();
- lib2_test();
- return Q_TRAN(&Philo::thinking);
- }
- case EAT_SIG: // intentionally fall-through
- case DONE_SIG: {
- // EAT or DONE must be for other Philos than this one
- Q_ASSERT(((TableEvt const *)e)->philoNum != PHILO_ID(me));
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-
diff --git a/examples/80x86/qk/watcom/l/dpp/table.cpp b/examples/80x86/qk/watcom/l/dpp/table.cpp
deleted file mode 100644
index 5e2297f2..00000000
--- a/examples/80x86/qk/watcom/l/dpp/table.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-//****************************************************************************
-// Product: DPP example, QK version
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "dpp.h"
-#include "bsp.h"
-
-Q_DEFINE_THIS_FILE
-
-// Active object class -------------------------------------------------------
-class Table : public QActive {
-private:
- ThreadContext m_context; // thread context
- uint8_t m_fork[N_PHILO];
- uint8_t m_isHungry[N_PHILO];
-
-public:
- Table();
-
-private:
- static QState initial(Table *me, QEvt const *e);
- static QState serving(Table *me, QEvt const *e);
-
- friend void Table_start(uint8_t p, QEvt const *qSto[], uint32_t qLen);
-};
-
-#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1)) % N_PHILO))
-#define LEFT(n_) ((uint8_t)(((n_) + 1) % N_PHILO))
-enum ForkState { FREE, USED };
-
-// Local objects -------------------------------------------------------------
-static Table l_table; // local Table object
-
-// Public-scope objects ------------------------------------------------------
-QActive * const AO_Table = &l_table; // "opaque" AO pointer
-
-//............................................................................
-void Table_start(uint8_t p, QEvt const *qSto[], uint32_t qLen) {
- Table *me = &l_table;
-
- impure_ptr1 = &me->m_context.lib1; // initialize reentrant library1
- lib1_reent_init(p);
- impure_ptr2 = &me->m_context.lib2; // initialize reentrant library2
- lib2_reent_init(p);
-
- me->start(p, qSto, qLen, &me->m_context,
- (uint8_t)(QK_LIB1_THREAD | QK_LIB2_THREAD | QK_FPU_THREAD));
-}
-//............................................................................
-Table::Table() : QActive((QStateHandler)&Table::initial) {
- uint8_t n;
- for (n = 0; n < N_PHILO; ++n) {
- m_fork[n] = FREE;
- m_isHungry[n] = 0;
- }
-}
-//............................................................................
-QState Table::initial(Table *me, QEvt const *) {
-
- QS_OBJ_DICTIONARY(&l_table);
- QS_FUN_DICTIONARY(&QHsm::top);
- QS_FUN_DICTIONARY(&Table::initial);
- QS_FUN_DICTIONARY(&Table::serving);
- QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for Table
-
- me->subscribe(DONE_SIG);
- me->subscribe(TERMINATE_SIG);
-
- return Q_TRAN(&Table::serving);
-}
-//............................................................................
-QState Table::serving(Table *me, QEvt const *e) {
- uint8_t n, m;
- TableEvt *pe;
-
- switch (e->sig) {
- case HUNGRY_SIG: {
- lib1_test();
- lib2_test();
- n = ((TableEvt const *)e)->philoNum;
- // phil ID must be in range and he must be not hungry
- Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
-
- BSP_displyPhilStat(n, "hungry ");
- m = LEFT(n);
- if ((me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)) {
- me->m_fork[m] = me->m_fork[n] = USED;
- pe = Q_NEW(TableEvt, EAT_SIG);
- pe->philoNum = n;
- QF::PUBLISH(pe, me);
- BSP_displyPhilStat(n, "eating ");
- }
- else {
- me->m_isHungry[n] = 1;
- }
- return Q_HANDLED();
- }
- case DONE_SIG: {
- lib1_test();
- lib2_test();
- n = ((TableEvt const *)e)->philoNum;
- // phil ID must be in range and he must be not hungry
- Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
-
- BSP_displyPhilStat(n, "thinking");
- m = LEFT(n);
- // both forks of Phil[n] must be used
- Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
-
- me->m_fork[m] = me->m_fork[n] = FREE;
- m = RIGHT(n); // check the right neighbor
- if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
- me->m_fork[n] = me->m_fork[m] = USED;
- me->m_isHungry[m] = 0;
- pe = Q_NEW(TableEvt, EAT_SIG);
- pe->philoNum = m;
- QF::PUBLISH(pe, me);
- BSP_displyPhilStat(m, "eating ");
- }
- m = LEFT(n); // check the left neighbor
- n = LEFT(m); // left fork of the left neighbor
- if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
- me->m_fork[m] = me->m_fork[n] = USED;
- me->m_isHungry[m] = 0;
- pe = Q_NEW(TableEvt, EAT_SIG);
- pe->philoNum = m;
- QF::PUBLISH(pe, me);
- BSP_displyPhilStat(m, "eating ");
- }
- return Q_HANDLED();
- }
- case TEST_SIG: {
- lib1_test();
- lib2_test();
- return Q_HANDLED();
- }
- case TERMINATE_SIG: {
- QF::stop();
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
diff --git a/examples/80x86/qk/watcom/l/dpp/video.cpp b/examples/80x86/qk/watcom/l/dpp/video.cpp
deleted file mode 100644
index 6a35c1fd..00000000
--- a/examples/80x86/qk/watcom/l/dpp/video.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 02, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "video.h"
-
-#include
-#include
-
-#define VIDEO_BASE 0xB800
-#define VIDEO_WIDTH 80
-#define VIDEO_HEIGHT 25
-
-//............................................................................
-void Video::clearScreen(uint8_t bgColor) {
- system("CLS");
- clearRect(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT, bgColor);
-}
-//............................................................................
-void Video::clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor)
-{
- for ( ; y1 < y2; ++y1) {
- uint8_t x;
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y1 * VIDEO_WIDTH) + x1) * 2));
- for (x = x1; x < x2; ++x) {
- pscr[0] = ' '; // Put space in video RAM
- pscr[1] = bgColor; // Put video attribute in video RAM
- pscr += 2;
- }
- }
-}
-//............................................................................
-void Video::printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str)
-{
- // calculate position on the video RAM (VGA)
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) * 2));
- while (*str != (uint8_t)0) {
- pscr[0] = *str++; // Put character in video RAM
- pscr[1] &= ~0x0F; // clear the foreground color
- pscr[1] |= color; // Put video attribute in video RAM
- pscr += 2;
- }
-}
-//............................................................................
-void Video::printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num) {
- char buf[4];
- buf[3] = (char)0;
- buf[2] = (char)('0' + num % 10);
- num /= 10;
- buf[1] = (char)('0' + num % 10);
- num /= 10;
- buf[0] = (char)('0' + num % 10);
- if (buf[0] == '0') {
- buf[0] = ' ';
- }
- printStrAt(x, y, color, buf);
-}
-//............................................................................
-void Video::drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height)
-{
- uint8_t far *pscrX = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) << 1));
- uint8_t ix, iy;
- uint8_t w = width;
- uint8_t h = height;
-
- // perform the clipping
- if (x > VIDEO_WIDTH) {
- x = VIDEO_WIDTH;
- }
- if (y > VIDEO_HEIGHT) {
- y = VIDEO_HEIGHT;
- }
- if (w > VIDEO_WIDTH - x) {
- w = VIDEO_WIDTH - x;
- }
- if (h > VIDEO_HEIGHT - y) {
- h = VIDEO_HEIGHT - y;
- }
-
- for (ix = 0; ix < w; ++ix, pscrX += 2) { // loop over x
- uint8_t far *pscrXY = pscrX;
- for (iy = 0; iy < h; ++iy, pscrXY += 2*VIDEO_WIDTH) {
- static uint8_t const pixel[2] = { 0x20, 0xDB };
- uint8_t byte = bitmap[ix + (iy >> 3)*width];
- *pscrXY = pixel[(byte >> (iy & 0x7)) & 1];
- }
- }
-}
-//............................................................................
-void Video::drawStringAt(uint8_t x, uint8_t y, char const *str) {
- static uint8_t const font5x7[95][5] = {
- { 0x00, 0x00, 0x00, 0x00, 0x00 }, // ' '
- { 0x00, 0x00, 0x4F, 0x00, 0x00 }, // !
- { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
- { 0x14, 0x7F, 0x14, 0x7F, 0x14 }, // #
- { 0x24, 0x2A, 0x7F, 0x2A, 0x12 }, // $
- { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %
- { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
- { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
- { 0x00, 0x1C, 0x22, 0x41, 0x00 }, // (
- { 0x00, 0x41, 0x22, 0x1C, 0x00 }, // )
- { 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
- { 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
- { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,
- { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
- { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
- { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
- { 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0
- { 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
- { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
- { 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
- { 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
- { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
- { 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
- { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
- { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
- { 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
- { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
- { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
- { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
- { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
- { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
- { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
- { 0x32, 0x49, 0x79, 0x41, 0x3E }, // @
- { 0x7E, 0x11, 0x11, 0x11, 0x7E }, // A
- { 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
- { 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
- { 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
- { 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
- { 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
- { 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
- { 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
- { 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
- { 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
- { 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
- { 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
- { 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
- { 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
- { 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
- { 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
- { 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
- { 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
- { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
- { 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
- { 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
- { 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
- { 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
- { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
- { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
- { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
- { 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
- { 0x02, 0x04, 0x08, 0x10, 0x20 }, /* \ */
- { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
- { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
- { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
- { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `
- { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
- { 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
- { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
- { 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
- { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
- { 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
- { 0x0C, 0x52, 0x52, 0x52, 0x3E }, // g
- { 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
- { 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
- { 0x20, 0x40, 0x44, 0x3D, 0x00 }, // j
- { 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
- { 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
- { 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
- { 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
- { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
- { 0x7C, 0x14, 0x14, 0x14, 0x08 }, // p
- { 0x08, 0x14, 0x14, 0x18, 0x7C }, // q
- { 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
- { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
- { 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
- { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
- { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
- { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
- { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
- { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y
- { 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z
- { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {
- { 0x00, 0x00, 0x7F, 0x00, 0x00 }, // |
- { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }
- { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
- };
-
- while (*str != '\0') {
- drawBitmapAt(x, y, font5x7[*str - ' '], 5, 8);
- ++str;
- x += 6;
- }
-}
diff --git a/examples/80x86/qk/watcom/l/dpp/video.h b/examples/80x86/qk/watcom/l/dpp/video.h
deleted file mode 100644
index 2b221a63..00000000
--- a/examples/80x86/qk/watcom/l/dpp/video.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef video_h
-#define video_h
-
-class Video {
-public:
- enum VideoColor {
- // foreground colors ...
- FGND_BLACK = 0x00,
- FGND_BLUE = 0x01,
- FGND_GREEN = 0x02,
- FGND_CYAN = 0x03,
- FGND_RED = 0x04,
- FGND_PURPLE = 0x05,
- FGND_BROWN = 0x06,
- FGND_LIGHT_GRAY = 0x07,
- FGND_DARK_GRAY = 0x08,
- FGND_LIGHT_BLUE = 0x09,
- FGND_LIGHT_GREEN = 0x0A,
- FGND_LIGHT_CYAN = 0x0B,
- FGND_LIGHT_RED = 0x0C,
- FGND_LIGHT_PURPLE = 0x0D,
- FGND_YELLOW = 0x0E,
- FGND_WHITE = 0x0F,
- // background colors ...
- BGND_BLACK = 0x00,
- BGND_BLUE = 0x10,
- BGND_GREEN = 0x20,
- BGND_CYAN = 0x30,
- BGND_RED = 0x40,
- BGND_PURPLE = 0x50,
- BGND_BROWN = 0x60,
- BGND_LIGHT_GRAY = 0x70,
-
- BGND_BLINK = 0x80
- };
- static void clearScreen(uint8_t bgColor);
- static void clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor);
- static void printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str);
- static void printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num);
-
- static void drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height);
-
- static void drawStringAt(uint8_t x, uint8_t y, char const *str);
-};
-
-#endif // video_h
-
diff --git a/examples/80x86/qk/watcom/l/game/bsp.cpp b/examples/80x86/qk/watcom/l/game/bsp.cpp
deleted file mode 100644
index 5eabc9e0..00000000
--- a/examples/80x86/qk/watcom/l/game/bsp.cpp
+++ /dev/null
@@ -1,367 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game, QK version
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "game.h"
-#include "bsp.h"
-#include "video.h"
-
-#include // to test the FPU
-#include // for _dos_setvect()/_dos_getvect()
-#include // for inp()/outp()
-#include // for _exit()
-
-Q_DEFINE_THIS_FILE
-
-// Global-scope objects ------------------------------------------------------
-Lib1_context * volatile impure_ptr1;
-Lib2_context * volatile impure_ptr2;
-
-// Local-scope objects -------------------------------------------------------
-static void interrupt (*l_dosTmrISR)(void);
-static void interrupt (*l_dosKbdISR)(void);
-
-#ifdef Q_SPY
- static uint16_t l_uart_base; // QS data uplink UART base address
- QSTimeCtr l_tickTime; // keeps timetsamp at tick
- static uint8_t l_tmr;
- static uint8_t l_kbd;
-
- #define UART_16550_TXFIFO_DEPTH 16
-#endif
-
-#define TMR_VECTOR 0x08
-#define KBD_VECTOR 0x09
-
-//............................................................................
-static void interrupt ISR_tmr(void) {
- QK_ISR_ENTRY(); // inform QK about entering the ISR
-
- QF::TICK(&l_tmr); // process all armed time events
- static QEvt const tickEvt = { TIME_TICK_SIG, 0 };
- QF::PUBLISH(&tickEvt, &l_tmr); // publish the tick event
-
-#ifdef Q_SPY
- l_tickTime += 0x10000;
-#endif
-
- QK_ISR_EXIT(); // inform QK about exiting the ISR
-}
-//............................................................................
-static void interrupt ISR_kbd(void) {
- static uint8_t ship_pos = GAME_SHIP_Y;
- uint8_t key;
- uint8_t kcr;
-
- QK_ISR_ENTRY(); // inform QK about entering the ISR
-
- key = inp(0x60); // key scan code from 8042 kbd controller
- kcr = inp(0x61); // get keyboard control register
- outp(0x61, (uint8_t)(kcr | 0x80)); // toggle acknowledge bit high
- outp(0x61, kcr); // toggle acknowledge bit low
-
- switch (key) {
- case 200: // Up-arrow
- case 208: { // Down-arrow
- ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
- if ((key == (uint8_t)200) && (ship_pos > 0x00)) {
- --ship_pos;
- }
- else if ((key == (uint8_t)208)
- && (ship_pos < (GAME_SCREEN_HEIGHT - 3))) {
- ++ship_pos;
- }
- ope->x = (uint8_t)GAME_SHIP_X; // x-position is fixed
- ope->y = (uint8_t)ship_pos;
- AO_Ship->POST(ope, &l_kbd); // post to the ship
-
- Video::printNumAt(24, 24, Video::FGND_YELLOW, ship_pos);
- break;
- }
- case 57: { // Space
- static uint16_t ntrig = 0;
- static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0 };
- QF::PUBLISH(&fireEvt, &l_kbd);
-
- Video::printNumAt(47, 24, Video::FGND_YELLOW, ++ntrig);
- break;
- } // Esc
- case 129: {
- static QEvt const quitEvt = { PLAYER_QUIT_SIG, 0 };
- QF::PUBLISH(&quitEvt, &l_kbd);
- break;
- }
- }
-
- QK_ISR_EXIT(); // inform QK about exiting the ISR
-}
-//............................................................................
-void BSP_init(int argc, char *argv[]) {
- char const *com = "COM1";
-
- com = com; // avoid compiler warning if QS is not used
-
- if (argc > 1) {
- com = argv[1];
- }
- if (!QS_INIT(com)) { // initialize QS
- Q_ERROR();
- }
-
- QS_OBJ_DICTIONARY(&l_tmr);
- QS_OBJ_DICTIONARY(&l_kbd);
-
- Video::clearScreen(Video::BGND_LIGHT_GRAY);
- Video::clearRect( 0, 0, 80, 1, Video::BGND_RED | Video::BGND_BLINK);
- Video::clearRect( 0, 8, 80, 24, Video::BGND_BLACK | Video::FGND_WHITE);
- Video::clearRect( 0, 7, 80, 8, Video::BGND_BLUE);
- Video::clearRect( 0, 24, 80, 25, Video::BGND_BLUE);
-
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED | Video::BGND_BLINK);
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED | Video::BGND_BLINK);
-
- Video::printStrAt(35, 0, Video::FGND_WHITE, "FLY 'n' SHOOT");
- Video::printStrAt(15, 2, Video::FGND_BLACK,
- "Press UP-arrow to move the space ship up");
- Video::printStrAt(15, 3, Video::FGND_BLACK,
- "Press DOWN-arrow to move the space ship down");
- Video::printStrAt(15, 4, Video::FGND_BLACK,
- "Press SPACE to fire the missile");
- Video::printStrAt(15, 5, Video::FGND_BLACK,
- "Press ESC to quit the game");
- Video::printStrAt( 8, 24, Video::FGND_WHITE, "Ship Position:");
- Video::printStrAt(37, 24, Video::FGND_WHITE, "Triggers:");
- Video::printStrAt(61, 24, Video::FGND_WHITE, "Score:");
-
- Video::clearRect(24, 24, 28, 25, Video::BGND_RED);
- Video::clearRect(47, 24, 51, 25, Video::BGND_RED);
- Video::clearRect(68, 24, 72, 25, Video::BGND_RED);
- Video::printNumAt(24, 24, Video::FGND_YELLOW, 0);
- Video::printNumAt(47, 24, Video::FGND_YELLOW, 0);
- Video::printNumAt(68, 24, Video::FGND_YELLOW, 0);
-}
-//............................................................................
-void BSP_drawBitmap(uint8_t const *bitmap, uint8_t width, uint8_t height) {
- Video::drawBitmapAt(0, 8, bitmap, width, height);
-}
-//............................................................................
-void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
- Video::drawStringAt(x, 8 + y*8, str);
-}
-//............................................................................
-void BSP_updateScore(uint16_t score) {
- if (score == 0) {
- Video::clearRect(68, 24, 72, 25, Video::BGND_RED);
- }
- Video::printNumAt(68, 24, Video::FGND_YELLOW, score);
-}
-//............................................................................
-void BSP_displayOn(void) {
-}
-//............................................................................
-void BSP_displayOff(void) {
- Video::clearRect( 0, 8, 80, 24, Video::BGND_BLACK | Video::FGND_WHITE);
-}
-
-//............................................................................
-void QF::onStartup(void) {
- uint16_t count;
- // save the origingal DOS vectors ...
- l_dosTmrISR = _dos_getvect(TMR_VECTOR);
- l_dosKbdISR = _dos_getvect(KBD_VECTOR);
-
- QF_INT_DISABLE();
-
- count = (uint16_t)(((1193180 * 2) / BSP_TICKS_PER_SEC + 1) >> 1);
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, count & 0xFF); // load low byte of timer 0
- outp(0x40, (count >> 8) & 0xFF); // load high byte of timer 0
-
- _dos_setvect(TMR_VECTOR, &ISR_tmr);
- _dos_setvect(KBD_VECTOR, &ISR_kbd);
- QF_INT_ENABLE();
-}
-//............................................................................
-void QF::onCleanup(void) {
- // restore the DOS system clock tick rate...
- QF_INT_DISABLE();
- outp(0x43, 0x36); // use mode-3 for timer 0 in the 8254
- outp(0x40, 0); // load low byte of timer 0
- outp(0x40, 0); // load high byte of timer 0
- // restore the original DOS vectors ...
- _dos_setvect(TMR_VECTOR, l_dosTmrISR);
- _dos_setvect(KBD_VECTOR, l_dosKbdISR);
- QF_INT_ENABLE();
-
- QS_EXIT(); // exit QS
- _exit(0); // exit to DOS
-}
-//............................................................................
-void QK::onIdle(void) {
-#ifdef Q_SPY
- if ((inp(l_uart_base + 5) & (1 << 5)) != 0) { // Tx FIFO empty?
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- QF_INT_DISABLE();
- block = QS::getBlock(&fifo); // try to get next block to transmit
- QF_INT_ENABLE();
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- }
-#endif
-}
-//----------------------------------------------------------------------------
-void Q_onAssert(char const Q_ROM * const Q_ROM_VAR file, int line) {
- Video::clearRect ( 0, 24, 80, 25, Video::BGND_RED);
- Video::printStrAt( 0, 24, Video::FGND_WHITE, "ASSERTION FAILED in file:");
- Video::printStrAt(26, 24, Video::FGND_YELLOW, file);
- Video::printStrAt(57, 24, Video::FGND_WHITE, "line:");
- Video::printNumAt(62, 24, Video::FGND_YELLOW, line);
-
- QF::stop(); // stop QF and cleanup
-}
-
-//----------------------------------------------------------------------------
-#ifdef Q_SPY
-
-//............................................................................
-static bool UART_config(char const *comName, uint32_t baud) {
- switch (comName[3]) { // Set the base address of the COMx port
- case '1': l_uart_base = (uint16_t)0x03F8; break; // COM1
- case '2': l_uart_base = (uint16_t)0x02F8; break; // COM2
- case '3': l_uart_base = (uint16_t)0x03E8; break; // COM3
- case '4': l_uart_base = (uint16_t)0x02E8; break; // COM4
- default: return (uint8_t)0; // COM port out of range failure
- }
- baud = (uint16_t)(115200UL / baud); // divisor for baud rate
- outp(l_uart_base + 3, (1 << 7)); // Set divisor access bit (DLAB)
- outp(l_uart_base + 0, (uint8_t)baud); // Load divisor
- outp(l_uart_base + 1, (uint8_t)(baud >> 8));
- outp(l_uart_base + 3, (1 << 1) | (1 << 0)); // LCR:8-bits,no p,1stop
- outp(l_uart_base + 4, (1 << 3) | (1 << 1) | (1 << 0)); // DTR,RTS,Out
- outp(l_uart_base + 1, 0); // Put UART into the polling FIFO mode
- outp(l_uart_base + 2, (1 << 2) | (1 << 0)); // FCR: enable, TX clear
-
- return true; // success
-}
-//............................................................................
-bool QS::onStartup(void const *arg) {
- static uint8_t qsBuf[1*1024]; // buffer for Quantum Spy
- initBuf(qsBuf, sizeof(qsBuf));
- // setup the QS filters...
- QS_FILTER_ON(QS_ALL_RECORDS);
-
-// QS_FILTER_OFF(QS_QEP_STATE_EMPTY);
-// QS_FILTER_OFF(QS_QEP_STATE_ENTRY);
-// QS_FILTER_OFF(QS_QEP_STATE_EXIT);
-// QS_FILTER_OFF(QS_QEP_STATE_INIT);
-// QS_FILTER_OFF(QS_QEP_INIT_TRAN);
-// QS_FILTER_OFF(QS_QEP_INTERN_TRAN);
-// QS_FILTER_OFF(QS_QEP_TRAN);
-// QS_FILTER_OFF(QS_QEP_IGNORED);
-
- QS_FILTER_OFF(QS_QF_ACTIVE_ADD);
- QS_FILTER_OFF(QS_QF_ACTIVE_REMOVE);
- QS_FILTER_OFF(QS_QF_ACTIVE_SUBSCRIBE);
- QS_FILTER_OFF(QS_QF_ACTIVE_UNSUBSCRIBE);
- QS_FILTER_OFF(QS_QF_ACTIVE_POST_FIFO);
- QS_FILTER_OFF(QS_QF_ACTIVE_POST_LIFO);
- QS_FILTER_OFF(QS_QF_ACTIVE_GET);
- QS_FILTER_OFF(QS_QF_ACTIVE_GET_LAST);
- QS_FILTER_OFF(QS_QF_EQUEUE_INIT);
- QS_FILTER_OFF(QS_QF_EQUEUE_POST_FIFO);
- QS_FILTER_OFF(QS_QF_EQUEUE_POST_LIFO);
- QS_FILTER_OFF(QS_QF_EQUEUE_GET);
- QS_FILTER_OFF(QS_QF_EQUEUE_GET_LAST);
- QS_FILTER_OFF(QS_QF_MPOOL_INIT);
- QS_FILTER_OFF(QS_QF_MPOOL_GET);
- QS_FILTER_OFF(QS_QF_MPOOL_PUT);
- QS_FILTER_OFF(QS_QF_PUBLISH);
- QS_FILTER_OFF(QS_QF_NEW);
- QS_FILTER_OFF(QS_QF_GC_ATTEMPT);
- QS_FILTER_OFF(QS_QF_GC);
-// QS_FILTER_OFF(QS_QF_TICK);
- QS_FILTER_OFF(QS_QF_TIMEEVT_ARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_AUTO_DISARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_DISARM_ATTEMPT);
- QS_FILTER_OFF(QS_QF_TIMEEVT_DISARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_REARM);
- QS_FILTER_OFF(QS_QF_TIMEEVT_POST);
- QS_FILTER_OFF(QS_QF_CRIT_ENTRY);
- QS_FILTER_OFF(QS_QF_CRIT_EXIT);
- QS_FILTER_OFF(QS_QF_ISR_ENTRY);
- QS_FILTER_OFF(QS_QF_ISR_EXIT);
-
- return UART_config((char const *)arg, 115200UL);
-}
-//............................................................................
-void QS::onCleanup(void) {
-}
-//............................................................................
-QSTimeCtr QS::onGetTime(void) { // invoked with interrupts locked
- static uint32_t l_lastTime;
- uint32_t now;
- uint16_t count16; // 16-bit count from the 8254
-
- outp(0x43, 0); // latch the 8254's counter-0 count
- count16 = (uint16_t)inp(0x40); // read the low byte of counter-0
- count16 += ((uint16_t)inp(0x40) << 8); // add on the hi byte
-
- now = l_tickTime + (0x10000 - count16);
-
- if (l_lastTime > now) { // are we going "back" in time?
- now += 0x10000; // assume that there was one rollover
- }
- l_lastTime = now;
-
- return (QSTimeCtr)now;
-}
-//............................................................................
-void QS::onFlush(void) {
- uint16_t fifo = UART_16550_TXFIFO_DEPTH; // 16550 Tx FIFO depth
- uint8_t const *block;
- while ((block = getBlock(&fifo)) != (uint8_t *)0) {
- // busy-wait until TX FIFO empty
- while ((inp(l_uart_base + 5) & (1 << 5)) == 0) {
- }
-
- while (fifo-- != 0) { // any bytes in the block?
- outp(l_uart_base + 0, *block++);
- }
- fifo = UART_16550_TXFIFO_DEPTH; // re-load 16550 Tx FIFO depth
- }
-}
-#endif // Q_SPY
-//----------------------------------------------------------------------------
diff --git a/examples/80x86/qk/watcom/l/game/bsp.h b/examples/80x86/qk/watcom/l/game/bsp.h
deleted file mode 100644
index 9fb35915..00000000
--- a/examples/80x86/qk/watcom/l/game/bsp.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.1.03
-// Date of the Last Update: Feb 19, 2010
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2010 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef bsp_h
-#define bsp_h
-
-#define BSP_TICKS_PER_SEC 30
-#define BSP_SCREEN_WIDTH 80
-#define BSP_SCREEN_HEIGHT 16
-
-void BSP_init(int argc, char *argv[]);
-void BSP_drawBitmap(uint8_t const *bitmap,
- uint8_t width, // with of the bitmap in pixels
- uint8_t height); // height of the bitmap in pixels
-void BSP_drawNString(uint8_t x, // x in pixels
- uint8_t y, // y position in chars
- char const *str);
-void BSP_updateScore(uint16_t score);
-
-void BSP_displayOn(void);
-void BSP_displayOff(void);
-
-#endif // bsp_h
diff --git a/examples/80x86/qk/watcom/l/game/game.h b/examples/80x86/qk/watcom/l/game/game.h
deleted file mode 100644
index 9fe193b3..00000000
--- a/examples/80x86/qk/watcom/l/game/game.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.02
-// Date of the Last Update: Aug 15, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef game_h
-#define game_h
-
-using namespace QP;
-
-enum GameSignals { // signals used in the game
- TIME_TICK_SIG = Q_USER_SIG, // published from tick ISR
- PLAYER_TRIGGER_SIG, // published by Player (ISR) to trigger the Missile
- PLAYER_QUIT_SIG, // published by Player (ISR) to quit the game
- GAME_OVER_SIG, // published by Ship when it finishes exploding
-
- // insert other published signals here ...
- MAX_PUB_SIG, // the last published signal
-
- PLAYER_SHIP_MOVE_SIG, // posted by Player (ISR) to the Ship to move it
-
-
- BLINK_TIMEOUT_SIG, // signal for Tunnel's blink timeout event
- SCREEN_TIMEOUT_SIG, // signal for Tunnel's screen timeout event
-
- TAKE_OFF_SIG, // from Tunnel to Ship to grant permission to take off
- HIT_WALL_SIG, // from Tunnel to Ship when Ship hits the wall
- HIT_MINE_SIG, // from Mine to Ship or Missile when it hits the mine
- SHIP_IMG_SIG, // from Ship to the Tunnel to draw and check for hits
- MISSILE_IMG_SIG, // from Missile the Tunnel to draw and check for hits
- MINE_IMG_SIG, // sent by Mine to the Tunnel to draw the mine
- MISSILE_FIRE_SIG, // sent by Ship to the Missile to fire
- DESTROYED_MINE_SIG, // from Missile to Ship when Missile destroyed Mine
- EXPLOSION_SIG, // from any exploding object to render the explosion
- MINE_PLANT_SIG, // from Tunnel to the Mine to plant it
- MINE_DISABLED_SIG, // from Mine to Tunnel when it becomes disabled
- MINE_RECYCLE_SIG, // sent by Tunnel to Mine to recycle the mine
- SCORE_SIG, // from Ship to Tunnel to adjust game level based on score
-
- MAX_SIG // the last signal (keep always last)
-};
-
-struct ObjectPosEvt : public QEvt { // derive from the QEvt class
- uint8_t x; // the x-position of the object
- uint8_t y; // new y-position of the object
-};
-
-struct ObjectImageEvt : public QEvt { // derive from the QEvt class
- uint8_t x; // the x-position of the object
- int8_t y; // the y-position of the object
- uint8_t bmp; // the bitmap ID representing the object
-};
-
-struct MineEvt : public QEvt { // derive from the QEvt class
- uint8_t id; // the ID of the Mine
- MineEvt(QSignal sig, uint8_t id) {
- this->sig = sig;
- this->poolId_ = 0;
- this->id = id;
- }
-};
-
-struct ScoreEvt : public QEvt { // derive from the QEvt class
- uint16_t score; // the current score
- ScoreEvt(QSignal sig, uint16_t score) {
- this->sig = sig;
- this->poolId_ = 0;
- this->score = score;
- }
-};
-
-#define GAME_SCREEN_WIDTH BSP_SCREEN_WIDTH
-#define GAME_SCREEN_HEIGHT BSP_SCREEN_HEIGHT
-#define GAME_MINES_MAX 5
-#define GAME_MINES_DIST_MIN 10
-#define GAME_SPEED_X 1
-#define GAME_MISSILE_SPEED_X 2
-#define GAME_SHIP_X 10
-#define GAME_SHIP_Y (GAME_SCREEN_HEIGHT / 2)
-
-enum GameBitmapIds {
- PRESS_BUTTON_BMP,
- SHIP_BMP,
- MISSILE_BMP,
- MINE1_BMP,
- MINE2_BMP,
- MINE2_MISSILE_BMP,
- EXPLOSION0_BMP,
- EXPLOSION1_BMP,
- EXPLOSION2_BMP,
- EXPLOSION3_BMP,
- MAX_BMP
-};
-
-// opaque pointers to active objects in the application
-extern QActive * const AO_Tunnel;
-extern QActive * const AO_Ship;
-extern QActive * const AO_Missile;
-
-uint8_t do_bitmaps_overlap(uint8_t bmp_id1, uint8_t x1, uint8_t y1,
- uint8_t bmp_id2, uint8_t x2, uint8_t y2);
-
-// obtain instances of the Mines orthogonal components
-QHsm *Mine1_getInst(uint8_t id);
-QHsm *Mine2_getInst(uint8_t id);
-
-#endif // game_h
diff --git a/examples/80x86/qk/watcom/l/game/inc_qp.rsp b/examples/80x86/qk/watcom/l/game/inc_qp.rsp
deleted file mode 100644
index e3734a9b..00000000
--- a/examples/80x86/qk/watcom/l/game/inc_qp.rsp
+++ /dev/null
@@ -1 +0,0 @@
--i=..\..\..\..\..\..\include -i=..\..\..\..\..\..\ports\80x86\qk\watcom\l
\ No newline at end of file
diff --git a/examples/80x86/qk/watcom/l/game/link_dbg.rsp b/examples/80x86/qk/watcom/l/game/link_dbg.rsp
deleted file mode 100644
index 63de3746..00000000
--- a/examples/80x86/qk/watcom/l/game/link_dbg.rsp
+++ /dev/null
@@ -1,2 +0,0 @@
-Name dbg\game.exe File dbg\bsp.obj,dbg\main.obj,dbg\mine1.obj,dbg\mine2.obj,dbg\missile.obj,dbg\ship.obj,dbg\tunnel.obj,dbg\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\dbg\qk.lib
-
diff --git a/examples/80x86/qk/watcom/l/game/link_rel.rsp b/examples/80x86/qk/watcom/l/game/link_rel.rsp
deleted file mode 100644
index 097e9216..00000000
--- a/examples/80x86/qk/watcom/l/game/link_rel.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name rel\game.exe File rel\bsp.obj,rel\main.obj,rel\mine1.obj,rel\mine2.obj,rel\missile.obj,rel\ship.obj,rel\tunnel.obj,rel\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\rel\qk.lib
diff --git a/examples/80x86/qk/watcom/l/game/link_spy.rsp b/examples/80x86/qk/watcom/l/game/link_spy.rsp
deleted file mode 100644
index b8efa1c2..00000000
--- a/examples/80x86/qk/watcom/l/game/link_spy.rsp
+++ /dev/null
@@ -1 +0,0 @@
-Name spy\game.exe File spy\bsp.obj,spy\main.obj,spy\mine1.obj,spy\mine2.obj,spy\missile.obj,spy\ship.obj,spy\tunnel.obj,spy\video.obj Library ..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qf.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qep.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qk.lib,..\..\..\..\..\..\ports\80x86\qk\watcom\l\spy\qs.lib
\ No newline at end of file
diff --git a/examples/80x86/qk/watcom/l/game/main.cpp b/examples/80x86/qk/watcom/l/game/main.cpp
deleted file mode 100644
index 90525cdd..00000000
--- a/examples/80x86/qk/watcom/l/game/main.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-// Local-scope objects -------------------------------------------------------
-static QEvt const * l_missileQueueSto[2];
-static QEvt const * l_shipQueueSto[3];
-static QEvt const * l_tunnelQueueSto[GAME_MINES_MAX + 5];
-
-static union SmallEvents {
- void *e0; // minimum event size
- uint8_t e1[sizeof(QEvt)];
- // ... other event types to go into this pool
-} l_smlPoolSto[10]; // storage for the small event pool
-
-static union MediumEvents {
- void *e0; // minimum event size
- uint8_t e1[sizeof(ObjectPosEvt)];
- uint8_t e2[sizeof(ObjectImageEvt)];
- uint8_t e3[sizeof(MineEvt)];
- uint8_t e4[sizeof(ScoreEvt)];
- // ... other event types to go into this pool
-} l_medPoolSto[2*GAME_MINES_MAX + 8]; // storage for the medium event pool
-
-static QSubscrList l_subscrSto[MAX_PUB_SIG];
-
-//............................................................................
-int main(int argc, char *argv[]) {
-
- BSP_init(argc, argv); // initialize the Board Support Package
-
- QF::init(); // initialize the framework and the underlying RT kernel
-
- // initialize the event pools...
- QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0]));
- QF::poolInit(l_medPoolSto, sizeof(l_medPoolSto), sizeof(l_medPoolSto[0]));
-
- QF::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe
-
- // send object dictionaries for event queues...
- QS_OBJ_DICTIONARY(l_missileQueueSto);
- QS_OBJ_DICTIONARY(l_shipQueueSto);
- QS_OBJ_DICTIONARY(l_tunnelQueueSto);
-
- // send object dictionaries for event pools...
- QS_OBJ_DICTIONARY(l_smlPoolSto);
- QS_OBJ_DICTIONARY(l_medPoolSto);
-
- // send signal dictionaries for globally published events...
- QS_SIG_DICTIONARY(TIME_TICK_SIG, static_cast(0));
- QS_SIG_DICTIONARY(PLAYER_TRIGGER_SIG, static_cast(0));
- QS_SIG_DICTIONARY(PLAYER_QUIT_SIG, static_cast(0));
- QS_SIG_DICTIONARY(GAME_OVER_SIG, static_cast(0));
-
- // start the active objects...
- AO_Missile->start(1, // priority
- l_missileQueueSto, Q_DIM(l_missileQueueSto),// evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
- AO_Ship ->start(2, // priority
- l_shipQueueSto, Q_DIM(l_shipQueueSto), // evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
- AO_Tunnel ->start(3, // priority
- l_tunnelQueueSto, Q_DIM(l_tunnelQueueSto), // evt queue
- (void *)0, 0, // no per-thread stack
- (QEvt *)0); // no initialization event
-
- return QF::run(); // run the QF application
-}
diff --git a/examples/80x86/qk/watcom/l/game/make.bat b/examples/80x86/qk/watcom/l/game/make.bat
deleted file mode 100644
index e50ec7d5..00000000
--- a/examples/80x86/qk/watcom/l/game/make.bat
+++ /dev/null
@@ -1,81 +0,0 @@
-@echo off
-:: ===========================================================================
-:: "Fly 'n' Shoot" game example, 80x86, Vanilla port, Open Watcom compiler
-:: Last Updated for Version: 4.4.00
-:: Date of the Last Update: Apr 19, 2012
-::
-:: Q u a n t u m L e a P s
-:: ---------------------------
-:: innovating embedded systems
-::
-:: Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-::
-:: This software may be distributed and modified under the terms of the GNU
-:: General Public License version 2 (GPL) as published by the Free Software
-:: Foundation and appearing in the file GPL.TXT included in the packaging of
-:: this file. Please note that GPL Section 2[b] requires that all works based
-:: on this software must also be made publicly available under the terms of
-:: the GPL ("Copyleft").
-::
-:: Alternatively, this software may be distributed and modified under the
-:: terms of Quantum Leaps commercial licenses, which expressly supersede
-:: the GPL and are specifically designed for licensees interested in
-:: retaining the proprietary status of their code.
-::
-:: Contact information:
-:: Quantum Leaps Web site: http://www.quantum-leaps.com
-:: e-mail: info@quantum-leaps.com
-:: ===========================================================================
-
-:: If you have defined the WATCOM environment variable, the following line has
-:: no effect and your definition is used. However, if the varible WATCOM is
-:: not defined, the following default is assuemed:
-if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
-
-path %WATCOM%\binw
-set INCLUDE=%WATCOM%\H
-set CC=wpp.exe
-set AS=wasm.exe
-set LD=wlink.exe
-
-if not "%1"=="rel" goto spy
- echo rel selected
- set BINDIR=rel
- set CCFLAGS=-d0 -ml -3 -fpi87 -ot -dNDEBUG
- set LDFLAGS=@link_rel.rsp
-goto compile
-:spy
-if not "%1"=="spy" goto dbg
- echo spy selected
- set BINDIR=spy
- set CCFLAGS=-d2 -ml -3 -fpi87 -dQ_SPY
- set LDFLAGS=@link_spy.rsp
-goto compile
-:dbg
- echo default selected
- set BINDIR=dbg
- set CCFLAGS=-d2 -ml -3 -fpi87
- set LDFLAGS=@link_dbg.rsp
-
-:: compile -------------------------------------------------------------------
-:compile
-mkdir %BINDIR%
-set SRCDIR=.
-set CCINC=@inc_qp.rsp
-
-@echo on
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\bsp.obj %SRCDIR%\bsp.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\main.obj %SRCDIR%\main.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\mine1.obj %SRCDIR%\mine1.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\mine2.obj %SRCDIR%\mine2.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\missile.obj %SRCDIR%\missile.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\ship.obj %SRCDIR%\ship.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\tunnel.obj %SRCDIR%\tunnel.cpp
-%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\video.obj %SRCDIR%\video.cpp
-@echo off
-
-
-:: link ----------------------------------------------------------------------
-@echo on
-%LD% %LDFLAGS%
-@echo off
diff --git a/examples/80x86/qk/watcom/l/game/mine1.cpp b/examples/80x86/qk/watcom/l/game/mine1.cpp
deleted file mode 100644
index 21fb07af..00000000
--- a/examples/80x86/qk/watcom/l/game/mine1.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Mine1 : public QHsm { // extend the QHsm class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Mine1(void) : QHsm((QStateHandler)&Mine1::initial) {}
-
-private:
- static QState initial (Mine1 *me, QEvt const *e);
- static QState unused (Mine1 *me, QEvt const *e);
- static QState used (Mine1 *me, QEvt const *e);
- static QState planted (Mine1 *me, QEvt const *e);
- static QState exploding(Mine1 *me, QEvt const *e);
-};
-
-static Mine1 l_mine1[GAME_MINES_MAX]; // a pool of type-1 mines
-
- // helper macro to provide the ID of this mine
-#define MINE_ID(me_) ((me_) - l_mine1)
-
-//............................................................................
-QHsm *Mine1_getInst(uint8_t id) {
- Q_REQUIRE(id < GAME_MINES_MAX);
- return &l_mine1[id];
-}
-//............................................................................
-QState Mine1::initial(Mine1 *me, QEvt const *) {
- static uint8_t dict_sent;
- if (!dict_sent) {
- QS_OBJ_DICTIONARY(&l_mine1[0]); // obj. dictionaries for Mine1 pool
- QS_OBJ_DICTIONARY(&l_mine1[1]);
- QS_OBJ_DICTIONARY(&l_mine1[2]);
- QS_OBJ_DICTIONARY(&l_mine1[3]);
- QS_OBJ_DICTIONARY(&l_mine1[4]);
-
- QS_FUN_DICTIONARY(&Mine1::initial); // fun. dictionaries for Mine1 HSM
- QS_FUN_DICTIONARY(&Mine1::unused);
- QS_FUN_DICTIONARY(&Mine1::used);
- QS_FUN_DICTIONARY(&Mine1::planted);
- QS_FUN_DICTIONARY(&Mine1::exploding);
-
- dict_sent = 1;
- }
-
- QS_SIG_DICTIONARY(MINE_PLANT_SIG, me); // local signals
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, me);
- QS_SIG_DICTIONARY(MINE_RECYCLE_SIG, me);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, me);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, me);
-
- return Q_TRAN(&Mine1::unused);
-}
-//............................................................................
-QState Mine1::unused(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_PLANT_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Mine1::planted);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine1::used(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_EXIT_SIG: {
- // tell the Tunnel that this mine is becoming disabled
- MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG);
- mev->id = MINE_ID(me);
- AO_Tunnel->POST(mev, me);
- return Q_HANDLED();
- }
- case MINE_RECYCLE_SIG: {
- return Q_TRAN(&Mine1::unused);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine1::planted(Mine1 *me, QEvt const *e) {
- uint8_t x;
- uint8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case TIME_TICK_SIG: {
- if (me->m_x >= GAME_SPEED_X) {
- ObjectImageEvt *oie;
-
- me->m_x -= GAME_SPEED_X; // move the mine 1 step
-
- // tell the Tunnel to draw the Mine
- oie = Q_NEW(ObjectImageEvt, MINE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MINE1_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Ship hitting this mine
- if (do_bitmaps_overlap(MINE1_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Hit event with the type of the Mine1
- static MineEvt const mine1_hit(HIT_MINE_SIG, 1);
- AO_Ship->POST(&mine1_hit, me);
-
- // go straight to 'disabled' and let the Ship do the exploding
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Missile hitting this mine
- if (do_bitmaps_overlap(MINE1_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Score event with the score for destroying Mine1
- static ScoreEvt const mine1_destroyed(DESTROYED_MINE_SIG, 25);
- AO_Missile->POST(&mine1_destroyed, me);
- return Q_TRAN(&Mine1::exploding);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine1::used);
-}
-//............................................................................
-QState Mine1::exploding(Mine1 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move explosion by 1 step
-
- // tell the Game to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 1; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + 2); // y of explosion
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine1::unused);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine1::used);
-}
diff --git a/examples/80x86/qk/watcom/l/game/mine2.cpp b/examples/80x86/qk/watcom/l/game/mine2.cpp
deleted file mode 100644
index 0d7d9786..00000000
--- a/examples/80x86/qk/watcom/l/game/mine2.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Mine2 : public QHsm { // extend the QHsm class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Mine2(void) : QHsm((QStateHandler)&Mine2::initial) {}
-
-private:
- static QState initial (Mine2 *me, QEvt const *e);
- static QState unused (Mine2 *me, QEvt const *e);
- static QState used (Mine2 *me, QEvt const *e);
- static QState planted (Mine2 *me, QEvt const *e);
- static QState exploding(Mine2 *me, QEvt const *e);
-};
-
-
-static Mine2 l_mine2[GAME_MINES_MAX]; // a pool of type-2 mines
-
- // helper macro to provide the ID of this mine
-#define MINE_ID(me_) ((me_) - l_mine2)
-
-//............................................................................
-QHsm *Mine2_getInst(uint8_t id) {
- Q_REQUIRE(id < GAME_MINES_MAX);
- return &l_mine2[id];
-}
-//............................................................................
-QState Mine2::initial(Mine2 *me, QEvt const *) {
- static uint8_t dict_sent;
- if (!dict_sent) {
- QS_OBJ_DICTIONARY(&l_mine2[0]); // obj. dictionaries for Mine2 pool
- QS_OBJ_DICTIONARY(&l_mine2[1]);
- QS_OBJ_DICTIONARY(&l_mine2[2]);
- QS_OBJ_DICTIONARY(&l_mine2[3]);
- QS_OBJ_DICTIONARY(&l_mine2[4]);
-
- QS_FUN_DICTIONARY(&Mine2::initial); // fun. dictionaries for Mine2 HSM
- QS_FUN_DICTIONARY(&Mine2::unused);
- QS_FUN_DICTIONARY(&Mine2::used);
- QS_FUN_DICTIONARY(&Mine2::planted);
- QS_FUN_DICTIONARY(&Mine2::exploding);
-
- dict_sent = 1;
- }
-
- QS_SIG_DICTIONARY(MINE_PLANT_SIG, me); // local signals
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, me);
- QS_SIG_DICTIONARY(MINE_RECYCLE_SIG, me);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, me);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, me);
-
- return Q_TRAN(&Mine2::unused);
-}
-//............................................................................
-QState Mine2::unused(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_PLANT_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Mine2::planted);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine2::used(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_EXIT_SIG: {
- // tell the Tunnel that this mine is becoming disabled
- MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG);
- mev->id = MINE_ID(me);
- AO_Tunnel->POST(mev, me);
- return Q_HANDLED();
- }
- case MINE_RECYCLE_SIG: {
- return Q_TRAN(&Mine2::unused);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Mine2::planted(Mine2 *me, QEvt const *e) {
- uint8_t x;
- uint8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case TIME_TICK_SIG: {
- if (me->m_x >= GAME_SPEED_X) {
- ObjectImageEvt *oie;
-
- me->m_x -= GAME_SPEED_X; // move the mine 1 step
-
- // tell the Tunnel to draw the Mine
- oie = Q_NEW(ObjectImageEvt, MINE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MINE2_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Ship hitting this mine
- if (do_bitmaps_overlap(MINE2_BMP, me->m_x, me->m_y, bmp, x, y)) {
- // Hit event with the type of the Mine2
- static MineEvt const mine2_hit(HIT_MINE_SIG, 2);
- AO_Ship->POST(&mine2_hit, me);
-
- // go straight to 'disabled' and let the Ship do the exploding
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (uint8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // test for incoming Missile hitting this mine
- // NOTE: Mine type-2 is nastier than Mine type-1.
- // The type-2 mine can hit the Ship with any of its
- // "tentacles". However, it can be destroyed by the
- // Missile only by hitting its center, defined as
- // a smaller bitmap MINE2_MISSILE_BMP.
- if (do_bitmaps_overlap(MINE2_MISSILE_BMP,
- me->m_x, me->m_y, bmp, x, y))
- {
- // Score event with the score for destroying Mine2
- static ScoreEvt const mine2_destroyed(DESTROYED_MINE_SIG, 45);
- AO_Missile->POST(&mine2_destroyed, me);
- return Q_TRAN(&Mine2::exploding);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine2::used);
-}
-//............................................................................
-QState Mine2::exploding(Mine2 *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move explosion by 1 step
-
- // tell the Game to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 1; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + 2); // y of explosion
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else {
- return Q_TRAN(&Mine2::unused);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Mine2::used);
-}
diff --git a/examples/80x86/qk/watcom/l/game/missile.cpp b/examples/80x86/qk/watcom/l/game/missile.cpp
deleted file mode 100644
index 7ebcda4b..00000000
--- a/examples/80x86/qk/watcom/l/game/missile.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-// Q_DEFINE_THIS_FILE
-
-// local objects -------------------------------------------------------------
-class Missile : public QActive { // extend the QActive class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
-
-public:
- Missile(void) : QActive((QStateHandler)&Missile::initial) {}
-
-private:
- static QState initial (Missile *me, QEvt const *e);
- static QState armed (Missile *me, QEvt const *e);
- static QState flying (Missile *me, QEvt const *e);
- static QState exploding(Missile *me, QEvt const *e);
-};
-
-
-static Missile l_missile; // the sole instance of the Missile active object
-
-// Public-scope objects ------------------------------------------------------
-QActive * const AO_Missile = &l_missile; // opaque pointer
-
-// HSM definition ------------------------------------------------------------
-//............................................................................
-QState Missile::initial(Missile *me, QEvt const *) {
- me->subscribe(TIME_TICK_SIG);
-
- QS_OBJ_DICTIONARY(&l_missile); // object dictionary for Missile object
-
- QS_FUN_DICTIONARY(&Missile::initial); // dictionaries for Missile HSM
- QS_FUN_DICTIONARY(&Missile::armed);
- QS_FUN_DICTIONARY(&Missile::flying);
- QS_FUN_DICTIONARY(&Missile::exploding);
-
- QS_SIG_DICTIONARY(MISSILE_FIRE_SIG, &l_missile); // local signals
- QS_SIG_DICTIONARY(HIT_WALL_SIG, &l_missile);
- QS_SIG_DICTIONARY(DESTROYED_MINE_SIG, &l_missile);
-
- return Q_TRAN(&Missile::armed);
-}
-//............................................................................
-QState Missile::armed(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case MISSILE_FIRE_SIG: {
- // initialize position from the Ship
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_TRAN(&Missile::flying);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Missile::flying(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case TIME_TICK_SIG: {
- ObjectImageEvt *oie;
- if (me->m_x + GAME_MISSILE_SPEED_X < GAME_SCREEN_WIDTH) {
- me->m_x += GAME_MISSILE_SPEED_X;
- // tell the Tunnel to draw the Missile and test for wall hits
- oie = Q_NEW(ObjectImageEvt, MISSILE_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = MISSILE_BMP;
- AO_Tunnel->POST(oie, me);
- }
- else { // Missile outside the range, make it ready to fire again
- return Q_TRAN(&Missile::armed);
- }
- return Q_HANDLED();
- }
- case HIT_WALL_SIG: {
- return Q_TRAN(&Missile::exploding);
- }
- case DESTROYED_MINE_SIG: {
- // tell the Ship the score for destroing this Mine
- AO_Ship->POST(e, me);
-
- // re-arm immediately & let the destroyed Mine do the exploding
- return Q_TRAN(&Missile::armed);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Missile::exploding(Missile *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if ((me->m_x >= GAME_SPEED_X) && (me->m_exp_ctr < 15)) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr; // advance the explosion counter
- me->m_x -= GAME_SPEED_X; // move the explosion by one step
-
- // tell the Tunnel to render the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->x = me->m_x + 3; // x-pos of explosion
- oie->y = (int8_t)((int)me->m_y - 4); // y-pos
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- AO_Tunnel->POST(oie, me);
- }
- else { // explosion finished or moved outside the game
- return Q_TRAN(&Missile::armed);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
diff --git a/examples/80x86/qk/watcom/l/game/ship.cpp b/examples/80x86/qk/watcom/l/game/ship.cpp
deleted file mode 100644
index 806b68ff..00000000
--- a/examples/80x86/qk/watcom/l/game/ship.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "bsp.h"
-#include "game.h"
-
-//Q_DEFINE_THIS_FILE
-
-#define SHIP_WIDTH 5
-#define SHIP_HEIGHT 3
-
-// local objects -------------------------------------------------------------
-class Ship : public QActive { // extend the QActive class
- uint8_t m_x;
- uint8_t m_y;
- uint8_t m_exp_ctr;
- uint16_t m_score;
-
-public:
- Ship(void) : QActive((QStateHandler)&Ship::initial),
- m_x(GAME_SHIP_X), m_y(GAME_SHIP_Y) {}
-private:
- static QState initial (Ship *me, QEvt const *e);
- static QState active (Ship *me, QEvt const *e);
- static QState parked (Ship *me, QEvt const *e);
- static QState flying (Ship *me, QEvt const *e);
- static QState exploding(Ship *me, QEvt const *e);
-};
-
-static Ship l_ship; // the sole instance of the Ship active object
-
-// global objects ------------------------------------------------------------
-QActive * const AO_Ship = &l_ship; // opaque pointer to Ship AO
-
-// HSM definition ------------------------------------------------------------
-//............................................................................
-QState Ship::initial(Ship *me, QEvt const *) {
-
- me->subscribe(TIME_TICK_SIG);
- me->subscribe(PLAYER_TRIGGER_SIG);
-
-
- QS_OBJ_DICTIONARY(&l_ship); // object dictionary for Ship object
-
- QS_FUN_DICTIONARY(&Ship::initial); // function dictionaries for Ship HSM
- QS_FUN_DICTIONARY(&Ship::active);
- QS_FUN_DICTIONARY(&Ship::parked);
- QS_FUN_DICTIONARY(&Ship::flying);
- QS_FUN_DICTIONARY(&Ship::exploding);
-
- QS_SIG_DICTIONARY(PLAYER_SHIP_MOVE_SIG, &l_ship); // local signals
- QS_SIG_DICTIONARY(TAKE_OFF_SIG, &l_ship);
- QS_SIG_DICTIONARY(HIT_WALL_SIG, &l_ship);
- QS_SIG_DICTIONARY(HIT_MINE_SIG, &l_ship);
- QS_SIG_DICTIONARY(DESTROYED_MINE_SIG, &l_ship);
-
- return Q_TRAN(&Ship::active); // top-most initial transition
-}
-//............................................................................
-QState Ship::active(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: { // nested initial transition
- return Q_TRAN(&Ship::parked);
- }
- case PLAYER_SHIP_MOVE_SIG: {
- me->m_x = ((ObjectPosEvt const *)e)->x;
- me->m_y = ((ObjectPosEvt const *)e)->y;
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Ship::parked(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case TAKE_OFF_SIG: { // permition to take off granted
- return Q_TRAN(&Ship::flying);
- }
- }
- return Q_SUPER(&Ship::active);
-}
-//............................................................................
-QState Ship::flying(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- ScoreEvt *sev;
-
- me->m_score = 0; // reset the score
- sev = Q_NEW(ScoreEvt, SCORE_SIG);
- sev->score = me->m_score;
- AO_Tunnel->POST(sev, me);
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- // tell the Tunnel to draw the Ship and test for hits
- ObjectImageEvt *oie = Q_NEW(ObjectImageEvt, SHIP_IMG_SIG);
- oie->x = me->m_x;
- oie->y = me->m_y;
- oie->bmp = SHIP_BMP;
- AO_Tunnel->POST(oie, me);
-
- ++me->m_score; // increment the score for surviving another tick
-
- if ((me->m_score % 10) == 0) { // is the score "round"?
- ScoreEvt *sev = Q_NEW(ScoreEvt, SCORE_SIG);
- sev->score = me->m_score;
- AO_Tunnel->POST(sev, me);
- }
-
- return Q_HANDLED();
- }
- case PLAYER_TRIGGER_SIG: { // trigger the Missile
- ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, MISSILE_FIRE_SIG);
- ope->x = me->m_x;
- ope->y = me->m_y + SHIP_HEIGHT - 1;
- AO_Missile->POST(ope, me);
- return Q_HANDLED();
- }
- case DESTROYED_MINE_SIG: {
- me->m_score += ((ScoreEvt const *)e)->score;
- // the score will be sent to the Tunnel by the next TIME_TICK
- return Q_HANDLED();
- }
- case HIT_WALL_SIG:
- case HIT_MINE_SIG: {
- return Q_TRAN(&Ship::exploding);
- }
- }
- return Q_SUPER(&Ship::active);
-}
-//............................................................................
-QState Ship::exploding(Ship *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_exp_ctr = 0;
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- if (me->m_exp_ctr < 15) {
- ObjectImageEvt *oie;
-
- ++me->m_exp_ctr;
-
- // tell the Tunnel to draw the current stage of Explosion
- oie = Q_NEW(ObjectImageEvt, EXPLOSION_SIG);
- oie->bmp = EXPLOSION0_BMP + (me->m_exp_ctr >> 2);
- oie->x = me->m_x; // x of explosion
- oie->y = (int8_t)((int)me->m_y - 4 + SHIP_HEIGHT);
- AO_Tunnel->POST(oie, me);
- }
- else {
- ScoreEvt *gameOver = Q_NEW(ScoreEvt, GAME_OVER_SIG);
- gameOver->score = me->m_score;
- AO_Tunnel->POST(gameOver, me);
- return Q_TRAN(&Ship::parked);
- }
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&Ship::active);
-}
diff --git a/examples/80x86/qk/watcom/l/game/tunnel.cpp b/examples/80x86/qk/watcom/l/game/tunnel.cpp
deleted file mode 100644
index 44946cd8..00000000
--- a/examples/80x86/qk/watcom/l/game/tunnel.cpp
+++ /dev/null
@@ -1,787 +0,0 @@
-//****************************************************************************
-// Product: Product: "Fly'n'Shoot" game example
-// Last Updated for Version: 4.5.00
-// Date of the Last Update: May 20, 2012
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved.
-//
-// This program is open source software: you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Alternatively, this program may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GNU General Public License and are specifically designed for
-// licensees interested in retaining the proprietary status of their code.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// Contact information:
-// Quantum Leaps Web sites: http://www.quantum-leaps.com
-// http://www.state-machine.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "game.h"
-#include "bsp.h"
-
-#include // for memmove() and memcpy()
-
-Q_DEFINE_THIS_FILE
-
-// Tunnel Active Object ------------------------------------------------------
-class Tunnel : public QActive { // extend the QActive class
-
- QTimeEvt m_blinkTimeEvt; // time event for blinking
- QTimeEvt m_screenTimeEvt; // time event for screen changes
-
- QHsm *m_mines[GAME_MINES_MAX]; // active mines
- QHsm *m_mine1_pool[GAME_MINES_MAX];
- QHsm *m_mine2_pool[GAME_MINES_MAX];
-
- uint8_t m_blink_ctr; // blink counter
-
- uint8_t m_last_mine_x;
- uint8_t m_last_mine_y;
-
- uint8_t m_wall_thickness_top;
- uint8_t m_wall_thickness_bottom;
- uint8_t m_minimal_gap;
-
-public:
- Tunnel(void);
-
-private: // HSM
- static QState initial (Tunnel *me, QEvt const *e);
- static QState final (Tunnel *me, QEvt const *e);
- static QState active (Tunnel *me, QEvt const *e);
- static QState playing (Tunnel *me, QEvt const *e);
- static QState demo (Tunnel *me, QEvt const *e);
- static QState game_over (Tunnel *me, QEvt const *e);
- static QState screen_saver (Tunnel *me, QEvt const *e);
- static QState screen_saver_hide(Tunnel *me, QEvt const *e);
- static QState screen_saver_show(Tunnel *me, QEvt const *e);
-
-private: // Helper functions
- void advance(void);
- void plantMine(void);
- void addImageAt(uint8_t bmp, uint8_t x, int8_t y);
- void dispatchToAllMines(QEvt const *e);
- uint8_t isWallHit(uint8_t bmp, uint8_t x_pos, uint8_t y_pos);
-};
-
-static void randomSeed(uint32_t seed); // random seed
-static uint32_t random(void); // pseudo-random generator
-
-static Tunnel l_tunnel; // the sole instance of the Tunnel active object
-
-// global objects ------------------------------------------------------------
-QActive * const AO_Tunnel = &l_tunnel; // opaque pointer to Tunnel
-
-// local objects -------------------------------------------------------------
-static uint32_t l_rnd; // random seed
-static uint8_t l_walls[GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8];
-static uint8_t l_frame[GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8];
-
-
-//............................................................................
-Tunnel::Tunnel(void) : QActive((QStateHandler)&Tunnel::initial),
- m_blinkTimeEvt(BLINK_TIMEOUT_SIG),
- m_screenTimeEvt(SCREEN_TIMEOUT_SIG),
- m_last_mine_x(0),
- m_last_mine_y(0)
-{
- for (uint8_t n = 0; n < GAME_MINES_MAX; ++n) {
- m_mine1_pool[n] = Mine1_getInst(n); // initialize mine1-type pool
- m_mine2_pool[n] = Mine2_getInst(n); // initialize mine2-type pool
- m_mines[n] = (QHsm *)0; // mine 'n' is unused
- }
-}
-
-// HSM definition ------------------------------------------------------------
-QState Tunnel::initial(Tunnel *me, QEvt const *) {
-
- for (uint8_t n = 0; n < GAME_MINES_MAX; ++n) {
- me->m_mine1_pool[n]->init(); // take the initial tran. for Mine1
- me->m_mine2_pool[n]->init(); // take the initial tran. for Mine2
- }
-
- randomSeed(1234); // seed the pseudo-random generator
-
- me->subscribe(TIME_TICK_SIG);
- me->subscribe(PLAYER_TRIGGER_SIG);
- me->subscribe(PLAYER_QUIT_SIG);
-
- QS_OBJ_DICTIONARY(&l_tunnel); // object dictionary for Tunnel object
- QS_OBJ_DICTIONARY(&l_tunnel.m_blinkTimeEvt);
- QS_OBJ_DICTIONARY(&l_tunnel.m_screenTimeEvt);
-
- QS_FUN_DICTIONARY(&Tunnel::initial); // fun. dictionaries for Tunnel HSM
- QS_FUN_DICTIONARY(&Tunnel::final);
- QS_FUN_DICTIONARY(&Tunnel::active);
- QS_FUN_DICTIONARY(&Tunnel::playing);
- QS_FUN_DICTIONARY(&Tunnel::demo);
- QS_FUN_DICTIONARY(&Tunnel::game_over);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver_hide);
- QS_FUN_DICTIONARY(&Tunnel::screen_saver_show);
-
- QS_SIG_DICTIONARY(BLINK_TIMEOUT_SIG, &l_tunnel); // local signals
- QS_SIG_DICTIONARY(SCREEN_TIMEOUT_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(SHIP_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MISSILE_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MINE_IMG_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(MINE_DISABLED_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(EXPLOSION_SIG, &l_tunnel);
- QS_SIG_DICTIONARY(SCORE_SIG, &l_tunnel);
-
- return Q_TRAN(&Tunnel::demo);
-}
-//............................................................................
-QState Tunnel::final(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // clear the screen
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- QF::stop(); // stop QF and cleanup
- return Q_HANDLED();
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Tunnel::active(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case MINE_DISABLED_SIG: {
- Q_ASSERT((((MineEvt const *)e)->id < GAME_MINES_MAX)
- && (me->m_mines[((MineEvt const *)e)->id] != (QHsm *)0));
- me->m_mines[((MineEvt const *)e)->id] = (QHsm *)0;
- return Q_HANDLED();
- }
- case PLAYER_QUIT_SIG: {
- return Q_TRAN(&Tunnel::final);
- }
- }
- return Q_SUPER(&QHsm::top);
-}
-//............................................................................
-QState Tunnel::demo(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_last_mine_x = 0; // last mine at right edge of the tunnel
- me->m_last_mine_y = 0;
- // set the tunnel properties...
- me->m_wall_thickness_top = 0;
- me->m_wall_thickness_bottom = 0;
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3;
-
- // erase the tunnel walls
- memset(l_walls, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-
-
- me->m_blinkTimeEvt.postEvery(me, BSP_TICKS_PER_SEC/2); // 1/2 sec
-
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC*20); // 20 sec
-
- me->m_blink_ctr = 0; // init the blink counter
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_blinkTimeEvt.disarm();
- me->m_screenTimeEvt.disarm();
- return Q_HANDLED();
- }
- case BLINK_TIMEOUT_SIG: {
- me->m_blink_ctr ^= 1; // toggle the blink cunter
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver);
- }
- case TIME_TICK_SIG: {
- me->advance();
- if (me->m_blink_ctr != 0) {
- // add the text bitmap into the frame buffer
- me->addImageAt(PRESS_BUTTON_BMP,
- (GAME_SCREEN_WIDTH - 55)/2,
- (GAME_SCREEN_HEIGHT - 8)/2);
- }
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- return Q_HANDLED();
- }
- case PLAYER_TRIGGER_SIG: {
- return Q_TRAN(&Tunnel::playing);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::game_over(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_blinkTimeEvt.postEvery(me, BSP_TICKS_PER_SEC/2); // 1/2 sec
- me->m_screenTimeEvt.postIn(me,
- BSP_TICKS_PER_SEC*5); // 5 sec
- me->m_blink_ctr = 0;
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*9)/2, 0, "Game Over");
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_blinkTimeEvt.disarm();
- me->m_screenTimeEvt.disarm();
- BSP_updateScore(0); // update the score on the display
- return Q_HANDLED();
- }
- case BLINK_TIMEOUT_SIG: {
- me->m_blink_ctr ^= 1; // toggle the blink couner
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*9)/2, 0,
- ((me->m_blink_ctr == 0)
- ? "Game Over"
- : " "));
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::demo);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::playing(Tunnel *me, QEvt const *e) {
- uint8_t x;
- int8_t y;
- uint8_t bmp;
-
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3;
-
- // erase the walls
- memset(l_walls, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-
- static QEvt const takeoff = { TAKE_OFF_SIG, 0 };
- AO_Ship->POST(&takeoff, me); // post the TAKEOFF sig
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- QEvt recycle;
- recycle.sig = MINE_RECYCLE_SIG;
- me->dispatchToAllMines(&recycle); // recycle all Mines
- return Q_HANDLED();
- }
- case TIME_TICK_SIG: {
- // render this frame on the display
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
-
- me->advance();
- me->plantMine();
- me->dispatchToAllMines(e);
-
- return Q_HANDLED();
- }
- case SHIP_IMG_SIG:
- case MISSILE_IMG_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (int8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- // did the Ship/Missile hit the tunnel wall?
- if (me->isWallHit(bmp, x, y)) {
- static QEvt const hit = { HIT_WALL_SIG, 0};
- if (e->sig == SHIP_IMG_SIG) {
- AO_Ship->POST(&hit, me);
- }
- else {
- AO_Missile->POST(&hit, me);
- }
- }
- me->addImageAt(bmp, x, y);
- me->dispatchToAllMines(e); // let Mines check for hits
- return Q_HANDLED();
- }
- case MINE_IMG_SIG:
- case EXPLOSION_SIG: {
- x = (uint8_t)((ObjectImageEvt const *)e)->x;
- y = (int8_t)((ObjectImageEvt const *)e)->y;
- bmp = (uint8_t)((ObjectImageEvt const *)e)->bmp;
-
- me->addImageAt(bmp, x, y);
- return Q_HANDLED();
- }
- case SCORE_SIG: {
- BSP_updateScore(((ScoreEvt const *)e)->score);
-
- // increase difficulty of the game:
- // the tunnel gets narrower as the score goes up
- me->m_minimal_gap = GAME_SCREEN_HEIGHT - 3
- - ((ScoreEvt const *)e)->score/2000;
- return Q_HANDLED();
- }
- case GAME_OVER_SIG: {
- uint16_t score = ((ScoreEvt const *)e)->score;
- char str[5];
-
- BSP_updateScore(score);
-
- // clear the screen
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
-
- // Output the final score to the screen
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*10)/2, 1, "Score:");
- str[4] = '\0'; // zero-terminate the string
- str[3] = '0' + (score % 10); score /= 10;
- str[2] = '0' + (score % 10); score /= 10;
- str[1] = '0' + (score % 10); score /= 10;
- str[0] = '0' + (score % 10);
- BSP_drawNString((GAME_SCREEN_WIDTH - 6*10)/2 + 6*6, 1, str);
-
- return Q_TRAN(&Tunnel::game_over);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-// A random-pixel screen saver to avoid damage to the display
-QState Tunnel::screen_saver(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_INIT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_hide);
- }
- case PLAYER_TRIGGER_SIG: {
- return Q_TRAN(&Tunnel::demo);
- }
- }
- return Q_SUPER(&Tunnel::active);
-}
-//............................................................................
-QState Tunnel::screen_saver_hide(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- BSP_displayOff(); // power down the display
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC*3); // 3s timeout
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_screenTimeEvt.disarm();
- BSP_displayOn(); // power up the display
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_show);
- }
- }
- return Q_SUPER(&Tunnel::screen_saver);
-}
-//............................................................................
-QState Tunnel::screen_saver_show(Tunnel *me, QEvt const *e) {
- switch (e->sig) {
- case Q_ENTRY_SIG: {
- // clear the screen frame buffer
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- uint32_t rnd = random();
- me->addImageAt(PRESS_BUTTON_BMP,
- (uint8_t)(rnd % (GAME_SCREEN_WIDTH - 55)),
- (int8_t) (rnd % (GAME_SCREEN_HEIGHT - 8)));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- me->m_screenTimeEvt.postIn(me, BSP_TICKS_PER_SEC/3); // 1/3 sec
- return Q_HANDLED();
- }
- case Q_EXIT_SIG: {
- me->m_screenTimeEvt.disarm();
- // clear the screen frame buffer
- memset(l_frame, (uint8_t)0,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
- BSP_drawBitmap(l_frame, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
- return Q_HANDLED();
- }
- case SCREEN_TIMEOUT_SIG: {
- return Q_TRAN(&Tunnel::screen_saver_hide);
- }
- }
- return Q_SUPER(&Tunnel::screen_saver);
-}
-
-// helper functions ----------------------------------------------------------
-//
-// The bitmap for the "Press Button" text:
-//
-// xxx.........................xxx........x...x...........
-// x..x........................x..x.......x...x...........
-// x..x.x.xx..xx...xxx..xxx....x..x.x..x.xxx.xxx..xx..xxx.
-// xxx..xx...x..x.x....x.......xxx..x..x..x...x..x..x.x..x
-// x....x....xxxx..xx...xx.....x..x.x..x..x...x..x..x.x..x
-// x....x....x.......x....x....x..x.x..x..x...x..x..x.x..x
-// x....x.....xxx.xxx..xxx.....xxx...xxx...x...x..xx..x..x
-// .......................................................
-///
-static uint8_t const press_button_bits[] = {
- 0x7F, 0x09, 0x09, 0x06, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x00,
- 0x38, 0x54, 0x54, 0x58, 0x00, 0x48, 0x54, 0x54, 0x24, 0x00,
- 0x48, 0x54, 0x54, 0x24, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x49,
- 0x49, 0x36, 0x00, 0x3C, 0x40, 0x40, 0x7C, 0x00, 0x04, 0x3F,
- 0x44, 0x00, 0x04, 0x3F, 0x44, 0x00, 0x38, 0x44, 0x44, 0x38,
- 0x00, 0x7C, 0x04, 0x04, 0x78
-};
-
-// bitmap of the Ship:
-//
-// x....
-// xxx..
-// xxxxx
-///
-static uint8_t const ship_bits[] = {
- 0x07, 0x06, 0x06, 0x04, 0x04
-};
-
-// bitmap of the Missile:
-//
-// xxx
-///
-static uint8_t const missile_bits[] = {
- 0x01, 0x01, 0x01
-};
-
-// bitmap of the Mine type-1:
-//
-// .x.
-// xxx
-// .x.
-///
-static uint8_t const mine1_bits[] = {
- 0x02, 0x07, 0x02
-};
-
-// bitmap of the Mine type-2:
-//
-// x..x
-// .xx.
-// .xx.
-// x..x
-///
-static uint8_t const mine2_bits[] = {
- 0x09, 0x06, 0x06, 0x09
-};
-
-// Mine type-2 is nastier than Mine type-1. The type-2 mine can
-// hit the Ship with any of its "tentacles". However, it can be
-// destroyed by the Missile only by hitting its center, defined as
-// the following bitmap:
-//
-// ....
-// .xx.
-// .xx.
-// ....
-///
-static uint8_t const mine2_missile_bits[] = {
- 0x00, 0x06, 0x06, 0x00
-};
-
-// The bitmap of the explosion stage 0:
-//
-// .......
-// .......
-// ...x...
-// ..x.x..
-// ...x...
-// .......
-// .......
-///
-static uint8_t const explosion0_bits[] = {
- 0x00, 0x00, 0x08, 0x14, 0x08, 0x00, 0x00
-};
-
-// The bitmap of the explosion stage 1:
-//
-// .......
-// .......
-// ..x.x..
-// ...x...
-// ..x.x..
-// .......
-// .......
-///
-static uint8_t const explosion1_bits[] = {
- 0x00, 0x00, 0x14, 0x08, 0x14, 0x00, 0x00
-};
-
-// The bitmap of the explosion stage 2:
-//
-// .......
-// .x...x.
-// ..x.x..
-// ...x...
-// ..x.x..
-// .x...x.
-// .......
-///
-static uint8_t const explosion2_bits[] = {
- 0x00, 0x22, 0x14, 0x08, 0x14, 0x22, 0x00
-};
-
-// The bitmap of the explosion stage 3:
-//
-// x..x..x
-// .x.x.x.
-// ..x.x..
-// xx.x.xx
-// ..x.x..
-// .x.x.x.
-// x..x..x
-///
-static uint8_t const explosion3_bits[] = {
- 0x49, 0x2A, 0x14, 0x6B, 0x14, 0x2A, 0x49
-};
-
-struct Bitmap { // the auxiliary structure to hold const bitmaps
- uint8_t const *bits; // the bits in the bitmap
- uint8_t width; // the width of the bitmap
-};
-
-static Bitmap const l_bitmap[MAX_BMP] = {
- { press_button_bits, Q_DIM(press_button_bits) },
- { ship_bits, Q_DIM(ship_bits) },
- { missile_bits, Q_DIM(missile_bits) },
- { mine1_bits, Q_DIM(mine1_bits) },
- { mine2_bits, Q_DIM(mine2_bits) },
- { mine2_missile_bits, Q_DIM(mine2_missile_bits) },
- { explosion0_bits, Q_DIM(explosion0_bits) },
- { explosion1_bits, Q_DIM(explosion1_bits) },
- { explosion2_bits, Q_DIM(explosion2_bits) },
- { explosion3_bits, Q_DIM(explosion3_bits) }
-};
-
-//............................................................................
-uint32_t random(void) { // a very cheap pseudo-random-number generator
- // "Super-Duper" Linear Congruential Generator (LCG)
- // LCG(2^32, 3*7*11*13*23, 0, seed)
- l_rnd = l_rnd * (3*7*11*13*23);
- return l_rnd >> 8;
-}
-//............................................................................
-void randomSeed(uint32_t seed) {
- l_rnd = seed;
-}
-//............................................................................
-void Tunnel::advance(void) {
- uint32_t rnd;
- uint32_t bmp1; // bimap representing 1 column of the image
-
- rnd = (random() & 0xFF);
-
- // reduce the top wall thickness 18.75% of the time
- if ((rnd < 48) && (m_wall_thickness_top > 0)) {
- --m_wall_thickness_top;
- }
-
- // reduce the bottom wall thickness 18.75% of the time
- if ((rnd > 208) && (m_wall_thickness_bottom > 0)) {
- --m_wall_thickness_bottom;
- }
-
- rnd = (random() & 0xFF);
-
- // grow the top wall thickness 18.75% of the time
- if ((rnd < 48)
- && ((GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom) > m_minimal_gap)
- && ((m_last_mine_x < (GAME_SCREEN_WIDTH - 5))
- || (m_last_mine_y > (m_wall_thickness_top + 1))))
- {
- ++m_wall_thickness_top;
- }
-
- // grow the bottom wall thickness 18.75% of the time
- if ((rnd > 208)
- && ((GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom) > m_minimal_gap)
- && ((m_last_mine_x < (GAME_SCREEN_WIDTH - 5))
- || (m_last_mine_y + 1
- < (GAME_SCREEN_HEIGHT - m_wall_thickness_bottom))))
- {
- ++m_wall_thickness_bottom;
- }
-
- // advance the Tunnel by 1 game step to the left
- memmove(l_walls, l_walls + GAME_SPEED_X,
- (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8) - GAME_SPEED_X);
-
- bmp1 = (~(~0 << m_wall_thickness_top))
- | (~0 << (GAME_SCREEN_HEIGHT
- - m_wall_thickness_bottom));
-
- l_walls[GAME_SCREEN_WIDTH - 1] = (uint8_t)bmp1;
- l_walls[GAME_SCREEN_WIDTH + GAME_SCREEN_WIDTH - 1]
- = (uint8_t)(bmp1 >> 8);
-
- // copy the Tunnel layer to the main frame buffer
- memcpy(l_frame, l_walls, (GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT/8));
-}
-//............................................................................
-void Tunnel::plantMine(void) {
- uint32_t rnd = (random() & 0xFF);
-
- if (m_last_mine_x > 0) {
- --m_last_mine_x; // shift the last Mine 1 position to the left
- }
- // last mine far enough?
- if ((m_last_mine_x + GAME_MINES_DIST_MIN < GAME_SCREEN_WIDTH)
- && (rnd < 8)) // place the mines only 5% of the time
- {
- uint8_t n;
- for (n = 0; n < Q_DIM(m_mines); ++n) { // look for disabled mines
- if (m_mines[n] == (QHsm *)0) {
- break;
- }
- }
- if (n < Q_DIM(m_mines)) { // a disabled Mine found?
- ObjectPosEvt ope; // event to dispatch to the Mine
-
- rnd = (random() & 0xFFFF);
-
- if ((rnd & 1) == 0) { // choose the type of the mine
- m_mines[n] = m_mine1_pool[n];
- }
- else {
- m_mines[n] = m_mine2_pool[n];
- }
-
- // new Mine is planted in the last column of the tunnel
- m_last_mine_x = GAME_SCREEN_WIDTH;
-
- // choose a random y-position for the Mine in the Tunnel
- rnd %= (GAME_SCREEN_HEIGHT
- - m_wall_thickness_top
- - m_wall_thickness_bottom - 4);
- m_last_mine_y = m_wall_thickness_top + 2 + rnd;
-
- ope.sig = MINE_PLANT_SIG;
- ope.x = m_last_mine_x;
- ope.y = m_last_mine_y;
- m_mines[n]->dispatch(&ope); // direct dispatch
- }
- }
-}
-//............................................................................
-void Tunnel::dispatchToAllMines(QEvt const *e) {
- uint8_t n;
- for (n = 0; n < GAME_MINES_MAX; ++n) {
- if (m_mines[n] != (QHsm *)0) { // is the mine used?
- m_mines[n]->dispatch(e);
- }
- }
-}
-//............................................................................
-void Tunnel::addImageAt(uint8_t bmp, uint8_t x_pos, int8_t y_pos) {
- uint8_t x; // the x-index of the ship image
- uint8_t w; // the width of the image
-
- Q_REQUIRE(bmp < Q_DIM(l_bitmap));
-
- w = l_bitmap[bmp].width;
- if (w > GAME_SCREEN_WIDTH - x_pos) {
- w = GAME_SCREEN_WIDTH - x_pos;
- }
- for (x = 0; x < w; ++x) {
- uint32_t bmp1;
- if (y_pos >= 0) {
- bmp1 = (l_bitmap[bmp].bits[x] << (uint8_t)y_pos);
- }
- else {
- bmp1 = (l_bitmap[bmp].bits[x] >> (uint8_t)(-y_pos));
- }
- l_frame[x_pos + x] |= (uint8_t)bmp1;
- l_frame[x_pos + x + GAME_SCREEN_WIDTH] |= (uint8_t)(bmp1 >> 8);
- }
-}
-//............................................................................
-uint8_t Tunnel::isWallHit(uint8_t bmp, uint8_t x_pos, uint8_t y_pos) {
- uint8_t x;
- uint8_t w; // the width of the image
-
- Q_REQUIRE(bmp < Q_DIM(l_bitmap));
-
- w = l_bitmap[bmp].width;
- if (w > GAME_SCREEN_WIDTH - x_pos) {
- w = GAME_SCREEN_WIDTH - x_pos;
- }
- for (x = 0; x < w; ++x) {
- uint32_t bmp1 = ((uint32_t)l_bitmap[bmp].bits[x] << y_pos);
- if (((l_walls[x_pos + x] & (uint8_t)bmp1) != 0)
- || ((l_walls[x_pos + x + GAME_SCREEN_WIDTH]
- & (uint8_t)(bmp1 >> 8)) != 0))
- {
- return (uint8_t)1;
- }
- }
- return (uint8_t)0;
-}
-//............................................................................
-uint8_t do_bitmaps_overlap(uint8_t bmp_id1, uint8_t x1, uint8_t y1,
- uint8_t bmp_id2, uint8_t x2, uint8_t y2)
-{
- uint8_t x;
- uint8_t x0;
- uint8_t w;
- uint32_t bits1;
- uint32_t bits2;
- Bitmap const *bmp1;
- Bitmap const *bmp2;
-
- Q_REQUIRE((bmp_id1 < Q_DIM(l_bitmap)) && (bmp_id2 < Q_DIM(l_bitmap)));
-
- bmp1 = &l_bitmap[bmp_id1];
- bmp2 = &l_bitmap[bmp_id2];
-
- // is the incoming object starting to overlap the Mine bitmap?
- if ((x1 <= x2) && (x1 + bmp2->width > x2)) {
- x0 = x2 - x1;
- w = x1 + bmp2->width - x2;
- if (w > bmp1->width) {
- w = bmp1->width;
- }
- for (x = 0; x < w; ++x) { // scan over the overlapping columns
- bits1 = ((uint32_t)bmp2->bits[x + x0] << y2);
- bits2 = ((uint32_t)bmp1->bits[x] << y1);
- if ((bits1 & bits2) != 0) { // do the bits overlap?
- return (uint8_t)1; // yes!
- }
- }
- }
- else {
- if ((x1 > x2) && (x2 + bmp1->width > x1)) {
- x0 = x1 - x2;
- w = x2 + bmp1->width - x1;
- if (w > bmp2->width) {
- w = bmp2->width;
- }
- for (x = 0; x < w; ++x) { // scan over the overlapping columns
- bits1 = ((uint32_t)bmp1->bits[x + x0] << y1);
- bits2 = ((uint32_t)bmp2->bits[x] << y2);
- if ((bits1 & bits2) != 0) { // do the bits overlap?
- return (uint8_t)1; // yes!
- }
- }
- }
- }
- return (uint8_t)0; // the bitmaps do not overlap
-}
diff --git a/examples/80x86/qk/watcom/l/game/video.cpp b/examples/80x86/qk/watcom/l/game/video.cpp
deleted file mode 100644
index 6a35c1fd..00000000
--- a/examples/80x86/qk/watcom/l/game/video.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.1.01
-// Date of the Last Update: Nov 02, 2009
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2009 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#include "qp_port.h"
-#include "video.h"
-
-#include
-#include
-
-#define VIDEO_BASE 0xB800
-#define VIDEO_WIDTH 80
-#define VIDEO_HEIGHT 25
-
-//............................................................................
-void Video::clearScreen(uint8_t bgColor) {
- system("CLS");
- clearRect(0, 0, VIDEO_WIDTH, VIDEO_HEIGHT, bgColor);
-}
-//............................................................................
-void Video::clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor)
-{
- for ( ; y1 < y2; ++y1) {
- uint8_t x;
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y1 * VIDEO_WIDTH) + x1) * 2));
- for (x = x1; x < x2; ++x) {
- pscr[0] = ' '; // Put space in video RAM
- pscr[1] = bgColor; // Put video attribute in video RAM
- pscr += 2;
- }
- }
-}
-//............................................................................
-void Video::printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str)
-{
- // calculate position on the video RAM (VGA)
- uint8_t far *pscr = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) * 2));
- while (*str != (uint8_t)0) {
- pscr[0] = *str++; // Put character in video RAM
- pscr[1] &= ~0x0F; // clear the foreground color
- pscr[1] |= color; // Put video attribute in video RAM
- pscr += 2;
- }
-}
-//............................................................................
-void Video::printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num) {
- char buf[4];
- buf[3] = (char)0;
- buf[2] = (char)('0' + num % 10);
- num /= 10;
- buf[1] = (char)('0' + num % 10);
- num /= 10;
- buf[0] = (char)('0' + num % 10);
- if (buf[0] == '0') {
- buf[0] = ' ';
- }
- printStrAt(x, y, color, buf);
-}
-//............................................................................
-void Video::drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height)
-{
- uint8_t far *pscrX = (uint8_t far *)MK_FP(VIDEO_BASE,
- (uint16_t)(((y * VIDEO_WIDTH) + x) << 1));
- uint8_t ix, iy;
- uint8_t w = width;
- uint8_t h = height;
-
- // perform the clipping
- if (x > VIDEO_WIDTH) {
- x = VIDEO_WIDTH;
- }
- if (y > VIDEO_HEIGHT) {
- y = VIDEO_HEIGHT;
- }
- if (w > VIDEO_WIDTH - x) {
- w = VIDEO_WIDTH - x;
- }
- if (h > VIDEO_HEIGHT - y) {
- h = VIDEO_HEIGHT - y;
- }
-
- for (ix = 0; ix < w; ++ix, pscrX += 2) { // loop over x
- uint8_t far *pscrXY = pscrX;
- for (iy = 0; iy < h; ++iy, pscrXY += 2*VIDEO_WIDTH) {
- static uint8_t const pixel[2] = { 0x20, 0xDB };
- uint8_t byte = bitmap[ix + (iy >> 3)*width];
- *pscrXY = pixel[(byte >> (iy & 0x7)) & 1];
- }
- }
-}
-//............................................................................
-void Video::drawStringAt(uint8_t x, uint8_t y, char const *str) {
- static uint8_t const font5x7[95][5] = {
- { 0x00, 0x00, 0x00, 0x00, 0x00 }, // ' '
- { 0x00, 0x00, 0x4F, 0x00, 0x00 }, // !
- { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
- { 0x14, 0x7F, 0x14, 0x7F, 0x14 }, // #
- { 0x24, 0x2A, 0x7F, 0x2A, 0x12 }, // $
- { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %
- { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
- { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
- { 0x00, 0x1C, 0x22, 0x41, 0x00 }, // (
- { 0x00, 0x41, 0x22, 0x1C, 0x00 }, // )
- { 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
- { 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
- { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,
- { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
- { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
- { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
- { 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0
- { 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
- { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
- { 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
- { 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
- { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
- { 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
- { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
- { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
- { 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
- { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
- { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
- { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
- { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
- { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
- { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
- { 0x32, 0x49, 0x79, 0x41, 0x3E }, // @
- { 0x7E, 0x11, 0x11, 0x11, 0x7E }, // A
- { 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
- { 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
- { 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
- { 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
- { 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
- { 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
- { 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
- { 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
- { 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
- { 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
- { 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
- { 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
- { 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
- { 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
- { 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
- { 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
- { 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
- { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
- { 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
- { 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
- { 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
- { 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
- { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
- { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
- { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
- { 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
- { 0x02, 0x04, 0x08, 0x10, 0x20 }, /* \ */
- { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
- { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
- { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
- { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `
- { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
- { 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
- { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
- { 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
- { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
- { 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
- { 0x0C, 0x52, 0x52, 0x52, 0x3E }, // g
- { 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
- { 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
- { 0x20, 0x40, 0x44, 0x3D, 0x00 }, // j
- { 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
- { 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
- { 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
- { 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
- { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
- { 0x7C, 0x14, 0x14, 0x14, 0x08 }, // p
- { 0x08, 0x14, 0x14, 0x18, 0x7C }, // q
- { 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
- { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
- { 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
- { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
- { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
- { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
- { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
- { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y
- { 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z
- { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {
- { 0x00, 0x00, 0x7F, 0x00, 0x00 }, // |
- { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }
- { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
- };
-
- while (*str != '\0') {
- drawBitmapAt(x, y, font5x7[*str - ' '], 5, 8);
- ++str;
- x += 6;
- }
-}
diff --git a/examples/80x86/qk/watcom/l/game/video.h b/examples/80x86/qk/watcom/l/game/video.h
deleted file mode 100644
index 2b221a63..00000000
--- a/examples/80x86/qk/watcom/l/game/video.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//****************************************************************************
-// Product: Direct Video (VGA) screen output
-// Last Updated for Version: 4.0.00
-// Date of the Last Update: Apr 07, 2008
-//
-// Q u a n t u m L e a P s
-// ---------------------------
-// innovating embedded systems
-//
-// Copyright (C) 2002-2008 Quantum Leaps, LLC. All rights reserved.
-//
-// This software may be distributed and modified under the terms of the GNU
-// General Public License version 2 (GPL) as published by the Free Software
-// Foundation and appearing in the file GPL.TXT included in the packaging of
-// this file. Please note that GPL Section 2[b] requires that all works based
-// on this software must also be made publicly available under the terms of
-// the GPL ("Copyleft").
-//
-// Alternatively, this software may be distributed and modified under the
-// terms of Quantum Leaps commercial licenses, which expressly supersede
-// the GPL and are specifically designed for licensees interested in
-// retaining the proprietary status of their code.
-//
-// Contact information:
-// Quantum Leaps Web site: http://www.quantum-leaps.com
-// e-mail: info@quantum-leaps.com
-//****************************************************************************
-#ifndef video_h
-#define video_h
-
-class Video {
-public:
- enum VideoColor {
- // foreground colors ...
- FGND_BLACK = 0x00,
- FGND_BLUE = 0x01,
- FGND_GREEN = 0x02,
- FGND_CYAN = 0x03,
- FGND_RED = 0x04,
- FGND_PURPLE = 0x05,
- FGND_BROWN = 0x06,
- FGND_LIGHT_GRAY = 0x07,
- FGND_DARK_GRAY = 0x08,
- FGND_LIGHT_BLUE = 0x09,
- FGND_LIGHT_GREEN = 0x0A,
- FGND_LIGHT_CYAN = 0x0B,
- FGND_LIGHT_RED = 0x0C,
- FGND_LIGHT_PURPLE = 0x0D,
- FGND_YELLOW = 0x0E,
- FGND_WHITE = 0x0F,
- // background colors ...
- BGND_BLACK = 0x00,
- BGND_BLUE = 0x10,
- BGND_GREEN = 0x20,
- BGND_CYAN = 0x30,
- BGND_RED = 0x40,
- BGND_PURPLE = 0x50,
- BGND_BROWN = 0x60,
- BGND_LIGHT_GRAY = 0x70,
-
- BGND_BLINK = 0x80
- };
- static void clearScreen(uint8_t bgColor);
- static void clearRect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2,
- uint8_t bgColor);
- static void printStrAt(uint8_t x, uint8_t y, uint8_t color,
- char const *str);
- static void printNumAt(uint8_t x, uint8_t y, uint8_t color, uint32_t num);
-
- static void drawBitmapAt(uint8_t x, uint8_t y,
- uint8_t const *bitmap, uint8_t width, uint8_t height);
-
- static void drawStringAt(uint8_t x, uint8_t y, char const *str);
-};
-
-#endif // video_h
-
diff --git a/examples/README.url b/examples/README.url
new file mode 100644
index 00000000..4cff61f9
--- /dev/null
+++ b/examples/README.url
@@ -0,0 +1,4 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/exa.html
+IconFile=http://www.state-machine.com/qp.ico
+
diff --git a/examples/arm-cm/README.url b/examples/arm-cm/README.url
new file mode 100644
index 00000000..e3d08615
--- /dev/null
+++ b/examples/arm-cm/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/exa_arm-cm.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/README.txt
new file mode 100644
index 00000000..4b4e8eac
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/README.txt
@@ -0,0 +1,36 @@
+About this Example
+==================
+This directory contains the simple "Blinky" QP example application for
+the EK-TM4C123GXL board (TivaC LauchPad) with the preemptive QK kernel.
+This directory contains portable code that should compile with any C
+compiler for ARM Cortex-M.
+
+The sub-directories contain code and project files, which are specific
+to the particular ARM toolchains, such as ARM (MDK-ARM), GNU, and IAR.
+
+Please refer to the README files in the sub-directories for specific
+instructions how to use and customize the example to your needs.
+
+
+Support Code for EK-TM4C123GXL Board
+====================================
+The directory qpc\3rd_party\ek-tm4c123gxl contains the CMSIS-compliant
+device code for the TM4C123GH6PM MCU. Please see the README.txt file in
+this folder for more details.
+
+
+QS Software Tracing Instrumentation
+===================================
+This example provides the "Spy" build configuration, which outputs the QS
+(Quantum Spy) software tracing data through UART0, which is connected to
+the virtual COM port of the TI Stellaris debugger.
+
+The output is generated at 115200 baud rate.
+
+Here is an example invocation of the QSPY host application to receive
+the QS data from EK-TM4C123GXL:
+
+qspy -cCOM1
+
+The actual COM port number might be different on your Windows machine.
+Please check the Device Manager to find the COM port number.
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/README.url b/examples/arm-cm/blinky_ek-tm4c123gxl/README.url
new file mode 100644
index 00000000..ee103f43
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/arm-cm_blinky_ek-tm4c123gxl.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.cpp
new file mode 100644
index 00000000..3f5e693c
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.cpp
@@ -0,0 +1,115 @@
+//****************************************************************************
+// Product: Simple Blinky example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "bsp.h"
+#include "blinky.h"
+
+//Q_DEFINE_THIS_FILE
+
+//............................................................................
+class Blinky : public QActive {
+private:
+ QTimeEvt m_timeEvt;
+
+public:
+ Blinky();
+
+protected:
+ static QState initial(Blinky * const me, QEvt const * const e);
+ static QState off(Blinky * const me, QEvt const * const e);
+ static QState on(Blinky * const me, QEvt const * const e);
+};
+
+// local bjects --------------------------------------------------------------
+Blinky l_blinky;
+
+// global objects ------------------------------------------------------------
+QMActive * const AO_Blinky = &l_blinky; // opaque pointer
+
+//............................................................................
+Blinky::Blinky()
+ : QActive(Q_STATE_CAST(&Blinky::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+{
+ // empty
+}
+
+// HSM definition ------------------------------------------------------------
+QState Blinky::initial(Blinky * const me, QEvt const * const e) {
+ (void)e; // unused parameter
+
+ // arm the time event to expire in half a second and every half second
+ me->m_timeEvt.armX(BSP_TICKS_PER_SEC/2U, BSP_TICKS_PER_SEC/2U);
+ return Q_TRAN(&Blinky::off);
+}
+//............................................................................
+QState Blinky::off(Blinky * const me, QEvt const * const e) {
+ QState status;
+ switch (e->sig) {
+ case Q_ENTRY_SIG: {
+ BSP_ledOff();
+ status = Q_HANDLED();
+ break;
+ }
+ case TIMEOUT_SIG: {
+ status = Q_TRAN(&Blinky::on);
+ break;
+ }
+ default: {
+ status = Q_SUPER(&QHsm::top);
+ break;
+ }
+ }
+ return status;
+}
+//............................................................................
+QState Blinky::on(Blinky * const me, QEvt const * const e) {
+ QState status;
+ switch (e->sig) {
+ case Q_ENTRY_SIG: {
+ BSP_ledOn();
+ status = Q_HANDLED();
+ break;
+ }
+ case TIMEOUT_SIG: {
+ status = Q_TRAN(&Blinky::off);
+ break;
+ }
+ default: {
+ status = Q_SUPER(&QHsm::top);
+ break;
+ }
+ }
+ return status;
+}
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.h b/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.h
new file mode 100644
index 00000000..53cde00a
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/blinky.h
@@ -0,0 +1,49 @@
+//****************************************************************************
+// Product: Simple Blinky example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef blinky_h
+#define blinky_h
+
+using namespace QP;
+
+enum BlinkySignals {
+ DUMMY_SIG = Q_USER_SIG,
+ MAX_PUB_SIG, // the last published signal
+
+ TIMEOUT_SIG,
+ MAX_SIG // the last signal
+};
+
+extern QMActive * const AO_Blinky; // opaque pointer
+
+#endif // blinky_h
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/bsp.h b/examples/arm-cm/blinky_ek-tm4c123gxl/bsp.h
new file mode 100644
index 00000000..5fc156bc
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/bsp.h
@@ -0,0 +1,43 @@
+//****************************************************************************
+// Product: Simple Blinky example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef bsp_h
+#define bsp_h
+
+uint32_t const BSP_TICKS_PER_SEC = static_cast(100);
+
+void BSP_init(void);
+void BSP_ledOff(void);
+void BSP_ledOn(void);
+
+#endif // bsp_h
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/main.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/main.cpp
new file mode 100644
index 00000000..be3c8c6c
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/main.cpp
@@ -0,0 +1,53 @@
+//****************************************************************************
+// Product: Simple Blinky example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "bsp.h"
+#include "blinky.h"
+
+int main() {
+ static QEvt const *blinkyQSto[10]; // Event queue storage for Blinky
+
+ BSP_init(); // initialize the Board Support Package
+ QF::init(); // initialize the framework and the underlying RT kernel
+
+ // publish-subscribe not used, no call to QF::psInit()
+ // dynamic event allocation not used, no call to QF::poolInit()
+
+ // instantiate and start the active objects...
+ AO_Blinky->start(1U, // priority
+ blinkyQSto, Q_DIM(blinkyQSto), // event queue
+ (void *)0, 0U); // stack (unused)
+
+ return QF::run(); // run the QF application
+}
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/README.txt
new file mode 100644
index 00000000..6ad5e4fb
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/README.txt
@@ -0,0 +1,61 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::TM4C_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size (for most embedded projects
+yyy should be 0, as the using the heap is not recommended).
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvoptx b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvoptx
new file mode 100644
index 00000000..f5bf314f
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvoptx
@@ -0,0 +1,1012 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ blinky-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 4
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 3
+
+
+
+
+
+
+
+
+
+
+ BIN\lmidk-agdi.dll
+
+
+
+ 0
+ DLGUARM
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1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_qeq.cpp
+ 0
+ 0
+
+
+ 3
+ 22
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qf_qmact.cpp
+ qf_qmact.cpp
+ 0
+ 0
+
+
+ 3
+ 23
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qf_time.cpp
+ qf_time.cpp
+ 0
+ 0
+
+
+ 3
+ 24
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qk.cpp
+ qk.cpp
+ 0
+ 0
+
+
+ 3
+ 25
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qk_mutex.cpp
+ qk_mutex.cpp
+ 0
+ 0
+
+
+
+
+ QP_port
+ 1
+ 0
+ 0
+ 0
+
+ 4
+ 26
+ 2
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+ qk_port.s
+ 0
+ 0
+
+
+
+
+ QS
+ 1
+ 0
+ 0
+ 0
+
+ 5
+ 27
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 28
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_64bit.cpp
+ qs_64bit.cpp
+ 0
+ 0
+
+
+ 5
+ 29
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvprojx b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvprojx
new file mode 100644
index 00000000..4dc35dac
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/arm/blinky-qk.uvprojx
@@ -0,0 +1,1844 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ blinky-dbg
+ 0x4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+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ blinky.cpp
+ 1
+ ..\..\blinky.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ blinky.h
+ 5
+ ..\..\blinky.h
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ blinky-rel
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000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 1
+ ..\bsp.cpp
+
+
+ blinky.cpp
+ 1
+ ..\..\blinky.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ blinky.h
+ 5
+ ..\..\blinky.h
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ blinky-spy
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+ $$Device:TM4C123GH6PM$SVD\TM4C123\T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\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp
new file mode 100644
index 00000000..db77df23
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp
@@ -0,0 +1,223 @@
+//****************************************************************************
+// Product: "Blinky" example, EK-TM4C123GXL board, preemptive QK kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "blinky.h"
+#include "bsp.h"
+
+#include "TM4C123GH6PM.h" // the device specific header (TI)
+#include "rom.h" // the built-in ROM functions (TI)
+#include "sysctl.h" // system control driver (TI)
+#include "gpio.h" // GPIO driver (TI)
+// add other drivers if necessary...
+
+#ifdef Q_SPY
+ #error Simple Blinky Application does not provide Spy build configuration
+#endif
+
+
+//Q_DEFINE_THIS_FILE
+
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ SYSTICK_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+#define LED_RED (1U << 1)
+#define LED_GREEN (1U << 3)
+#define LED_BLUE (1U << 2)
+
+#define BTN_SW1 (1U << 4)
+#define BTN_SW2 (1U << 0)
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+ QF::TICK_X(0U, (void *)0); // process time events for rate 0
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // configure the FPU usage by choosing one of the options...
+#if 1
+ // OPTION 1:
+ // Use the automatic FPU state preservation and the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in more than one task or
+ // in any ISRs. This setting is the safest and recommended, but requires
+ // extra stack space and CPU cycles.
+ //
+ FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos);
+#else
+ // OPTION 2:
+ // Do NOT to use the automatic FPU state preservation and
+ // do NOT to use the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in ONE task only and not
+ // in any ISR. This setting is very efficient, but if more than one task
+ // (or ISR) start using the FPU, this can lead to corruption of the
+ // FPU registers. This option should be used with CAUTION.
+ //
+ FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos));
+#endif
+
+ // enable clock to the peripherals used by the application
+ SYSCTL->RCGC2 |= (1U << 5); // enable clock to GPIOF
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure the LEDs and push buttons
+ GPIOF->DIR |= (LED_RED | LED_GREEN | LED_BLUE); // set direction: output
+ GPIOF->DEN |= (LED_RED | LED_GREEN | LED_BLUE); // digital enable
+ GPIOF->DATA_Bits[LED_RED] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_GREEN] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the LED off
+
+ // configure the Buttons
+ GPIOF->DIR &= ~(BTN_SW1 | BTN_SW2); // set direction: input
+ ROM_GPIOPadConfigSet(GPIOF_BASE, (BTN_SW1 | BTN_SW2),
+ GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
+}
+//............................................................................
+void BSP_ledOff(void) {
+ GPIOF->DATA_Bits[LED_GREEN] = 0U;
+}
+//............................................................................
+void BSP_ledOn(void) {
+ // exercise the FPU with some floating point computations
+ float volatile x = 3.1415926F;
+ x = x + 2.7182818F;
+
+ GPIOF->DATA_Bits[LED_GREEN] = 0xFFU;
+}
+
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, SYSTICK_PRIO);
+ // ...
+
+ // enable IRQs...
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QK::onIdle(void) {
+
+ // toggle LED2 on and then off, see NOTE01
+ QF_INT_DISABLE();
+ GPIOF->DATA_Bits[LED_BLUE] = 0xFFU;
+ GPIOF->DATA_Bits[LED_BLUE] = 0x00U;
+ QF_INT_ENABLE();
+
+
+#ifdef NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ __WFI(); // Wait-For-Interrupt
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call any QF services. These ISRs
+// are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF services. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// One of the LEDs is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile
new file mode 100644
index 00000000..cafd2c39
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile
@@ -0,0 +1,307 @@
+##############################################################################
+# Product: Makefile for QP/C++, Blinky on EK-TM4C123GXL, QK kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := blinky-qk
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qk/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/ek-tm4c123gxl
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_TM4C123GH6PM.c \
+ startup_TM4C123GH6PM.c
+
+# C++ source files
+CPP_SRCS := \
+ blinky.cpp \
+ bsp.cpp \
+ main.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qk.cpp \
+ qk_mutex.cpp
+
+QP_ASMS := \
+ qk_port.s
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES := -D__FPU_PRESENT
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m4
+ARM_FPU := -mfpu=vfp
+FLOAT_ABI := -mfloat-abi=hard
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt
new file mode 100644
index 00000000..0e721706
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt
@@ -0,0 +1,71 @@
+About this Example
+==================
+This example can be built from the command prompt with the provided
+Makefile. The example can also be imported as a Makefile-based
+project into Eclipse-based IDEs.
+
+
+The Makefile
+============
+The provided Makefile should be easy to adapt for your own projects.
+It contains three build configurations: Debug (default), Release, and
+Spy.
+
+Also, the Makefile has been specifically designed to work as an external
+Makefile with the Eclipse CDT.
+
+The various build configurations are built as follows:
+
+make
+make CONF=rel
+make CONF=spy
+
+make clean
+make CONF=rel clean
+make CONF=spy clean
+
+***
+NOTE:
+The installation folder of the GNU-ARM toolset on YOUR machine needs
+to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM.
+As described in the comment for this symbol, the GNU-ARM toolset is taken
+from: http://gnutoolchains.com/arm-eabi
+
+It is highly recommened to use the same GNU-ARM distribution, especially
+for ARM Cortex-M4F projects, due to the support for the hardware FPU
+(float-abi=hard).
+***
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the GCC linker
+script (.ld file), which provides a template of the recommended GCC linker
+script for QP applications.
+
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\gcc\startup_TM4C123GH6PM.c
+
+The file startup_TM4C123GH6PM.c provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/blinky-qk.ld b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/blinky-qk.ld
new file mode 100644
index 00000000..4bb2c452
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/blinky-qk.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for EK-TM4C123GXL, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-20
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of Tiva TM4C123GH6PM */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 512;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat
new file mode 100644
index 00000000..4b2ad3d9
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat
@@ -0,0 +1,34 @@
+::============================================================================
+:: Batch file to load the Blinky program to the flash of EK-TM4C123GXL
+:: (equivalent to EK-LM4F120XL)
+::
+:: NOTE: requires the LMFlash programmer from Texas Instruments, see:
+:: http://www.ti.com/tool/LMFLASHPROGRAMMER
+::
+@echo off
+setlocal
+
+@echo Load the program to the flash of EK-TM4C123GXL
+@echo usage: flash
+@echo usage: flash rel
+@echo usage: flash spy
+
+::----------------------------------------------------------------------------
+:: NOTE: Adjust the following symbol to the location of the
+:: LMFlash utility on your machine
+::
+set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe
+
+:: set the build directory depending on the first parameter %1
+set BUILD_DIR=dbg
+if [%1] NEQ [] set BUILD_DIR=%1
+@echo on
+
+%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\blinky-qk.bin
+
+@echo.
+@echo.
+@echo Reset the target to start running your program!
+
+@echo off
+endlocal
\ No newline at end of file
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/README.txt
new file mode 100644
index 00000000..3d1a614a
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/README.txt
@@ -0,0 +1,53 @@
+About this Example
+==================
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+IAR Project File
+----------------
+The IAR EWARM project file provided with this example uses relative paths
+to the QP/C framework location (includes, port, and libraries. These
+relative paths must be modified when the project is moved to different
+relative location.
+
+
+Stack Size and Heap Size
+------------------------
+In this project, the size of the C stack and heap are determined in
+the linker script blinky-qk.icf (see the next section).
+
+
+Linker Script
+-------------
+The IAR linker script provides a template of the recommended linker script
+for QP applications. This file needs to be customized to set the
+application-specific sizes of the Stack and Heap. This file can be edited
+from the IAR EWARM IDE via the Project Options/Linker settings.
+
+
+Startup Code
+------------
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp
new file mode 100644
index 00000000..e5604ec8
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp
@@ -0,0 +1,2972 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 40
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\..\blinky.cpp
+
+
+ $PROJ_DIR$\..\..\blinky.h
+
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+
+ ek-tm4c123gxl
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_mutex.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_pkg.h
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.s
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww
new file mode 100644
index 00000000..ac3c18a2
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\blinky-qk.ewp
+
+
+
+
+
diff --git a/examples/arm-cm/qk/iar/dpp-qk_ek-tm4c123gxl/dpp-qk.icf b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf
similarity index 100%
rename from examples/arm-cm/qk/iar/dpp-qk_ek-tm4c123gxl/dpp-qk.icf
rename to examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/README.txt
new file mode 100644
index 00000000..6ad5e4fb
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/README.txt
@@ -0,0 +1,61 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::TM4C_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size (for most embedded projects
+yyy should be 0, as the using the heap is not recommended).
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvoptx b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvoptx
new file mode 100644
index 00000000..4bc168e6
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvoptx
@@ -0,0 +1,936 @@
+
+
+
+ 1.0
+
+ ### uVision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..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvprojx b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvprojx
new file mode 100644
index 00000000..b26a6c02
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/arm/blinky-qv.uvprojx
@@ -0,0 +1,1808 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ blinky-dbg
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+ $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\dbg\
+ blinky-qv
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\dbg\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\dbg\blinky-qv.bin .\dbg\blinky-qv.axf
+
+ 0
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+ -MPU
+ DCM.DLL
+ -pCM4
+ SAR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
+
+ 0
+ 0x20000000
+ 0x8000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ __FPU_PRESENT
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ blinky.cpp
+ 1
+ ..\..\blinky.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ blinky.h
+ 5
+ ..\..\blinky.h
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ bl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 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ blinky-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ blinky.cpp
+ 1
+ ..\..\blinky.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ blinky.h
+ 5
+ ..\..\blinky.h
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ blinky-spy
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $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ky.h
+ 5
+ ..\..\blinky.h
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp
new file mode 100644
index 00000000..db1c2e92
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp
@@ -0,0 +1,211 @@
+//****************************************************************************
+// Product: "Blinky" example, EK-TM4C123GXL board, cooperative Vanilla kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "blinky.h"
+#include "bsp.h"
+
+#include "TM4C123GH6PM.h" // the device specific header (TI)
+#include "rom.h" // the built-in ROM functions (TI)
+#include "sysctl.h" // system control driver (TI)
+#include "gpio.h" // GPIO driver (TI)
+// add other drivers if necessary...
+
+#ifdef Q_SPY
+ #error Simple Blinky Application does not provide Spy build configuration
+#endif
+
+//Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ SYSTICK_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+#define LED_RED (1U << 1)
+#define LED_GREEN (1U << 3)
+#define LED_BLUE (1U << 2)
+
+#define BTN_SW1 (1U << 4)
+#define BTN_SW2 (1U << 0)
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ QF::TICK_X(0U, (void *)0); // process time events for rate 0
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // configure the FPU usage by choosing one of the options...
+
+ // Do NOT to use the automatic FPU state preservation and
+ // do NOT to use the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used only by active objects
+ // and NOT in any ISR. This setting is very efficient, but if any ISRs
+ // start using the FPU, this can lead to corruption of the FPU registers.
+ //
+ FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos));
+
+ // enable clock to the peripherals used by the application
+ SYSCTL->RCGC2 |= (1U << 5); // enable clock to GPIOF
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure the LEDs and push buttons
+ GPIOF->DIR |= (LED_RED | LED_GREEN | LED_BLUE); // set direction: output
+ GPIOF->DEN |= (LED_RED | LED_GREEN | LED_BLUE); // digital enable
+ GPIOF->DATA_Bits[LED_RED] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_GREEN] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the LED off
+
+ // configure the Buttons
+ GPIOF->DIR &= ~(BTN_SW1 | BTN_SW2); // set direction: input
+ ROM_GPIOPadConfigSet(GPIOF_BASE, (BTN_SW1 | BTN_SW2),
+ GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
+}
+//............................................................................
+void BSP_ledOff(void) {
+ GPIOF->DATA_Bits[LED_GREEN] = 0U;
+}
+//............................................................................
+void BSP_ledOn(void) {
+ // exercise the FPU with some floating point computations
+ float volatile x = 3.1415926F;
+ x = x + 2.7182818F;
+
+ GPIOF->DATA_Bits[LED_GREEN] = 0xFFU;
+}
+
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, SYSTICK_PRIO);
+ // ...
+
+ // enable IRQs...
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QV::onIdle(void) { // CATION: called with interrupts DISABLED, NOTE01
+
+ // toggle LED2 on and then off, see NOTE01
+ GPIOF->DATA_Bits[LED_BLUE] = 0xFFU;
+ GPIOF->DATA_Bits[LED_BLUE] = 0x00U;
+
+#ifdef NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
+#else
+ QF_INT_ENABLE(); // just enable interrupts
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call any QF services. These ISRs
+// are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF services. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The QV::onIdle() callback is called with interrupts disabled, because the
+// determination of the idle condition might change by any interrupt posting
+// an event. QV::onIdle() must internally enable interrupts, ideally
+// atomically with putting the CPU to the power-saving mode.
+//
+// NOTE02:
+// One of the LEDs is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile
new file mode 100644
index 00000000..f549445f
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile
@@ -0,0 +1,305 @@
+##############################################################################
+# Product: Makefile for QP/C++, Blinky on EK-TM4C123GXL, QV kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := blinky-qv
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qv/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/ek-tm4c123gxl
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_TM4C123GH6PM.c \
+ startup_TM4C123GH6PM.c
+
+# C++ source files
+CPP_SRCS := \
+ blinky.cpp \
+ bsp.cpp \
+ main.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qv.cpp
+
+QP_ASMS :=
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES := -D__FPU_PRESENT
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m4
+ARM_FPU := -mfpu=vfp
+FLOAT_ABI := -mfloat-abi=hard
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt
new file mode 100644
index 00000000..0e721706
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt
@@ -0,0 +1,71 @@
+About this Example
+==================
+This example can be built from the command prompt with the provided
+Makefile. The example can also be imported as a Makefile-based
+project into Eclipse-based IDEs.
+
+
+The Makefile
+============
+The provided Makefile should be easy to adapt for your own projects.
+It contains three build configurations: Debug (default), Release, and
+Spy.
+
+Also, the Makefile has been specifically designed to work as an external
+Makefile with the Eclipse CDT.
+
+The various build configurations are built as follows:
+
+make
+make CONF=rel
+make CONF=spy
+
+make clean
+make CONF=rel clean
+make CONF=spy clean
+
+***
+NOTE:
+The installation folder of the GNU-ARM toolset on YOUR machine needs
+to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM.
+As described in the comment for this symbol, the GNU-ARM toolset is taken
+from: http://gnutoolchains.com/arm-eabi
+
+It is highly recommened to use the same GNU-ARM distribution, especially
+for ARM Cortex-M4F projects, due to the support for the hardware FPU
+(float-abi=hard).
+***
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the GCC linker
+script (.ld file), which provides a template of the recommended GCC linker
+script for QP applications.
+
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\gcc\startup_TM4C123GH6PM.c
+
+The file startup_TM4C123GH6PM.c provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/blinky-qv.ld b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/blinky-qv.ld
new file mode 100644
index 00000000..9bd26600
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/blinky-qv.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for EK-TM4C123GXL, GNU-ARM (Sourcery CodeBench)
+* Last Updated for Version: 5.2.0
+* Date of the Last Update: Dec 17, 2013
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of Tiva TM4C123GH6PM */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 512;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat
new file mode 100644
index 00000000..1ecfee17
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat
@@ -0,0 +1,34 @@
+::============================================================================
+:: Batch file to load the Blinky program to the flash of EK-TM4C123GXL
+:: (equivalent to EK-LM4F120XL)
+::
+:: NOTE: requires the LMFlash programmer from Texas Instruments, see:
+:: http://www.ti.com/tool/LMFLASHPROGRAMMER
+::
+@echo off
+setlocal
+
+@echo Load the program to the flash of EK-TM4C123GXL
+@echo usage: flash
+@echo usage: flash rel
+@echo usage: flash spy
+
+::----------------------------------------------------------------------------
+:: NOTE: Adjust the following symbol to the location of the
+:: LMFlash utility on your machine
+::
+set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe
+
+:: set the build directory depending on the first parameter %1
+set BUILD_DIR=dbg
+if [%1] NEQ [] set BUILD_DIR=%1
+@echo on
+
+%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\blinky-qv.bin
+
+@echo.
+@echo.
+@echo Reset the target to start running your program!
+
+@echo off
+endlocal
\ No newline at end of file
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/README.txt
new file mode 100644
index 00000000..3d1a614a
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/README.txt
@@ -0,0 +1,53 @@
+About this Example
+==================
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+IAR Project File
+----------------
+The IAR EWARM project file provided with this example uses relative paths
+to the QP/C framework location (includes, port, and libraries. These
+relative paths must be modified when the project is moved to different
+relative location.
+
+
+Stack Size and Heap Size
+------------------------
+In this project, the size of the C stack and heap are determined in
+the linker script blinky-qk.icf (see the next section).
+
+
+Linker Script
+-------------
+The IAR linker script provides a template of the recommended linker script
+for QP applications. This file needs to be customized to set the
+application-specific sizes of the Stack and Heap. This file can be edited
+from the IAR EWARM IDE via the Project Options/Linker settings.
+
+
+Startup Code
+------------
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp
new file mode 100644
index 00000000..ac792c2a
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp
@@ -0,0 +1,2966 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 40
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\..\blinky.cpp
+
+
+ $PROJ_DIR$\..\..\blinky.h
+
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+
+ ek-tm4c123gxl
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qv.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qv_pkg.h
+
+
+
+ QP_port
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww
new file mode 100644
index 00000000..109eebbd
--- /dev/null
+++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\blinky-qv.ewp
+
+
+
+
+
diff --git a/examples/arm-cm/vanilla/iar/blinky_ek-tm4c123gxl/blinky.icf b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf
similarity index 100%
rename from examples/arm-cm/vanilla/iar/blinky_ek-tm4c123gxl/blinky.icf
rename to examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/README.txt
new file mode 100644
index 00000000..e085dba9
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/README.txt
@@ -0,0 +1,37 @@
+About this Example
+==================
+This directory contains the "DPP" (Dining Philosopher Problem) QP example
+application for the EK-TM4C123GXL board (TivaC LauchPad). This directory
+contains portable code that should compile with any C compiler for ARM
+Cortex-M.
+
+The sub-directories contain code and project files, which are
+specific to the particular ARM toolchains, such as ARM (MDK-ARM),
+GCC, and IAR.
+
+Please refer to the README files in the sub-directories for specific
+instructions how to use and customize the example to your needs.
+
+
+Support Code for EK-TM4C123GXL Board
+====================================
+The directory qpc\3rd_party\ek-tm4c123gxl contains the CMSIS-
+compliant device code for the TM4C123GH6PM MCU. Please see the README
+file in this folder for more details.
+
+
+QS Software Tracing Instrumentation
+===================================
+This example provides the "Spy" build configuration, which outputs
+the QS (Quantum Spy) software tracing data through UART0, which is
+connected to the virtual COM port of the TI Stellaris debugger.
+
+The output is generated at 115200 baud rate.
+
+Here is an example invocation of the QSPY host application to receive
+the QS data from EK-TM4C123GXL:
+
+qspy -cCOM1
+
+The actual COM port number might be different on your Windows machine.
+Please check the Device Manager to find the COM port number.
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/README.url b/examples/arm-cm/dpp_ek-tm4c123gxl/README.url
new file mode 100644
index 00000000..bfe8be09
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/arm-cm_dpp_ek-tm4c123gxl.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/bsp.h b/examples/arm-cm/dpp_ek-tm4c123gxl/bsp.h
new file mode 100644
index 00000000..aefcc36e
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/bsp.h
@@ -0,0 +1,51 @@
+//****************************************************************************
+// Product: DPP example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef bsp_h
+#define bsp_h
+
+namespace DPP {
+
+uint32_t const BSP_TICKS_PER_SEC = static_cast(100);
+
+void BSP_init(void);
+void BSP_displayPaused(uint8_t const paused);
+void BSP_displayPhilStat(uint8_t const n, char_t const *stat);
+void BSP_terminate(int16_t const result);
+
+void BSP_randomSeed(uint32_t const seed); // random seed
+uint32_t BSP_random(void); // pseudo-random generator
+
+} // namespace DPP
+
+#endif // bsp_h
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h
new file mode 100644
index 00000000..dcfc2baa
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h
@@ -0,0 +1,62 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./dpp.h
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::dpp.h} ................................................................
+#ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+//${Events::TableEvt} ........................................................
+class TableEvt : public QP::QEvt {
+public:
+ uint8_t philoNum;
+};
+
+} // namespace DPP
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Philo[N_PHILO];
+
+} // namespace DPP
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Table;
+
+} // namespace DPP
+
+#endif // dpp_h
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm
new file mode 100644
index 00000000..18b1c153
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm
@@ -0,0 +1,445 @@
+
+
+ Dining Philosopher Problem example with MSM state machines
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+
+
+
+ static bool registered = false; // starts off with 0, per C-standard
+(void)e; // suppress the compiler warning about unused parameter
+if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+}
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+me->subscribe(EAT_SIG);
+
+
+
+
+
+ me->m_timeEvt.armX(think_time(), 0U);
+ (void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+pe->philoNum = PHILO_ID(me);
+AO_Table->POST(pe, me);
+
+
+ Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)
+
+
+
+
+
+
+
+
+
+ /* DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+ me->m_timeEvt.armX(eat_time(), 0U);
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+pe->philoNum = PHILO_ID(me);
+QP::QF::PUBLISH(pe, me);
+(void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Table::initial))
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+}
+
+
+
+ (void)e; // suppress the compiler warning about unused parameter
+
+QS_OBJ_DICTIONARY(&l_table);
+QS_FUN_DICTIONARY(&QP::QHsm::top);
+QS_FUN_DICTIONARY(&Table::initial);
+QS_FUN_DICTIONARY(&Table::active);
+QS_FUN_DICTIONARY(&Table::serving);
+QS_FUN_DICTIONARY(&Table::paused);
+
+QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+me->subscribe(DONE_SIG);
+me->subscribe(PAUSE_SIG);
+me->subscribe(SERVE_SIG);
+me->subscribe(TERMINATE_SIG);
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+}
+
+
+
+
+
+
+ BSP_terminate(0);
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+}
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, HUNGRY);
+uint8_t m = LEFT(n);
+
+ (me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)
+ me->m_fork[m] = USED;
+me->m_fork[n] = USED;
+TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+pe->philoNum = n;
+QP::QF::PUBLISH(pe, me);
+BSP_displayPhilStat(n, EATING);
+
+
+
+
+
+ else
+ me->m_isHungry[n] = true;
+
+
+
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+// both forks of Phil[n] must be used
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+m = RIGHT(n); // check the right neighbor
+
+if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+m = LEFT(n); // check the left neighbor
+n = LEFT(m); // left fork of the left neighbor
+if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BSP_displayPaused(1U);
+ BSP_displayPaused(0U);
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// philo ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+me->m_isHungry[n] = true;
+BSP_displayPhilStat(n, HUNGRY);
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+/* both forks of Phil[n] must be used */
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+$declare(Events::TableEvt)
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+$declare(AOs::AO_Philo[N_PHILO])
+
+$declare(AOs::AO_Table)
+
+#endif // dpp_h
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Philo)
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast<uint8_t>(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+$define(AOs::Philo)
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Table)
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast<uint8_t>((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast<uint8_t>((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast<uint8_t>(0);
+static uint8_t const USED = static_cast<uint8_t>(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+$define(AOs::Table)
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/README.txt
new file mode 100644
index 00000000..cd250d16
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/README.txt
@@ -0,0 +1,30 @@
+About this Example
+==================
+This directory contains the facilities for "linting" the application with
+PC-Lint.
+
+To "lint" the application, invoke the batch "lin.bat" without parameters.
+Optionally, you can supply the parameter -DQ_SPY to include the QS
+instrumentation in the "linting" process.
+
+The output from the "linting" is saved in the fle "lin_out.txt".
+
+***
+NOTE: You need to adjust the symbol PC_LINT_DIR at the top of the
+lin.bat file, to point to the directory where PC-Lint is installed
+on you machine.
+***
+
+
+The PC-Lint Options File
+========================
+The "options.lnt" file specifies the linting options. You might need
+to modify this file to suit your needs.
+
+
+****
+NOTE: The purpose of this example is NOT to find problems with the
+supporting 3rd-party code, which every non-trivial embedded system needs.
+Rather, the purpose of this particular example is to check YOUR application
+level code, such as state machines.
+****
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lin.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lin.bat
new file mode 100644
index 00000000..63991a78
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lin.bat
@@ -0,0 +1,55 @@
+@echo off
+:: ===========================================================================
+:: Product: QP/C++ build script for PC-Lint(TM)
+:: Last Updated for Version: 5.4.0
+:: Date of the Last Update: 2015-04-15
+::
+:: Q u a n t u m L e a P s
+:: ---------------------------
+:: innovating embedded systems
+::
+:: Copyright (C) Quantum Leaps, LLC. All rights reserved.
+::
+:: This program is open source software: you can redistribute it and/or
+:: modify it under the terms of the GNU General Public License as published
+:: by the Free Software Foundation, either version 3 of the License, or
+:: (at your option) any later version.
+::
+:: Alternatively, this program may be distributed and modified under the
+:: terms of Quantum Leaps commercial licenses, which expressly supersede
+:: the GNU General Public License and are specifically designed for
+:: licensees interested in retaining the proprietary status of their code.
+::
+:: This program is distributed in the hope that it will be useful,
+:: but WITHOUT ANY WARRANTY; without even the implied warranty of
+:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+:: GNU General Public License for more details.
+::
+:: You should have received a copy of the GNU General Public License
+:: along with this program. If not, see .
+::
+:: Contact information:
+:: Web : http://www.state-machine.com
+:: Email: info@state-machine.com
+:: ===========================================================================
+setlocal
+
+:: Options for calling lin.bat
+::
+:: -DQ_SPY // for linting the Spy configuration (default for QS)
+:: up to 4 other options, if needed
+
+:: NOTE: adjust to for your installation directory of PC-Lint
+::
+set PC_LINT_DIR=C:\tools\lint
+
+set QPCPP=..\..\..\..
+
+set LINTFLAGS=-i%PC_LINT_DIR%\lnt %QPCPP%\include\std.lnt options.lnt %1 %2 %3 %4
+
+set PROJ_DIR=..
+
+:: linting -------------------------------------------------------------------
+%PC_LINT_DIR%\lint-nt -os(lint_out.txt) %LINTFLAGS% %PROJ_DIR%\philo.cpp %PROJ_DIR%\table.cpp
+
+endlocal
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lint_out.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lint_out.txt
new file mode 100644
index 00000000..f1a7564d
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/lint_out.txt
@@ -0,0 +1,412 @@
+
+--- Module: D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp (C++)
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 15 Warning 618: Storage class specified after a type
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 24 Note 963: Qualifier const or volatile precedes a type; use +fqb to reverse the test
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 42 Note 1960: Violates MISRA C++ 2008 Required Rule 7-3-1, Global declaration of symbol 'QK_get_IPSR'
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 47 52 Note 1960: Violates MISRA C++ 2008 Required Rule 6-2-3, null statement not in line by itself
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 48 19 Warning 530: Symbol 'regIPSR' (line 46) not initialized [MISRA C++ Rule 8-5-1]
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 46 1 Info 830: Location cited in prior message
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 53 32 Note 1923: macro 'QK_ISR_ENTRY' could become const variable [MISRA C++ Rule 16-2-2]
+"D:\qp\qpcpp\include\qpset.h" 128 58 Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-8, Cast of integer cvalue expression to larger type
+"D:\qp\qpcpp\include\qpset.h" 221 21 Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-8, Cast of integer cvalue expression to larger type
+"D:\qp\qpcpp\include\qpset.h" 224 21 Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-8, Cast of integer cvalue expression to larger type
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qs_port.h" 52 10 Warning 537: Repeated include file 'D:\qp\qpcpp\ports\arm-cm\qk\gnu\qf_port.h'
+"D:\qp\qpcpp\include\qpcpp.h" 91 9 Note 1960: Violates MISRA C++ 2008 Required Rule 16-0-4, Function-like macro defined: 'Q_IGNORED'
+"D:\qp\qpcpp\include\qpcpp.h" 130 13 Note 1960: Violates MISRA C++ 2008 Required Rule 16-0-4, Function-like macro defined: 'publish'
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 22 1 Note 1960: Violates MISRA C++ 2008 Required Rule 7-3-1, Global declaration of symbol 'Q_this_module_'
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 128 42 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 129 43 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 130 41 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 131 41 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 137 32 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 137 32 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 174 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 174 38 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 204 26 Warning 534: Ignoring return value of function 'QP::QMActive::post_(const struct QP::QEvt *, unsigned int, const void *)' (compare with line 202, file D:\qp\qpcpp\include\qf.h) [MISRA C++ Rule 0-1-7], [MISRA C++ Rule 0-3-2]
+"D:\qp\qpcpp\include\qf.h" 202 1 Info 830: Location cited in prior message
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 225 42 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 225 42 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 284 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 284 38 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\include\qf.h" 442 1 Warning 551: Symbol 'QP::QF_SUBSCR_LIST_SIZE' (line 442, file D:\qp\qpcpp\include\qf.h) not accessed [MISRA C++ Rule 0-1-4]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 102 1 Info 754: local struct member 'target' (line 102, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 103 1 Info 754: local struct member 'act' (line 103, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 164 1 Info 754: local struct member 'target' (line 164, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 165 1 Info 754: local struct member 'act' (line 165, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 216 1 Info 754: local struct member 'target' (line 216, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 217 1 Info 754: local struct member 'act' (line 217, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 274 1 Info 754: local struct member 'target' (line 274, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp" 275 1 Info 754: local struct member 'act' (line 275, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not referenced
+
+--- Module: D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp (C++)
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 15 Warning 618: Storage class specified after a type
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 24 Note 963: Qualifier const or volatile precedes a type; use +fqb to reverse the test
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 45 42 Note 1960: Violates MISRA C++ 2008 Required Rule 7-3-1, Global declaration of symbol 'QK_get_IPSR'
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 47 52 Note 1960: Violates MISRA C++ 2008 Required Rule 6-2-3, null statement not in line by itself
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 48 19 Warning 530: Symbol 'regIPSR' (line 46) not initialized [MISRA C++ Rule 8-5-1]
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 46 1 Info 830: Location cited in prior message
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qk_port.h" 53 32 Note 1923: macro 'QK_ISR_ENTRY' could become const variable [MISRA C++ Rule 16-2-2]
+"D:\qp\qpcpp\ports\arm-cm\qk\gnu\qs_port.h" 52 10 Warning 537: Repeated include file 'D:\qp\qpcpp\ports\arm-cm\qk\gnu\qf_port.h'
+"D:\qp\qpcpp\include\qpcpp.h" 91 9 Note 1960: Violates MISRA C++ 2008 Required Rule 16-0-4, Function-like macro defined: 'Q_IGNORED'
+"D:\qp\qpcpp\include\qpcpp.h" 130 13 Note 1960: Violates MISRA C++ 2008 Required Rule 16-0-4, Function-like macro defined: 'publish'
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 22 1 Note 1960: Violates MISRA C++ 2008 Required Rule 7-3-1, Global declaration of symbol 'Q_this_module_'
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 108 37 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 109 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 110 37 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 111 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 112 37 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 132 32 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 132 32 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 155 21 Warning 527: Unreachable code at token 'status_' [MISRA C++ Rule 0-1-1]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 262 21 Warning 527: Unreachable code at token 'status_' [MISRA C++ Rule 0-1-1]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 277 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 277 38 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 324 38 Note 929: cast from pointer to pointer [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 324 38 Info 740: Unusual pointer cast (incompatible indirect types) [MISRA C++ Rule 5-2-6], [MISRA C++ Rule 5-2-7]
+"D:\qp\qpcpp\include\qf.h" 442 1 Warning 551: Symbol 'QP::QF_SUBSCR_LIST_SIZE' (line 442, file D:\qp\qpcpp\include\qf.h) not accessed [MISRA C++ Rule 0-1-4]
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 95 1 Info 754: local struct member 'target' (line 95, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 96 1 Info 754: local struct member 'act' (line 96, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 268 1 Info 754: local struct member 'target' (line 268, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 269 1 Info 754: local struct member 'act' (line 269, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 314 1 Info 754: local struct member 'target' (line 314, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp" 315 1 Info 754: local struct member 'act' (line 315, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp) not referenced
+
+/// Start of Pass 2 ///
+
+--- Module: D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp (C++)
+
+--- Module: D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\table.cpp (C++)
+
+--- Global Wrap-up
+
+"D:\qp\qpcpp\include\qassert.h" 223 1 Warning 526: Symbol 'Q_onAssert(const char *, int)' (line 223, file D:\qp\qpcpp\include\qassert.h, module D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\philo.cpp) not defined
+"D:\qp\qpcpp\include\qep.h" 482 1 Info 758: global enum 'QP::QMsm::ReservedHsmSignals' (line 482, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-5]
+"D:\qp\qpcpp\include\qs.h" 324 1 Info 758: global enum 'QP::QS::QSType' (line 324, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-5]
+"D:\qp\qpcpp\include\qep.h" 355 1 Warning 1526: Member function 'QP::QMsm::init(const struct QP::QEvt *)' (line 355, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 356 1 Info 1716: Virtual member function 'QP::QMsm::init(void)' (line 356, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 359 1 Info 1716: Virtual member function 'QP::QMsm::dispatch(const struct QP::QEvt *)' (line 359, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 359 1 Warning 1526: Member function 'QP::QMsm::dispatch(const struct QP::QEvt *)' (line 359, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 362 1 Info 1714: Member function 'QP::QMsm::isInState(const struct QP::QMState *) const' (line 362, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 362 1 Warning 1526: Member function 'QP::QMsm::isInState(const struct QP::QMState *) const' (line 362, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 365 1 Info 1714: Member function 'QP::QMsm::stateObj(void) const' (line 365, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 371 1 Info 1714: Member function 'QP::QMsm::QMsm(unsigned int (*)(void *, const struct QP::QEvt *))' (line 371, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 371 1 Warning 1526: Member function 'QP::QMsm::QMsm(unsigned int (*)(void *, const struct QP::QEvt *))' (line 371, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 381 1 Info 1714: Member function 'QP::QMsm::qm_tran_hist_(const struct QP::QMState *, const struct QP::QMTranActTable *)' (line 381, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 397 1 Info 1714: Member function 'QP::QMsm::qm_tran_ep_(const struct QP::QMTranActTable *)' (line 397, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 404 1 Info 1714: Member function 'QP::QMsm::qm_tran_xp_(unsigned int (*)(void *), const struct QP::QMTranActTable *)' (line 404, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 426 1 Info 1714: Member function 'QP::QMsm::qm_super_sub_(const struct QP::QMState *)' (line 426, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 452 1 Info 1714: Member function 'QP::QMsm::Q_HANDLED(void)' (line 452, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 460 1 Info 1714: Member function 'QP::QMsm::Q_UNHANDLED(void)' (line 460, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 465 1 Info 1714: Member function 'QP::QMsm::tran_(unsigned int (*)(void *, const struct QP::QEvt *))' (line 465, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 471 1 Info 1714: Member function 'QP::QMsm::tran_hist_(unsigned int (*)(void *, const struct QP::QEvt *))' (line 471, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 477 1 Info 1714: Member function 'QP::QMsm::super_(unsigned int (*)(void *, const struct QP::QEvt *))' (line 477, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 483 1 Info 769: global enumeration constant 'QP::QMsm::ReservedHsmSignals::Q_ENTRY_SIG' (line 483, file D:\qp\qpcpp\include\qep.h) not referenced
+"D:\qp\qpcpp\include\qep.h" 484 1 Info 769: global enumeration constant 'QP::QMsm::ReservedHsmSignals::Q_EXIT_SIG' (line 484, file D:\qp\qpcpp\include\qep.h) not referenced
+"D:\qp\qpcpp\include\qep.h" 485 1 Info 769: global enumeration constant 'QP::QMsm::ReservedHsmSignals::Q_INIT_SIG' (line 485, file D:\qp\qpcpp\include\qep.h) not referenced
+"D:\qp\qpcpp\include\qep.h" 499 1 Info 1715: static member 'QP::QMsm::MAX_ENTRY_DEPTH_' (line 499, file D:\qp\qpcpp\include\qep.h) not referenced
+"D:\qp\qpcpp\include\qep.h" 502 1 Info 1715: static member 'QP::QMsm::msm_top_s' (line 502, file D:\qp\qpcpp\include\qep.h) not referenced
+"D:\qp\qpcpp\include\qep.h" 502 1 Warning 1527: static member 'QP::QMsm::msm_top_s' (line 502, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 534 1 Warning 1526: Member function 'QP::QHsm::init(const struct QP::QEvt *)' (line 534, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 538 1 Info 1716: Virtual member function 'QP::QHsm::dispatch(const struct QP::QEvt *)' (line 538, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 538 1 Warning 1526: Member function 'QP::QHsm::dispatch(const struct QP::QEvt *)' (line 538, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 542 1 Info 1714: Member function 'QP::QHsm::isIn(unsigned int (*)(void *, const struct QP::QEvt *))' (line 542, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 542 1 Warning 1526: Member function 'QP::QHsm::isIn(unsigned int (*)(void *, const struct QP::QEvt *))' (line 542, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 545 1 Warning 1526: Member function 'QP::QHsm::top(void *, const struct QP::QEvt *)' (line 545, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 548 1 Info 1714: Member function 'QP::QHsm::state(void) const' (line 548, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 554 1 Info 1714: Member function 'QP::QHsm::QHsm(unsigned int (*)(void *, const struct QP::QEvt *))' (line 554, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qep.h" 554 1 Warning 1526: Member function 'QP::QHsm::QHsm(unsigned int (*)(void *, const struct QP::QEvt *))' (line 554, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 569 1 Warning 526: Symbol 'QP::versionStr' (line 569, file D:\qp\qpcpp\include\qep.h) not defined
+"D:\qp\qpcpp\include\qep.h" 576 1 Info 1714: Member function 'QP::QEP::getVersion(void)' (line 576, file D:\qp\qpcpp\include\qep.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 161 1 Warning 1526: Member function 'QP::QEQueue::QEQueue(void)' (line 161, file D:\qp\qpcpp\include\qequeue.h) not defined
+"D:\qp\qpcpp\include\qequeue.h" 171 1 Info 1714: Member function 'QP::QEQueue::init(const struct QP::QEvt **, unsigned int)' (line 171, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 171 1 Warning 1526: Member function 'QP::QEQueue::init(const struct QP::QEvt **, unsigned int)' (line 171, file D:\qp\qpcpp\include\qequeue.h) not defined
+"D:\qp\qpcpp\include\qequeue.h" 187 1 Info 1714: Member function 'QP::QEQueue::post(const struct QP::QEvt *, unsigned int)' (line 187, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 187 1 Warning 1526: Member function 'QP::QEQueue::post(const struct QP::QEvt *, unsigned int)' (line 187, file D:\qp\qpcpp\include\qequeue.h) not defined
+"D:\qp\qpcpp\include\qequeue.h" 197 1 Info 1714: Member function 'QP::QEQueue::postLIFO(const struct QP::QEvt *)' (line 197, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 197 1 Warning 1526: Member function 'QP::QEQueue::postLIFO(const struct QP::QEvt *)' (line 197, file D:\qp\qpcpp\include\qequeue.h) not defined
+"D:\qp\qpcpp\include\qequeue.h" 211 1 Info 1714: Member function 'QP::QEQueue::get(void)' (line 211, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 211 1 Warning 1526: Member function 'QP::QEQueue::get(void)' (line 211, file D:\qp\qpcpp\include\qequeue.h) not defined
+"D:\qp\qpcpp\include\qequeue.h" 223 1 Info 1714: Member function 'QP::QEQueue::getNFree(void) const' (line 223, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qequeue.h" 237 1 Info 1714: Member function 'QP::QEQueue::isEmpty(void) const' (line 237, file D:\qp\qpcpp\include\qequeue.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qmpool.h" 136 1 Note 1914: Default constructor 'QP::QMPool::QMPool(void)' (line 136, file D:\qp\qpcpp\include\qmpool.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qmpool.h" 136 1 Warning 1526: Member function 'QP::QMPool::QMPool(void)' (line 136, file D:\qp\qpcpp\include\qmpool.h) not defined
+"D:\qp\qpcpp\include\qmpool.h" 139 1 Info 1714: Member function 'QP::QMPool::init(void *, unsigned int, unsigned int)' (line 139, file D:\qp\qpcpp\include\qmpool.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qmpool.h" 139 1 Warning 1526: Member function 'QP::QMPool::init(void *, unsigned int, unsigned int)' (line 139, file D:\qp\qpcpp\include\qmpool.h) not defined
+"D:\qp\qpcpp\include\qmpool.h" 143 1 Info 1714: Member function 'QP::QMPool::get(unsigned int)' (line 143, file D:\qp\qpcpp\include\qmpool.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qmpool.h" 143 1 Warning 1526: Member function 'QP::QMPool::get(unsigned int)' (line 143, file D:\qp\qpcpp\include\qmpool.h) not defined
+"D:\qp\qpcpp\include\qmpool.h" 146 1 Info 1714: Member function 'QP::QMPool::put(void *)' (line 146, file D:\qp\qpcpp\include\qmpool.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qmpool.h" 146 1 Warning 1526: Member function 'QP::QMPool::put(void *)' (line 146, file D:\qp\qpcpp\include\qmpool.h) not defined
+"D:\qp\qpcpp\include\qmpool.h" 149 1 Info 1714: Member function 'QP::QMPool::getBlockSize(void) const' (line 149, file D:\qp\qpcpp\include\qmpool.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 72 1 Warning 526: Symbol 'QP::QF_pwr2Lkup' (line 72, file D:\qp\qpcpp\include\qpset.h) not defined
+"D:\qp\qpcpp\include\qpset.h" 77 1 Warning 526: Symbol 'QP::QF_invPwr2Lkup' (line 77, file D:\qp\qpcpp\include\qpset.h) not defined
+"D:\qp\qpcpp\include\qpset.h" 82 1 Warning 526: Symbol 'QP::QF_div8Lkup' (line 82, file D:\qp\qpcpp\include\qpset.h) not defined
+"D:\qp\qpcpp\include\qpset.h" 99 1 Info 1714: Member function 'QP::QPSet8::isEmpty(void) const' (line 99, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 105 1 Info 1714: Member function 'QP::QPSet8::notEmpty(void) const' (line 105, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 110 1 Info 1714: Member function 'QP::QPSet8::hasElement(unsigned int) const' (line 110, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 117 1 Info 1714: Member function 'QP::QPSet8::insert(unsigned int)' (line 117, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 122 1 Info 1714: Member function 'QP::QPSet8::remove(unsigned int)' (line 122, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 127 1 Info 1714: Member function 'QP::QPSet8::findMax(void) const' (line 127, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 175 1 Info 1714: Member function 'QP::QPSet64::isEmpty(void) const' (line 175, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 181 1 Info 1714: Member function 'QP::QPSet64::notEmpty(void) const' (line 181, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 186 1 Info 1714: Member function 'QP::QPSet64::hasElement(unsigned int) const' (line 186, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 195 1 Info 1714: Member function 'QP::QPSet64::insert(unsigned int)' (line 195, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 205 1 Info 1714: Member function 'QP::QPSet64::remove(unsigned int)' (line 205, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qpset.h" 216 1 Info 1714: Member function 'QP::QPSet64::findMax(void) const' (line 216, file D:\qp\qpcpp\include\qpset.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qk.h" 88 1 Info 1714: Member function 'QP::QK::getVersion(void)' (line 88, file D:\qp\qpcpp\include\qk.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qk.h" 102 1 Info 1714: Member function 'QP::QK::onIdle(void)' (line 102, file D:\qp\qpcpp\include\qk.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qk.h" 102 1 Warning 1526: Member function 'QP::QK::onIdle(void)' (line 102, file D:\qp\qpcpp\include\qk.h) not defined
+"D:\qp\qpcpp\include\qk.h" 107 1 Info 1714: Member function 'QP::QK::mutexLock(unsigned int)' (line 107, file D:\qp\qpcpp\include\qk.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qk.h" 107 1 Warning 1526: Member function 'QP::QK::mutexLock(unsigned int)' (line 107, file D:\qp\qpcpp\include\qk.h) not defined
+"D:\qp\qpcpp\include\qk.h" 110 1 Info 1714: Member function 'QP::QK::mutexUnlock(unsigned int)' (line 110, file D:\qp\qpcpp\include\qk.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qk.h" 110 1 Warning 1526: Member function 'QP::QK::mutexUnlock(unsigned int)' (line 110, file D:\qp\qpcpp\include\qk.h) not defined
+"D:\qp\qpcpp\include\qf.h" 183 1 Warning 1526: Member function 'QP::QMActive::start(unsigned int, const struct QP::QEvt **, unsigned int, void *, unsigned int, const struct QP::QEvt *)' (line 183, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 189 1 Info 1716: Virtual member function 'QP::QMActive::start(unsigned int, const struct QP::QEvt **, unsigned int, void *, unsigned int)' (line 189, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 202 1 Warning 1526: Member function 'QP::QMActive::post_(const struct QP::QEvt *, unsigned int, const void *)' (line 202, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 208 1 Info 1716: Virtual member function 'QP::QMActive::postLIFO(const struct QP::QEvt *)' (line 208, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 208 1 Warning 1526: Member function 'QP::QMActive::postLIFO(const struct QP::QEvt *)' (line 208, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 211 1 Info 1714: Member function 'QP::QMActive::unsubscribeAll(void) const' (line 211, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 211 1 Warning 1526: Member function 'QP::QMActive::unsubscribeAll(void) const' (line 211, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 215 1 Warning 1526: Member function 'QP::QMActive::QMActive(unsigned int (*)(void *, const struct QP::QEvt *))' (line 215, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 219 1 Info 1714: Member function 'QP::QMActive::stop(void)' (line 219, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 219 1 Warning 1526: Member function 'QP::QMActive::stop(void)' (line 219, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 222 1 Warning 1526: Member function 'QP::QMActive::subscribe(int) const' (line 222, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 225 1 Info 1714: Member function 'QP::QMActive::unsubscribe(int) const' (line 225, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 225 1 Warning 1526: Member function 'QP::QMActive::unsubscribe(int) const' (line 225, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 228 1 Info 1714: Member function 'QP::QMActive::defer(QP::QEQueue *, const struct QP::QEvt *) const' (line 228, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 228 1 Warning 1526: Member function 'QP::QMActive::defer(QP::QEQueue *, const struct QP::QEvt *) const' (line 228, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 231 1 Info 1714: Member function 'QP::QMActive::recall(QP::QEQueue *)' (line 231, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 231 1 Warning 1526: Member function 'QP::QMActive::recall(QP::QEQueue *)' (line 231, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 234 1 Info 1714: Member function 'QP::QMActive::getPrio(void) const' (line 234, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 239 1 Info 1714: Member function 'QP::QMActive::setPrio(unsigned int)' (line 239, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 257 1 Info 1714: Member function 'QP::QMActive::get_(void)' (line 257, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 257 1 Warning 1526: Member function 'QP::QMActive::get_(void)' (line 257, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 292 1 Warning 1526: Member function 'QP::QActive::init(const struct QP::QEvt *)' (line 292, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 293 1 Warning 1526: Member function 'QP::QActive::init(void)' (line 293, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 294 1 Info 1716: Virtual member function 'QP::QActive::dispatch(const struct QP::QEvt *)' (line 294, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 294 1 Warning 1526: Member function 'QP::QActive::dispatch(const struct QP::QEvt *)' (line 294, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 296 1 Info 1714: Member function 'QP::QActive::isIn(unsigned int (*)(void *, const struct QP::QEvt *))' (line 296, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 296 1 Warning 1526: Member function 'QP::QActive::isIn(unsigned int (*)(void *, const struct QP::QEvt *))' (line 296, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 300 1 Info 1714: Member function 'QP::QActive::QActive(unsigned int (*)(void *, const struct QP::QEvt *))' (line 300, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 300 1 Warning 1526: Member function 'QP::QActive::QActive(unsigned int (*)(void *, const struct QP::QEvt *))' (line 300, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 368 1 Warning 1526: Member function 'QP::QTimeEvt::QTimeEvt(QP::QMActive *, int, unsigned char)' (line 368, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 372 1 Warning 1526: Member function 'QP::QTimeEvt::armX(unsigned short, unsigned short)' (line 372, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 376 1 Warning 1526: Member function 'QP::QTimeEvt::disarm(void)' (line 376, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 379 1 Info 1714: Member function 'QP::QTimeEvt::rearm(unsigned short)' (line 379, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 379 1 Warning 1526: Member function 'QP::QTimeEvt::rearm(unsigned short)' (line 379, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 382 1 Info 1714: Member function 'QP::QTimeEvt::ctr(void) const' (line 382, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 382 1 Warning 1526: Member function 'QP::QTimeEvt::ctr(void) const' (line 382, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 387 1 Info 1714: Member function 'QP::QTimeEvt::QTimeEvt(int)' (line 387, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 405 1 Info 1714: Member function 'QP::QTimeEvt::postIn(QP::QMActive *, unsigned short)' (line 405, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 411 1 Info 1714: Member function 'QP::QTimeEvt::postEvery(QP::QMActive *, unsigned short)' (line 411, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 419 1 Warning 1526: Member function 'QP::QTimeEvt::QTimeEvt(void)' (line 419, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 428 1 Info 1714: Member function 'QP::QTimeEvt::toActive(void)' (line 428, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 431 1 Info 1714: Member function 'QP::QTimeEvt::toTimeEvt(void)' (line 431, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 480 1 Info 1714: Member function 'QP::QF::getVersion(void)' (line 480, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 485 1 Info 1714: Member function 'QP::QF::init(void)' (line 485, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 485 1 Warning 1526: Member function 'QP::QF::init(void)' (line 485, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 488 1 Info 1714: Member function 'QP::QF::psInit(QP::QSubscrList *, int)' (line 488, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 488 1 Warning 1526: Member function 'QP::QF::psInit(QP::QSubscrList *, int)' (line 488, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 492 1 Info 1714: Member function 'QP::QF::poolInit(void *, unsigned int, unsigned int)' (line 492, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 492 1 Warning 1526: Member function 'QP::QF::poolInit(void *, unsigned int, unsigned int)' (line 492, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 496 1 Info 1714: Member function 'QP::QF::run(void)' (line 496, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 496 1 Warning 1526: Member function 'QP::QF::run(void)' (line 496, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 499 1 Info 1714: Member function 'QP::QF::onStartup(void)' (line 499, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 499 1 Warning 1526: Member function 'QP::QF::onStartup(void)' (line 499, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 502 1 Info 1714: Member function 'QP::QF::onCleanup(void)' (line 502, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 502 1 Warning 1526: Member function 'QP::QF::onCleanup(void)' (line 502, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 506 1 Info 1714: Member function 'QP::QF::stop(void)' (line 506, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 506 1 Warning 1526: Member function 'QP::QF::stop(void)' (line 506, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 514 1 Warning 1526: Member function 'QP::QF::publish_(const struct QP::QEvt *, const void *)' (line 514, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 517 1 Info 1714: Member function 'QP::QF::tickX_(unsigned char, const void *)' (line 517, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 517 1 Warning 1526: Member function 'QP::QF::tickX_(unsigned char, const void *)' (line 517, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 523 1 Info 1714: Member function 'QP::QF::noTimeEvtsActiveX(unsigned char)' (line 523, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 523 1 Warning 1526: Member function 'QP::QF::noTimeEvtsActiveX(unsigned char)' (line 523, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 528 1 Info 1714: Member function 'QP::QF::getPoolMin(unsigned int)' (line 528, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 528 1 Warning 1526: Member function 'QP::QF::getPoolMin(unsigned int)' (line 528, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 532 1 Info 1714: Member function 'QP::QF::getQueueMin(unsigned int)' (line 532, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 532 1 Warning 1526: Member function 'QP::QF::getQueueMin(unsigned int)' (line 532, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 535 1 Warning 1526: Member function 'QP::QF::newX_(unsigned int, unsigned int, int)' (line 535, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 539 1 Info 1714: Member function 'QP::QF::gc(const struct QP::QEvt *)' (line 539, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 539 1 Warning 1526: Member function 'QP::QF::gc(const struct QP::QEvt *)' (line 539, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 542 1 Info 1714: Member function 'QP::QF::remove_(const QP::QMActive *)' (line 542, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 542 1 Warning 1526: Member function 'QP::QF::remove_(const QP::QMActive *)' (line 542, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 545 1 Info 1715: static member 'QP::QF::active_' (line 545, file D:\qp\qpcpp\include\qf.h) not referenced
+"D:\qp\qpcpp\include\qf.h" 545 1 Warning 1527: static member 'QP::QF::active_' (line 545, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 548 1 Info 1714: Member function 'QP::QF::thread_(QP::QMActive *)' (line 548, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 548 1 Warning 1526: Member function 'QP::QF::thread_(QP::QMActive *)' (line 548, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 551 1 Info 1714: Member function 'QP::QF::add_(QP::QMActive *)' (line 551, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 551 1 Warning 1526: Member function 'QP::QF::add_(QP::QMActive *)' (line 551, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 554 1 Info 1714: Member function 'QP::QF::bzero(void *, unsigned int)' (line 554, file D:\qp\qpcpp\include\qf.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qf.h" 554 1 Warning 1526: Member function 'QP::QF::bzero(void *, unsigned int)' (line 554, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qf.h" 560 1 Info 1715: static member 'QP::QF::timeEvtHead_' (line 560, file D:\qp\qpcpp\include\qf.h) not referenced
+"D:\qp\qpcpp\include\qf.h" 560 1 Warning 1527: static member 'QP::QF::timeEvtHead_' (line 560, file D:\qp\qpcpp\include\qf.h) not defined
+"D:\qp\qpcpp\include\qs.h" 76 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QP_RESET' (line 76, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 79 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_STATE_ENTRY' (line 79, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 80 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_STATE_EXIT' (line 80, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 81 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_STATE_INIT' (line 81, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 82 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_INIT_TRAN' (line 82, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 83 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_INTERN_TRAN' (line 83, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 84 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_TRAN' (line 84, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 85 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_IGNORED' (line 85, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 86 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_DISPATCH' (line 86, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 87 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_UNHANDLED' (line 87, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 90 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_ADD' (line 90, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 91 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_REMOVE' (line 91, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 92 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_SUBSCRIBE' (line 92, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 93 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_UNSUBSCRIBE' (line 93, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 94 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_POST_FIFO' (line 94, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 95 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_POST_LIFO' (line 95, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 96 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_GET' (line 96, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 97 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_GET_LAST' (line 97, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 98 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_INIT' (line 98, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 99 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_POST_FIFO' (line 99, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 100 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_POST_LIFO' (line 100, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 101 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_GET' (line 101, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 102 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_GET_LAST' (line 102, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 103 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_MPOOL_INIT' (line 103, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 104 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_MPOOL_GET' (line 104, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 105 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_MPOOL_PUT' (line 105, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 106 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_PUBLISH' (line 106, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 107 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_RESERVED8' (line 107, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 108 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_NEW' (line 108, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 109 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_GC_ATTEMPT' (line 109, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 110 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_GC' (line 110, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 111 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TICK' (line 111, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 112 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_ARM' (line 112, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 113 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_AUTO_DISARM' (line 113, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 114 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_DISARM_ATTEMPT' (line 114, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 115 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_DISARM' (line 115, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 116 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_REARM' (line 116, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 117 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_POST' (line 117, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 118 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_TIMEEVT_CTR' (line 118, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 119 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_CRIT_ENTRY' (line 119, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 120 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_CRIT_EXIT' (line 120, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 121 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ISR_ENTRY' (line 121, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 122 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ISR_EXIT' (line 122, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 123 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_INT_DISABLE' (line 123, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 124 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_INT_ENABLE' (line 124, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 125 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_ACTIVE_POST_ATTEMPT' (line 125, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 126 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_EQUEUE_POST_ATTEMPT' (line 126, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 127 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_MPOOL_GET_ATTEMPT' (line 127, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 128 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_RESERVED1' (line 128, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 129 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QF_RESERVED0' (line 129, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 132 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QK_MUTEX_LOCK' (line 132, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 133 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QK_MUTEX_UNLOCK' (line 133, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 134 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QK_SCHEDULE' (line 134, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 135 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QK_RESERVED1' (line 135, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 136 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QK_RESERVED0' (line 136, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 139 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_TRAN_HIST' (line 139, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 140 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_TRAN_EP' (line 140, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 141 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_TRAN_XP' (line 141, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 142 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_RESERVED1' (line 142, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 143 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_QEP_RESERVED0' (line 143, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 149 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_USR_DICT' (line 149, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 150 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_EMPTY' (line 150, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 151 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_RESERVED3' (line 151, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 152 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_RESERVED2' (line 152, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 153 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_TEST_RUN' (line 153, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 154 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_TEST_FAIL' (line 154, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 155 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_ASSERT_FAIL' (line 155, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 158 1 Info 769: global enumeration constant 'QP::QSpyRecords::QS_USER' (line 158, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 206 1 Info 1714: Member function 'QP::QS::getVersion(void)' (line 206, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 211 1 Info 1714: Member function 'QP::QS::initBuf(unsigned char *, unsigned int)' (line 211, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 211 1 Warning 1526: Member function 'QP::QS::initBuf(unsigned char *, unsigned int)' (line 211, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 214 1 Info 1714: Member function 'QP::QS::filterOn(unsigned int)' (line 214, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 214 1 Warning 1526: Member function 'QP::QS::filterOn(unsigned int)' (line 214, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 217 1 Info 1714: Member function 'QP::QS::filterOff(unsigned int)' (line 217, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 217 1 Warning 1526: Member function 'QP::QS::filterOff(unsigned int)' (line 217, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 220 1 Info 1714: Member function 'QP::QS::beginRec(unsigned int)' (line 220, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 220 1 Warning 1526: Member function 'QP::QS::beginRec(unsigned int)' (line 220, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 223 1 Info 1714: Member function 'QP::QS::endRec(void)' (line 223, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 223 1 Warning 1526: Member function 'QP::QS::endRec(void)' (line 223, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 228 1 Info 1714: Member function 'QP::QS::u8_(unsigned char)' (line 228, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 228 1 Warning 1526: Member function 'QP::QS::u8_(unsigned char)' (line 228, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 231 1 Info 1714: Member function 'QP::QS::u8u8_(unsigned char, unsigned char)' (line 231, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 231 1 Warning 1526: Member function 'QP::QS::u8u8_(unsigned char, unsigned char)' (line 231, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 234 1 Info 1714: Member function 'QP::QS::u16_(unsigned short)' (line 234, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 234 1 Warning 1526: Member function 'QP::QS::u16_(unsigned short)' (line 234, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 237 1 Info 1714: Member function 'QP::QS::u32_(unsigned long)' (line 237, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 237 1 Warning 1526: Member function 'QP::QS::u32_(unsigned long)' (line 237, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 240 1 Info 1714: Member function 'QP::QS::str_(const char *)' (line 240, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 240 1 Warning 1526: Member function 'QP::QS::str_(const char *)' (line 240, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 244 1 Info 1714: Member function 'QP::QS::str_ROM_(const char *)' (line 244, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 244 1 Warning 1526: Member function 'QP::QS::str_ROM_(const char *)' (line 244, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 249 1 Info 1714: Member function 'QP::QS::u8(unsigned char, unsigned char)' (line 249, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 249 1 Warning 1526: Member function 'QP::QS::u8(unsigned char, unsigned char)' (line 249, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 252 1 Info 1714: Member function 'QP::QS::u16(unsigned char, unsigned short)' (line 252, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 252 1 Warning 1526: Member function 'QP::QS::u16(unsigned char, unsigned short)' (line 252, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 255 1 Info 1714: Member function 'QP::QS::u32(unsigned char, unsigned long)' (line 255, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 255 1 Warning 1526: Member function 'QP::QS::u32(unsigned char, unsigned long)' (line 255, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 258 1 Info 1714: Member function 'QP::QS::f32(unsigned char, float)' (line 258, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 258 1 Warning 1526: Member function 'QP::QS::f32(unsigned char, float)' (line 258, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 261 1 Info 1714: Member function 'QP::QS::f64(unsigned char, double)' (line 261, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 261 1 Warning 1526: Member function 'QP::QS::f64(unsigned char, double)' (line 261, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 264 1 Info 1714: Member function 'QP::QS::str(const char *)' (line 264, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 264 1 Warning 1526: Member function 'QP::QS::str(const char *)' (line 264, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 268 1 Info 1714: Member function 'QP::QS::str_ROM(const char *)' (line 268, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 268 1 Warning 1526: Member function 'QP::QS::str_ROM(const char *)' (line 268, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 271 1 Info 1714: Member function 'QP::QS::mem(const unsigned char *, unsigned char)' (line 271, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 271 1 Warning 1526: Member function 'QP::QS::mem(const unsigned char *, unsigned char)' (line 271, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 282 1 Warning 1526: Member function 'QP::QS::sig_dict(int, const void *, const char *)' (line 282, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 286 1 Warning 1526: Member function 'QP::QS::obj_dict(const void *, const char *)' (line 286, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 290 1 Warning 1526: Member function 'QP::QS::fun_dict(void (*)(void), const char *)' (line 290, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 294 1 Info 1714: Member function 'QP::QS::usr_dict(int, const char *)' (line 294, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 294 1 Warning 1526: Member function 'QP::QS::usr_dict(int, const char *)' (line 294, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 300 1 Info 1714: Member function 'QP::QS::getByte(void)' (line 300, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 300 1 Warning 1526: Member function 'QP::QS::getByte(void)' (line 300, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 303 1 Info 1714: Member function 'QP::QS::getBlock(unsigned short *)' (line 303, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 303 1 Warning 1526: Member function 'QP::QS::getBlock(unsigned short *)' (line 303, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 308 1 Info 1714: Member function 'QP::QS::onStartup(const void *)' (line 308, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 308 1 Warning 1526: Member function 'QP::QS::onStartup(const void *)' (line 308, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 311 1 Info 1714: Member function 'QP::QS::onCleanup(void)' (line 311, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 311 1 Warning 1526: Member function 'QP::QS::onCleanup(void)' (line 311, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 314 1 Info 1714: Member function 'QP::QS::onFlush(void)' (line 314, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 314 1 Warning 1526: Member function 'QP::QS::onFlush(void)' (line 314, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 317 1 Info 1714: Member function 'QP::QS::onGetTime(void)' (line 317, file D:\qp\qpcpp\include\qs.h) not referenced [MISRA C++ Rule 0-1-10]
+"D:\qp\qpcpp\include\qs.h" 317 1 Warning 1526: Member function 'QP::QS::onGetTime(void)' (line 317, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\include\qs.h" 325 1 Info 769: global enumeration constant 'QP::QS::QSType::I8_T' (line 325, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 326 1 Info 769: global enumeration constant 'QP::QS::QSType::U8_T' (line 326, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 327 1 Info 769: global enumeration constant 'QP::QS::QSType::I16_T' (line 327, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 328 1 Info 769: global enumeration constant 'QP::QS::QSType::U16_T' (line 328, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 329 1 Info 769: global enumeration constant 'QP::QS::QSType::I32_T' (line 329, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 330 1 Info 769: global enumeration constant 'QP::QS::QSType::U32_T' (line 330, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 331 1 Info 769: global enumeration constant 'QP::QS::QSType::F32_T' (line 331, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 332 1 Info 769: global enumeration constant 'QP::QS::QSType::F64_T' (line 332, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 333 1 Info 769: global enumeration constant 'QP::QS::QSType::STR_T' (line 333, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 334 1 Info 769: global enumeration constant 'QP::QS::QSType::MEM_T' (line 334, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 335 1 Info 769: global enumeration constant 'QP::QS::QSType::SIG_T' (line 335, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 336 1 Info 769: global enumeration constant 'QP::QS::QSType::OBJ_T' (line 336, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 337 1 Info 769: global enumeration constant 'QP::QS::QSType::FUN_T' (line 337, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 338 1 Info 769: global enumeration constant 'QP::QS::QSType::I64_T' (line 338, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 339 1 Info 769: global enumeration constant 'QP::QS::QSType::U64_T' (line 339, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 340 1 Info 769: global enumeration constant 'QP::QS::QSType::U32_HEX_T' (line 340, file D:\qp\qpcpp\include\qs.h) not referenced
+"D:\qp\qpcpp\include\qs.h" 364 1 Warning 1527: static member 'QP::QS::priv_' (line 364, file D:\qp\qpcpp\include\qs.h) not defined
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h" 29 1 Info 769: global enumeration constant 'DPP::DPPSignals::MAX_PUB_SIG' (line 29, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h) not referenced
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h" 42 1 Warning 526: Symbol 'DPP::BSP_displayPaused(unsigned char)' (line 42, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h) not defined
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h" 43 1 Warning 526: Symbol 'DPP::BSP_displayPhilStat(unsigned char, const char *)' (line 43, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h) not defined
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h" 44 1 Warning 526: Symbol 'DPP::BSP_terminate(short)' (line 44, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h) not defined
+"D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h" 47 1 Warning 526: Symbol 'DPP::BSP_random(void)' (line 47, file D:\qp\qpcpp\examples\arm-cm\dpp_ek-tm4c123gxl\bsp.h) not defined
+
+Count Type Number Text
+
+9 Warning 526 Symbol '___' (___) not defined
+2 Warning 527 Unreachable code at token '___'
+2 Warning 530 Symbol '___' (___) not initialized
+1 Warning 534 Ignoring return value of function '___' (compare with ___)
+2 Warning 537 Repeated include file '___'
+2 Warning 551 Symbol '___' (___) not accessed
+2 Warning 618 Storage class specified after a type
+90 Warning 1526 Member function '___' (___) not defined
+4 Warning 1527 static member '___' (___) not defined
+7 Info 740 Unusual pointer cast (incompatible indirect types)
+14 Info 754 local ___ member '___' (___) not referenced
+2 Info 758 global ___ '___' (___) not referenced
+88 Info 769 global enumeration constant '___' (___) not referenced
+103 Info 1714 Member function '___' (___) not referenced
+4 Info 1715 static member '___' (___) not referenced
+6 Info 1716 Virtual member function '___' (___) not referenced
+16 Note 929 cast from ___ to ___
+2 Note 963 Qualifier const or volatile ___ a type; use ___ to reverse the test
+1 Note 1914 Default constructor '___' (___) not referenced
+2 Note 1923 macro '___' could become const variable
+13 Note 1960 Violates MISRA C++ 2008 Required Rule ___, ___
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint/options.lnt b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/options.lnt
new file mode 100644
index 00000000..5e291cda
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint/options.lnt
@@ -0,0 +1,90 @@
+//////////////////////////////////////////////////////////////////////////////
+// Product: PC-Lint 9.x options for linting QP/C++ applications, GNU-ARM
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-03-19
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, www.state-machine.com.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//////////////////////////////////////////////////////////////////////////////
+
+// the location of the GNU-ARM includes (need to adjust!!!)
+-iC:\tools\gnu_arm-eabi\arm-eabi\include
+
+// the location of the QTools lint directory (need to adjust!!!)
+-iC:\tools\qtools\lint
+
+// the location of the QPC framework (need to adjust!!!)
+-i..\..\..\..\include // QP/C++ includes
+-i..\..\..\..\ports\arm-cm\qk\gnu // QP/C++ port includes
+-i..\..\..\..\3rd_partyCMSIS\Include // CMSIS directory
+
+-D__ARM7M__=1 // define for Cortex-M3/M4
+-D__ARM6M__=0 // define for Cortex-M0/M0+
+//co-iar-arm.lnt // IAR ARM compiler
+co-gnu-arm.lnt // GNU-ARM compiler
+au-misra-cpp.lnt // MISRA-C++:2008 rules
+au-ds.lnt // Dan Saks recommendations
+qpcpp.lnt // QP/C++ options
+//-strong(AXJ) // Strong type checking
+
+// library headers
+-wlib(1) // ignore warnings from library headers
++libclass(angle) // consider only <...> headers as library
+//-vf // print names of all header & source files
+
+
+-esym(1960, philoNum) // Non-private data member in a non-POD struct
+-efunc(946, *PHILO_ID) // 5-0-15,5-0-17,5-0-18 subtraction of pointers
+-efunc(947, *PHILO_ID) // 5-0-15,5-0-17,5-0-18 subtraction of pointers
+-efunc(1960,*PHILO_ID) // 5-0-6, conversion of integer to smaller type
+-efile(1924, *bsp.cpp) // 5-2-4, C-style cast
+
+-esym(1960, // 16-0-4, Function-like macro defined
+ QF_SET_BASEPRI,
+ QK_ISR_CONTEXT_)
+-esym(1923, // 16-2-2, could become const variable
+ QF_BASEPRI)
+-emacro(717, // do ... while(0);
+ QK_ISR_ENTRY,
+ QK_ISR_EXIT)
+-estring(435, // int constant '0xE000ED04U' has precision 32
+ 0xE000ED04U)
+-estring(435, // int constant '0x10000000U' has precision 29
+ 0x10000000U)
+
+// CMSIS-induced problems
+-e923 // 5-2-7, 5-2-8 cast from int to pointer
+-e1924 // C-style cast (for CMSIS)
+
+// not referenced symbols
+-e714 // symbol '...' not referenced
+-e755 // global macro '...' not referenced
+-e756 // global typedef '...' not referenced
+-e757 // global declarator '...' not referenced
+-e768 // struct member '...' not referenced
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/main.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/main.cpp
new file mode 100644
index 00000000..b6e28d91
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/main.cpp
@@ -0,0 +1,77 @@
+//****************************************************************************
+// DPP example
+// Last updated for version 5.4.0
+// Last updated on 2015-04-29
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, www.state-machine.com.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+//............................................................................
+int main() {
+ static QP::QEvt const *tableQueueSto[N_PHILO];
+ static QP::QEvt const *philoQueueSto[N_PHILO][N_PHILO];
+ static QP::QSubscrList subscrSto[DPP::MAX_PUB_SIG];
+
+ static QF_MPOOL_EL(DPP::TableEvt) smlPoolSto[2*N_PHILO];
+
+
+ QP::QF::init(); // initialize the framework and the underlying RT kernel
+
+ DPP::BSP_init(); // initialize the BSP
+
+ // object dictionaries...
+ QS_OBJ_DICTIONARY(smlPoolSto);
+ QS_OBJ_DICTIONARY(tableQueueSto);
+ QS_OBJ_DICTIONARY(philoQueueSto[0]);
+ QS_OBJ_DICTIONARY(philoQueueSto[1]);
+ QS_OBJ_DICTIONARY(philoQueueSto[2]);
+ QS_OBJ_DICTIONARY(philoQueueSto[3]);
+ QS_OBJ_DICTIONARY(philoQueueSto[4]);
+
+ QP::QF::psInit(subscrSto, Q_DIM(subscrSto)); // init publish-subscribe
+
+ // initialize event pools...
+ QP::QF::poolInit(smlPoolSto,
+ sizeof(smlPoolSto), sizeof(smlPoolSto[0]));
+
+ // start the active objects...
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
+ philoQueueSto[n], Q_DIM(philoQueueSto[n]),
+ (void *)0, 0U);
+ }
+ DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
+ tableQueueSto, Q_DIM(tableQueueSto),
+ (void *)0, 0U);
+
+ return QP::QF::run(); // run the QF application
+}
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp
new file mode 100644
index 00000000..0d575c10
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp
@@ -0,0 +1,303 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./philo.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::philo.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+class Philo : public QP::QMActive {
+private:
+ QP::QTimeEvt m_timeEvt;
+
+public:
+ Philo();
+
+protected:
+ static QP::QState initial(Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking (Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking_e(Philo * const me);
+ static QP::QState thinking_x(Philo * const me);
+ static QP::QMState const thinking_s;
+ static QP::QState hungry (Philo * const me, QP::QEvt const * const e);
+ static QP::QState hungry_e(Philo * const me);
+ static QP::QMState const hungry_s;
+ static QP::QState eating (Philo * const me, QP::QEvt const * const e);
+ static QP::QState eating_e(Philo * const me);
+ static QP::QState eating_x(Philo * const me);
+ static QP::QMState const eating_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+//${AOs::Philo::Philo} .......................................................
+Philo::Philo()
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+{}
+
+//${AOs::Philo::SM} ..........................................................
+QP::QState Philo::initial(Philo * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Philo::SM::initial}
+ static bool registered = false; // starts off with 0, per C-standard
+ (void)e; // suppress the compiler warning about unused parameter
+ if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+ }
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+ QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+ me->subscribe(EAT_SIG);
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Philo::SM::thinking} ................................................
+QP::QMState const Philo::thinking_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&thinking),
+ Q_ACTION_CAST(&thinking_e),
+ Q_ACTION_CAST(&thinking_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_e(Philo * const me) {
+ me->m_timeEvt.armX(think_time(), 0U);
+ return QM_ENTRY(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_x(Philo * const me) {
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::thinking::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &hungry_s,
+ {
+ Q_ACTION_CAST(&thinking_x), // exit
+ Q_ACTION_CAST(&hungry_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::thinking::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::hungry} ..................................................
+QP::QMState const Philo::hungry_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&hungry),
+ Q_ACTION_CAST(&hungry_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry_e(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+ pe->philoNum = PHILO_ID(me);
+ AO_Table->POST(pe, me);
+ return QM_ENTRY(&hungry_s);
+}
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::hungry::EAT}
+ case EAT_SIG: {
+ // ${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(Tabl~}
+ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &eating_s,
+ {
+ Q_ACTION_CAST(&eating_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ }
+ else {
+ status_ = QM_UNHANDLED();
+ }
+ break;
+ }
+ // ${AOs::Philo::SM::hungry::DONE}
+ case DONE_SIG: {
+ /* DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::eating} ..................................................
+QP::QMState const Philo::eating_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&eating),
+ Q_ACTION_CAST(&eating_e),
+ Q_ACTION_CAST(&eating_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_e(Philo * const me) {
+ me->m_timeEvt.armX(eat_time(), 0U);
+ return QM_ENTRY(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_x(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+ pe->philoNum = PHILO_ID(me);
+ QP::QF::PUBLISH(pe, me);
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::eating::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&eating_x), // exit
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::eating::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/README.txt
new file mode 100644
index 00000000..04785382
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/README.txt
@@ -0,0 +1,60 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::TM4C_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvoptx b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvoptx
new file mode 100644
index 00000000..e329e488
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvoptx
@@ -0,0 +1,983 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 4
+
+ 0
+ 1
+ 1
+ 1
+ 1
+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qmact.cpp
+ 0
+ 0
+
+
+ 3
+ 25
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qf_time.cpp
+ qf_time.cpp
+ 0
+ 0
+
+
+ 3
+ 26
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qk.cpp
+ qk.cpp
+ 0
+ 0
+
+
+ 3
+ 27
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qk_mutex.cpp
+ qk_mutex.cpp
+ 0
+ 0
+
+
+
+
+ QP_port
+ 0
+ 0
+ 0
+ 0
+
+ 4
+ 28
+ 2
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+ qk_port.s
+ 0
+ 0
+
+
+
+
+ QS
+ 0
+ 0
+ 0
+ 0
+
+ 5
+ 29
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 30
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_64bit.cpp
+ qs_64bit.cpp
+ 0
+ 0
+
+
+ 5
+ 31
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvprojx b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvprojx
new file mode 100644
index 00000000..f9a886f6
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/arm/dpp-qk.uvprojx
@@ -0,0 +1,1874 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040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x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -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1
+ ..\..\main.cpp
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+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cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+
+
+ QP_port
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp
new file mode 100644
index 00000000..19f9d833
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp
@@ -0,0 +1,490 @@
+///***************************************************************************
+// Product: DPP example, EK-TM4C123GXL board, preemptive QK kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "TM4C123GH6PM.h" // the device specific header (TI)
+#include "rom.h" // the built-in ROM functions (TI)
+#include "sysctl.h" // system control driver (TI)
+#include "gpio.h" // GPIO driver (TI)
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ GPIOA_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+#define LED_RED (1U << 1)
+#define LED_GREEN (1U << 3)
+#define LED_BLUE (1U << 2)
+
+#define BTN_SW1 (1U << 4)
+#define BTN_SW2 (1U << 0)
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+ static uint8_t l_SysTick_Handler;
+ static uint8_t l_GPIOPortA_IRQHandler;
+
+ #define UART_BAUD_RATE 115200U
+ #define UART_FR_TXFE 0x80U
+ #define UART_TXFIFO_DEPTH 16U
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~GPIOF->DATA_Bits[BTN_SW1 | BTN_SW2]; // read SW1 and SW2
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_SW1) != 0U) { // debounced SW1 state changed?
+ if ((buttons.depressed & BTN_SW1) != 0U) { // is SW1 depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+//............................................................................
+void GPIOPortA_IRQHandler(void); // prototype
+void GPIOPortA_IRQHandler(void) {
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_GPIOPortA_IRQHandler);
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // configure the FPU usage by choosing one of the options...
+#if 1
+ // OPTION 1:
+ // Use the automatic FPU state preservation and the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in more than one task or
+ // in any ISRs. This setting is the safest and recommended, but requires
+ // extra stack space and CPU cycles.
+ //
+ FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos);
+#else
+ // OPTION 2:
+ // Do NOT to use the automatic FPU state preservation and
+ // do NOT to use the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in ONE task only and not
+ // in any ISR. This setting is very efficient, but if more than one task
+ // (or ISR) start using the FPU, this can lead to corruption of the
+ // FPU registers. This option should be used with CAUTION.
+ //
+ FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos));
+#endif
+
+ // enable clock to the peripherals used by the application
+ SYSCTL->RCGC2 |= (1U << 5); // enable clock to GPIOF
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure the LEDs and push buttons
+ GPIOF->DIR |= (LED_RED | LED_GREEN | LED_BLUE); // set direction: output
+ GPIOF->DEN |= (LED_RED | LED_GREEN | LED_BLUE); // digital enable
+ GPIOF->DATA_Bits[LED_RED] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_GREEN] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the LED off
+
+ // configure the Buttons
+ GPIOF->DIR &= ~(BTN_SW1 | BTN_SW2); // set direction: input
+ ROM_GPIOPadConfigSet(GPIOF_BASE, (BTN_SW1 | BTN_SW2),
+ GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
+
+ BSP_randomSeed(1234U);
+
+ if (!QS_INIT((void *)0)) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_GPIOPortA_IRQHandler);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ GPIOF->DATA_Bits[LED_RED] = ((stat[0] == 'h') ? 0xFFU : 0U);
+ GPIOF->DATA_Bits[LED_GREEN] = ((stat[0] == 'e') ? 0xFFU : 0U);
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ GPIOF->DATA_Bits[LED_RED] = ((paused != 0U) ? 0xFFU : 0U);
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // The flating point code is to exercise the FPU
+ float volatile x = 3.1415926F;
+ x = x + 2.7182818F;
+
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(GPIOA_IRQn, DPP::GPIOA_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(GPIOA_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QK::onIdle(void) {
+ // toggle the User LED on and then off, see NOTE01
+ QF_INT_DISABLE();
+ GPIOF->DATA_Bits[LED_BLUE] = 0xFFU; // turn the Blue LED on
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the Blue LED off
+ QF_INT_ENABLE();
+
+#ifdef Q_SPY
+ if ((UART0->FR & UART_FR_TXFE) != 0U) { // TX done?
+ uint16_t fifo = UART_TXFIFO_DEPTH; // max bytes we can accept
+ uint8_t const *block;
+
+ QF_INT_DISABLE();
+ block = QS::getBlock(&fifo); // try to get next block to transmit
+ QF_INT_ENABLE();
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the FIFO
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ __WFI(); // Wait-For-Interrupt
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ uint32_t tmp;
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable the peripherals used by the UART0
+ SYSCTL->RCGC1 |= (1U << 0); // enable clock to UART0
+ SYSCTL->RCGC2 |= (1U << 0); // enable clock to GPIOA
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure UART0 pins for UART operation
+ tmp = (1U << 0) | (1U << 1);
+ GPIOA->DIR &= ~tmp;
+ GPIOA->AFSEL |= tmp;
+ GPIOA->DR2R |= tmp; // set 2mA drive, DR4R and DR8R are cleared
+ GPIOA->SLR &= ~tmp;
+ GPIOA->ODR &= ~tmp;
+ GPIOA->PUR &= ~tmp;
+ GPIOA->PDR &= ~tmp;
+ GPIOA->DEN |= tmp;
+
+ // configure the UART for the desired baud rate, 8-N-1 operation
+ tmp = (((SystemCoreClock * 8U) / UART_BAUD_RATE) + 1U) / 2U;
+ UART0->IBRD = tmp / 64U;
+ UART0->FBRD = tmp % 64U;
+ UART0->LCRH = 0x60U; // configure 8-N-1 operation
+ UART0->LCRH |= 0x10U;
+ UART0->CTL |= (1U << 0) | (1U << 8) | (1U << 9);
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t fifo = UART_TXFIFO_DEPTH; // Tx FIFO depth
+ uint8_t const *block;
+ QF_INT_DISABLE();
+ while ((block = getBlock(&fifo)) != static_cast(0)) {
+ QF_INT_ENABLE();
+ // busy-wait until TX FIFO empty
+ while ((UART0->FR & UART_FR_TXFE) == 0U) {
+ }
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the TX FIFO
+ }
+ fifo = UART_TXFIFO_DEPTH; // re-load the Tx FIFO depth
+ QF_INT_DISABLE();
+ }
+ QF_INT_ENABLE();
+}
+#endif // Q_SPY
+//----------------------------------------------------------------------------
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile
new file mode 100644
index 00000000..51e01d00
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile
@@ -0,0 +1,307 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on EK-TM4C123GXL, QK kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qk
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qk/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/ek-tm4c123gxl
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_TM4C123GH6PM.c \
+ startup_TM4C123GH6PM.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qk.cpp \
+ qk_mutex.cpp
+
+QP_ASMS := \
+ qk_port.s
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES := -D__FPU_PRESENT
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m4
+ARM_FPU := -mfpu=vfp
+FLOAT_ABI := -mfloat-abi=hard
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt
new file mode 100644
index 00000000..0e721706
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt
@@ -0,0 +1,71 @@
+About this Example
+==================
+This example can be built from the command prompt with the provided
+Makefile. The example can also be imported as a Makefile-based
+project into Eclipse-based IDEs.
+
+
+The Makefile
+============
+The provided Makefile should be easy to adapt for your own projects.
+It contains three build configurations: Debug (default), Release, and
+Spy.
+
+Also, the Makefile has been specifically designed to work as an external
+Makefile with the Eclipse CDT.
+
+The various build configurations are built as follows:
+
+make
+make CONF=rel
+make CONF=spy
+
+make clean
+make CONF=rel clean
+make CONF=spy clean
+
+***
+NOTE:
+The installation folder of the GNU-ARM toolset on YOUR machine needs
+to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM.
+As described in the comment for this symbol, the GNU-ARM toolset is taken
+from: http://gnutoolchains.com/arm-eabi
+
+It is highly recommened to use the same GNU-ARM distribution, especially
+for ARM Cortex-M4F projects, due to the support for the hardware FPU
+(float-abi=hard).
+***
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the GCC linker
+script (.ld file), which provides a template of the recommended GCC linker
+script for QP applications.
+
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\gcc\startup_TM4C123GH6PM.c
+
+The file startup_TM4C123GH6PM.c provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/dpp-qk.ld b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/dpp-qk.ld
new file mode 100644
index 00000000..03653c3e
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/dpp-qk.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for DPP on EK-TM4C123GXL, GNU-ARM
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-03-28
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of Tiva TM4C123GH6PM */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat
new file mode 100644
index 00000000..47eed016
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat
@@ -0,0 +1,34 @@
+::============================================================================
+:: Batch file to load the DPP program to the flash of EK-TM4C123GXL
+:: (equivalent to EK-LM4F120XL)
+::
+:: NOTE: requires the LMFlash programmer from Texas Instruments, see:
+:: http://www.ti.com/tool/LMFLASHPROGRAMMER
+::
+@echo off
+setlocal
+
+@echo Load the program to the flash of EK-TM4C123GXL
+@echo usage: flash
+@echo usage: flash rel
+@echo usage: flash spy
+
+::----------------------------------------------------------------------------
+:: NOTE: Adjust the following symbol to the location of the
+:: LMFlash utility on your machine
+::
+set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe
+
+:: set the build directory depending on the first parameter %1
+set BUILD_DIR=dbg
+if [%1] NEQ [] set BUILD_DIR=%1
+@echo on
+
+%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp-qk.bin
+
+@echo.
+@echo.
+@echo Reset the target to start running your program!
+
+@echo off
+endlocal
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/README.txt
new file mode 100644
index 00000000..7c0ab7d6
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/README.txt
@@ -0,0 +1,53 @@
+About this Example
+==================
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+IAR Project File
+----------------
+The IAR EWARM project file provided with this example uses relative paths
+to the QP/C++ framework location (includes, port, and libraries. These
+relative paths must be modified when the project is moved to different
+relative location.
+
+
+Stack Size and Heap Size
+------------------------
+In this project, the size of the C++ stack and heap are determined in
+the linker script blinky-qk.icf (see the next section).
+
+
+Linker Script
+-------------
+The IAR linker script provides a template of the recommended linker script
+for QP applications. This file needs to be customized to set the
+application-specific sizes of the Stack and Heap. This file can be edited
+from the IAR EWARM IDE via the Project Options/Linker settings.
+
+
+Startup Code
+------------
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp
new file mode 100644
index 00000000..34419db0
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp
@@ -0,0 +1,2975 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 40
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ ek-tm4c123gxl
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_mutex.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_pkg.h
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.s
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/qk/iar/dpp-qk_ek-lm3s811-lint/dpp-qk.eww b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww
similarity index 100%
rename from examples/arm-cm/qk/iar/dpp-qk_ek-lm3s811-lint/dpp-qk.eww
rename to examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww
diff --git a/examples/arm-cm/vanilla/iar/dpp_ek-tm4c123gxl/dpp.icf b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf
similarity index 100%
rename from examples/arm-cm/vanilla/iar/dpp_ek-tm4c123gxl/dpp.icf
rename to examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/README.txt
new file mode 100644
index 00000000..04785382
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/README.txt
@@ -0,0 +1,60 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::TM4C_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvoptx b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvoptx
new file mode 100644
index 00000000..b1b66023
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvoptx
@@ -0,0 +1,957 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 4
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 3
+
+
+
+
+
+
+
+
+
+
+ BIN\lmidk-agdi.dll
+
+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0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qv.cpp
+ qv.cpp
+ 0
+ 0
+
+
+
+
+ QP_port
+ 1
+ 0
+ 0
+ 0
+
+
+
+ QS
+ 1
+ 0
+ 0
+ 0
+
+ 5
+ 27
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 28
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_64bit.cpp
+ qs_64bit.cpp
+ 0
+ 0
+
+
+ 5
+ 29
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvprojx b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvprojx
new file mode 100644
index 00000000..0412fb42
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/arm/dpp-qv.uvprojx
@@ -0,0 +1,1838 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+ $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+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_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+ $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\rel\
+ dpp-qv
+ 1
+ 0
+ 0
+ 0
+ 0
+ .\rel\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\rel\dpp-qv.bin .\rel\dpp-qv.axf
+
+ 0
+ 0
+
+ 1
+
+
+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 1
+ 0x0
+ 0x40000
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x8000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 4
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ NDEBUG __FPU_PRESENT
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ TM4C123GH6PM
+ Texas Instruments
+ Keil.TM4C_DFP.1.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM))
+ 0
+ $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h
+
+
+
+
+
+
+
+
+
+ $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\spy\
+ dpp-qv
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\spy\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\spy\dpp-qv.bin .\spy\dpp-qv.axf
+
+ 0
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+ -MPU
+ DCM.DLL
+ -pCM4
+ SARMCM3.DLL
+ -MPU
+ TCM.DLL
+ -pCM4
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 16
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
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 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ Q_SPY __FPU_PRESENT
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Applicatioin
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ ek-tm4c123gxl
+
+
+ system_TM4C123GH6PM.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+ startup_TM4C123GH6PM.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s
+
+
+ gpio.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h
+
+
+ rom.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h
+
+
+ sysctl.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h
+
+
+ system_TM4C123GH6PM.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp
new file mode 100644
index 00000000..d795b216
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp
@@ -0,0 +1,489 @@
+///***************************************************************************
+// Product: DPP example, EK-TM4C123GXL board, cooperative QV kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "TM4C123GH6PM.h" // the device specific header (TI)
+#include "rom.h" // the built-in ROM functions (TI)
+#include "sysctl.h" // system control driver (TI)
+#include "gpio.h" // GPIO driver (TI)
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ GPIOA_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+#define LED_RED (1U << 1)
+#define LED_GREEN (1U << 3)
+#define LED_BLUE (1U << 2)
+
+#define BTN_SW1 (1U << 4)
+#define BTN_SW2 (1U << 0)
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+ static uint8_t l_SysTick_Handler;
+ static uint8_t l_GPIOPortA_IRQHandler;
+
+ #define UART_BAUD_RATE 115200U
+ #define UART_FR_TXFE 0x80U
+ #define UART_TXFIFO_DEPTH 16U
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~GPIOF->DATA_Bits[BTN_SW1 | BTN_SW2]; // read SW1 and SW2
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_SW1) != 0U) { // debounced SW1 state changed?
+ if ((buttons.depressed & BTN_SW1) != 0U) { // is SW1 depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+}
+//............................................................................
+void GPIOPortA_IRQHandler(void); // prototype
+void GPIOPortA_IRQHandler(void) {
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_GPIOPortA_IRQHandler);
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // configure the FPU usage by choosing one of the options...
+#if 1
+ // OPTION 1:
+ // Use the automatic FPU state preservation and the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in more than one task or
+ // in any ISRs. This setting is the safest and recommended, but requires
+ // extra stack space and CPU cycles.
+ //
+ FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos);
+#else
+ // OPTION 2:
+ // Do NOT to use the automatic FPU state preservation and
+ // do NOT to use the FPU lazy stacking.
+ //
+ // NOTE:
+ // Use the following setting when FPU is used in ONE task only and not
+ // in any ISR. This setting is very efficient, but if more than one task
+ // (or ISR) start using the FPU, this can lead to corruption of the
+ // FPU registers. This option should be used with CAUTION.
+ //
+ FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos));
+#endif
+
+ // enable clock to the peripherals used by the application
+ SYSCTL->RCGC2 |= (1U << 5); // enable clock to GPIOF
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure the LEDs and push buttons
+ GPIOF->DIR |= (LED_RED | LED_GREEN | LED_BLUE); // set direction: output
+ GPIOF->DEN |= (LED_RED | LED_GREEN | LED_BLUE); // digital enable
+ GPIOF->DATA_Bits[LED_RED] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_GREEN] = 0U; // turn the LED off
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the LED off
+
+ // configure the Buttons
+ GPIOF->DIR &= ~(BTN_SW1 | BTN_SW2); // set direction: input
+ ROM_GPIOPadConfigSet(GPIOF_BASE, (BTN_SW1 | BTN_SW2),
+ GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
+
+ BSP_randomSeed(1234U);
+
+ if (!QS_INIT((void *)0)) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_GPIOPortA_IRQHandler);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ GPIOF->DATA_Bits[LED_RED] = ((stat[0] == 'h') ? 0xFFU : 0U);
+ GPIOF->DATA_Bits[LED_GREEN] = ((stat[0] == 'e') ? 0xFFU : 0U);
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ GPIOF->DATA_Bits[LED_RED] = ((paused != 0U) ? 0xFFU : 0U);
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // The flating point code is to exercise the FPU
+ float volatile x = 3.1415926F;
+ x = x + 2.7182818F;
+
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(GPIOA_IRQn, DPP::GPIOA_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(GPIOA_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QV::onIdle(void) { // called with interrupts disabled, see NOTE01
+ // toggle the User LED on and then off, see NOTE02
+ GPIOF->DATA_Bits[LED_BLUE] = 0xFFU; // turn the Blue LED on
+ GPIOF->DATA_Bits[LED_BLUE] = 0U; // turn the Blue LED off
+
+#ifdef Q_SPY
+ QF_INT_ENABLE();
+ if ((UART0->FR & UART_FR_TXFE) != 0U) { // TX done?
+ uint16_t fifo = UART_TXFIFO_DEPTH; // max bytes we can accept
+ uint8_t const *block;
+
+ QF_INT_DISABLE();
+ block = QS::getBlock(&fifo); // try to get next block to transmit
+ QF_INT_ENABLE();
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the FIFO
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M MCU.
+ //
+ QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts */
+#else
+ QF_INT_ENABLE(); // just enable interrupts */
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ uint32_t tmp;
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable the peripherals used by the UART0
+ SYSCTL->RCGC1 |= (1U << 0); // enable clock to UART0
+ SYSCTL->RCGC2 |= (1U << 0); // enable clock to GPIOA
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure UART0 pins for UART operation
+ tmp = (1U << 0) | (1U << 1);
+ GPIOA->DIR &= ~tmp;
+ GPIOA->AFSEL |= tmp;
+ GPIOA->DR2R |= tmp; // set 2mA drive, DR4R and DR8R are cleared
+ GPIOA->SLR &= ~tmp;
+ GPIOA->ODR &= ~tmp;
+ GPIOA->PUR &= ~tmp;
+ GPIOA->PDR &= ~tmp;
+ GPIOA->DEN |= tmp;
+
+ // configure the UART for the desired baud rate, 8-N-1 operation
+ tmp = (((SystemCoreClock * 8U) / UART_BAUD_RATE) + 1U) / 2U;
+ UART0->IBRD = tmp / 64U;
+ UART0->FBRD = tmp % 64U;
+ UART0->LCRH = 0x60U; // configure 8-N-1 operation
+ UART0->LCRH |= 0x10U;
+ UART0->CTL |= (1U << 0) | (1U << 8) | (1U << 9);
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t fifo = UART_TXFIFO_DEPTH; // Tx FIFO depth
+ uint8_t const *block;
+ QF_INT_DISABLE();
+ while ((block = getBlock(&fifo)) != static_cast(0)) {
+ QF_INT_ENABLE();
+ // busy-wait until TX FIFO empty
+ while ((UART0->FR & UART_FR_TXFE) == 0U) {
+ }
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the TX FIFO
+ }
+ fifo = UART_TXFIFO_DEPTH; // re-load the Tx FIFO depth
+ QF_INT_DISABLE();
+ }
+ QF_INT_ENABLE();
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The QV:onIdle() callback is called with interrupts disabled, because the
+// determination of the idle condition might change by any interrupt posting
+// an event. QV::onIdle() must internally enable interrupts, ideally
+// atomically with putting the CPU to the power-saving mode.
+//
+// NOTE02:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile
new file mode 100644
index 00000000..cf1c1ceb
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile
@@ -0,0 +1,305 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on EK-TM4C123GXL, QV kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qv
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qv/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl \
+ $(QPCPP)/3rd_party/ek-tm4c123gxl/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/ek-tm4c123gxl
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_TM4C123GH6PM.c \
+ startup_TM4C123GH6PM.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qv.cpp
+
+QP_ASMS :=
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES := -D__FPU_PRESENT
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m4
+ARM_FPU := -mfpu=vfp
+FLOAT_ABI := -mfloat-abi=hard
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt
new file mode 100644
index 00000000..0e721706
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt
@@ -0,0 +1,71 @@
+About this Example
+==================
+This example can be built from the command prompt with the provided
+Makefile. The example can also be imported as a Makefile-based
+project into Eclipse-based IDEs.
+
+
+The Makefile
+============
+The provided Makefile should be easy to adapt for your own projects.
+It contains three build configurations: Debug (default), Release, and
+Spy.
+
+Also, the Makefile has been specifically designed to work as an external
+Makefile with the Eclipse CDT.
+
+The various build configurations are built as follows:
+
+make
+make CONF=rel
+make CONF=spy
+
+make clean
+make CONF=rel clean
+make CONF=spy clean
+
+***
+NOTE:
+The installation folder of the GNU-ARM toolset on YOUR machine needs
+to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM.
+As described in the comment for this symbol, the GNU-ARM toolset is taken
+from: http://gnutoolchains.com/arm-eabi
+
+It is highly recommened to use the same GNU-ARM distribution, especially
+for ARM Cortex-M4F projects, due to the support for the hardware FPU
+(float-abi=hard).
+***
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the GCC linker
+script (.ld file), which provides a template of the recommended GCC linker
+script for QP applications.
+
+
+Startup Code
+============
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\gcc\startup_TM4C123GH6PM.c
+
+The file startup_TM4C123GH6PM.c provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/dpp-qv.ld b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/dpp-qv.ld
new file mode 100644
index 00000000..03653c3e
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/dpp-qv.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for DPP on EK-TM4C123GXL, GNU-ARM
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-03-28
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of Tiva TM4C123GH6PM */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat
new file mode 100644
index 00000000..955235fd
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat
@@ -0,0 +1,34 @@
+::============================================================================
+:: Batch file to load the DPP program to the flash of EK-TM4C123GXL
+:: (equivalent to EK-LM4F120XL)
+::
+:: NOTE: requires the LMFlash programmer from Texas Instruments, see:
+:: http://www.ti.com/tool/LMFLASHPROGRAMMER
+::
+@echo off
+setlocal
+
+@echo Load the program to the flash of EK-TM4C123GXL
+@echo usage: flash
+@echo usage: flash rel
+@echo usage: flash spy
+
+::----------------------------------------------------------------------------
+:: NOTE: Adjust the following symbol to the location of the
+:: LMFlash utility on your machine
+::
+set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe
+
+:: set the build directory depending on the first parameter %1
+set BUILD_DIR=dbg
+if [%1] NEQ [] set BUILD_DIR=%1
+@echo on
+
+%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp-qv.bin
+
+@echo.
+@echo.
+@echo Reset the target to start running your program!
+
+@echo off
+endlocal
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/README.txt
new file mode 100644
index 00000000..3d1a614a
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/README.txt
@@ -0,0 +1,53 @@
+About this Example
+==================
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+IAR Project File
+----------------
+The IAR EWARM project file provided with this example uses relative paths
+to the QP/C framework location (includes, port, and libraries. These
+relative paths must be modified when the project is moved to different
+relative location.
+
+
+Stack Size and Heap Size
+------------------------
+In this project, the size of the C stack and heap are determined in
+the linker script blinky-qk.icf (see the next section).
+
+
+Linker Script
+-------------
+The IAR linker script provides a template of the recommended linker script
+for QP applications. This file needs to be customized to set the
+application-specific sizes of the Stack and Heap. This file can be edited
+from the IAR EWARM IDE via the Project Options/Linker settings.
+
+
+Startup Code
+------------
+The startup code for the TM4C123GH6PM MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+The file startup_TM4C123GH6PM.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp
new file mode 100644
index 00000000..c414b561
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp
@@ -0,0 +1,2966 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 40
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 7
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ ek-tm4c123gxl
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qv.cpp
+
+
+
+ QP_port
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww
new file mode 100644
index 00000000..8999816a
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\dpp-qv.ewp
+
+
+
+
+
diff --git a/examples/freertos/iar/blinky_ek-tm4c123gxl/blinky.icf b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf
similarity index 100%
rename from examples/freertos/iar/blinky_ek-tm4c123gxl/blinky.icf
rename to examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf
diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp
new file mode 100644
index 00000000..e5546e5b
--- /dev/null
+++ b/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp
@@ -0,0 +1,361 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./table.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::table.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+class Table : public QP::QMActive {
+private:
+ uint8_t m_fork[N_PHILO];
+ bool m_isHungry[N_PHILO];
+
+public:
+ Table();
+
+protected:
+ static QP::QState initial(Table * const me, QP::QEvt const * const e);
+ static QP::QState active (Table * const me, QP::QEvt const * const e);
+ static QP::QMState const active_s;
+ static QP::QState serving (Table * const me, QP::QEvt const * const e);
+ static QP::QState serving_e(Table * const me);
+ static QP::QMState const serving_s;
+ static QP::QState paused (Table * const me, QP::QEvt const * const e);
+ static QP::QState paused_e(Table * const me);
+ static QP::QState paused_x(Table * const me);
+ static QP::QMState const paused_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast(0);
+static uint8_t const USED = static_cast(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+//${AOs::Table::Table} .......................................................
+Table::Table()
+ : QMActive(Q_STATE_CAST(&Table::initial))
+{
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+ }
+}
+
+//${AOs::Table::SM} ..........................................................
+QP::QState Table::initial(Table * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Table::SM::initial}
+ (void)e; // suppress the compiler warning about unused parameter
+
+ QS_OBJ_DICTIONARY(&l_table);
+ QS_FUN_DICTIONARY(&QP::QHsm::top);
+ QS_FUN_DICTIONARY(&Table::initial);
+ QS_FUN_DICTIONARY(&Table::active);
+ QS_FUN_DICTIONARY(&Table::serving);
+ QS_FUN_DICTIONARY(&Table::paused);
+
+ QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+ QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+ QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+ me->subscribe(DONE_SIG);
+ me->subscribe(PAUSE_SIG);
+ me->subscribe(SERVE_SIG);
+ me->subscribe(TERMINATE_SIG);
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+ }
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Table::SM::active} ..................................................
+QP::QMState const Table::active_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&active),
+ Q_ACTION_CAST(0), // no entry action
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active}
+QP::QState Table::active(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::TERMINATE}
+ case TERMINATE_SIG: {
+ BSP_terminate(0);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ (void)me; /* avoid compiler warning in case 'me' is not used */
+ return status_;
+}
+//${AOs::Table::SM::active::serving} .........................................
+QP::QMState const Table::serving_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&serving),
+ Q_ACTION_CAST(&serving_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving_e(Table * const me) {
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+ }
+ return QM_ENTRY(&serving_s);
+}
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::serving::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, HUNGRY);
+ uint8_t m = LEFT(n);
+ // ${AOs::Table::SM::active::serving::HUNGRY::[bothfree]}
+ if ((me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = n;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(n, EATING);
+ status_ = QM_HANDLED();
+ }
+ // ${AOs::Table::SM::active::serving::HUNGRY::[else]}
+ else {
+ me->m_isHungry[n] = true;
+ status_ = QM_HANDLED();
+ }
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ // both forks of Phil[n] must be used
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ m = RIGHT(n); // check the right neighbor
+
+ if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ m = LEFT(n); // check the left neighbor
+ n = LEFT(m); // left fork of the left neighbor
+ if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::PAUSE}
+ case PAUSE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &paused_s,
+ {
+ Q_ACTION_CAST(&paused_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Table::SM::active::paused} ..........................................
+QP::QMState const Table::paused_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&paused),
+ Q_ACTION_CAST(&paused_e),
+ Q_ACTION_CAST(&paused_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_e(Table * const me) {
+ BSP_displayPaused(1U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_ENTRY(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_x(Table * const me) {
+ BSP_displayPaused(0U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_EXIT(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::paused::SERVE}
+ case SERVE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&paused_x), // exit
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // philo ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+ me->m_isHungry[n] = true;
+ BSP_displayPhilStat(n, HUNGRY);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ /* both forks of Phil[n] must be used */
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/README.txt b/examples/arm-cm/dpp_mbed-lpc1768/README.txt
new file mode 100644
index 00000000..5acb85d4
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/README.txt
@@ -0,0 +1,74 @@
+About this Example
+==================
+This directory contains the "Dining Philosophers Problem" (DPP) example
+running on the NXT mbed-LPC1768 board (ARM Cortex-M3). The following
+versions of the example are provided:
+
+dpp_mbed-lpc1768/
+ |
+ +-qk/ - preemptive QK kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+ |
+ +-qv/ - cooperative QV kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+
+***
+NOTE: The sub-directory "gnu" contains the Makefile for a generic GNU-ARM
+toolset (e.g., see http://gnutoolchains.com/arm-eabi/). Thus, this
+project provides a way of building mbed applications locally with
+free and unrestricted tools.
+***
+***
+NOTE: To build the code on Windows, you need to download and install
+the GNU make utility. The Qtools collection from Quantum Leaps contains
+GNU make and other UNIX-style utilites for Windows (native Windows,
+without the need to install CygWin).
+***
+
+Downloading the Code to mbed-LPC1768 Board
+==========================================
+After building the code with any of the supported toosets, you can simply
+copy the binary image to the mbed folder for execution.
+
+The whole build process and loading the image to the mbed board can
+be executed directly from the QM modeling (by means of external tools).
+The provided QM model (dpp.qm) comes pre-configured with tools
+setup to build (via make) and copy the code to the mbed board.
+
+
+Support Code for NXT mbed-LPC1768 Board
+=======================================
+The directory qpc\3rd_party\mbed-lpc1768 contains the CMSIS-compliant
+device code for the NXT LPC176xx MCUs (ARM Cortex-M3). Please see the
+README.txt file in this folder for more details.
+
+
+Note About the Board Support Package for NXT mbed-LPC1768
+=========================================================
+The provided Board Support Package (see bsp.c) is minimal for the
+application at hand and is completely **standalone**, meaning that
+it does NOT use the extensive mbed driver library. The use of the
+mbed-library is possible, but not necessary (but requires C++).
+
+
+QS Software Tracing Instrumentation
+===================================
+This example provides the "Spy" build configuration, which outputs the QS
+(Quantum Spy) software tracing data through UART0 of the mbed-LPC1768 board,
+which is connected to the virtual COM port of the mbed USB connection.
+
+The output is generated at 115200 baud rate.
+
+Here is an example invocation of the QSPY host application to receive
+the QS data from mbed-LPC1768 :
+
+qspy -cCOM20
+
+The actual COM port number might be different on your Windows machine.
+Please check the Device Manager to find the COM port number.
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/README.url b/examples/arm-cm/dpp_mbed-lpc1768/README.url
new file mode 100644
index 00000000..addde0c2
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/arm-cm_dpp_mbed-lpc1768.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/bsp.h b/examples/arm-cm/dpp_mbed-lpc1768/bsp.h
new file mode 100644
index 00000000..aefcc36e
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/bsp.h
@@ -0,0 +1,51 @@
+//****************************************************************************
+// Product: DPP example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef bsp_h
+#define bsp_h
+
+namespace DPP {
+
+uint32_t const BSP_TICKS_PER_SEC = static_cast(100);
+
+void BSP_init(void);
+void BSP_displayPaused(uint8_t const paused);
+void BSP_displayPhilStat(uint8_t const n, char_t const *stat);
+void BSP_terminate(int16_t const result);
+
+void BSP_randomSeed(uint32_t const seed); // random seed
+uint32_t BSP_random(void); // pseudo-random generator
+
+} // namespace DPP
+
+#endif // bsp_h
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.h b/examples/arm-cm/dpp_mbed-lpc1768/dpp.h
new file mode 100644
index 00000000..dcfc2baa
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.h
@@ -0,0 +1,62 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./dpp.h
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::dpp.h} ................................................................
+#ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+//${Events::TableEvt} ........................................................
+class TableEvt : public QP::QEvt {
+public:
+ uint8_t philoNum;
+};
+
+} // namespace DPP
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Philo[N_PHILO];
+
+} // namespace DPP
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Table;
+
+} // namespace DPP
+
+#endif // dpp_h
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm
new file mode 100644
index 00000000..18b1c153
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm
@@ -0,0 +1,445 @@
+
+
+ Dining Philosopher Problem example with MSM state machines
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+
+
+
+ static bool registered = false; // starts off with 0, per C-standard
+(void)e; // suppress the compiler warning about unused parameter
+if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+}
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+me->subscribe(EAT_SIG);
+
+
+
+
+
+ me->m_timeEvt.armX(think_time(), 0U);
+ (void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+pe->philoNum = PHILO_ID(me);
+AO_Table->POST(pe, me);
+
+
+ Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)
+
+
+
+
+
+
+
+
+
+ /* DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+ me->m_timeEvt.armX(eat_time(), 0U);
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+pe->philoNum = PHILO_ID(me);
+QP::QF::PUBLISH(pe, me);
+(void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Table::initial))
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+}
+
+
+
+ (void)e; // suppress the compiler warning about unused parameter
+
+QS_OBJ_DICTIONARY(&l_table);
+QS_FUN_DICTIONARY(&QP::QHsm::top);
+QS_FUN_DICTIONARY(&Table::initial);
+QS_FUN_DICTIONARY(&Table::active);
+QS_FUN_DICTIONARY(&Table::serving);
+QS_FUN_DICTIONARY(&Table::paused);
+
+QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+me->subscribe(DONE_SIG);
+me->subscribe(PAUSE_SIG);
+me->subscribe(SERVE_SIG);
+me->subscribe(TERMINATE_SIG);
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+}
+
+
+
+
+
+
+ BSP_terminate(0);
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+}
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, HUNGRY);
+uint8_t m = LEFT(n);
+
+ (me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)
+ me->m_fork[m] = USED;
+me->m_fork[n] = USED;
+TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+pe->philoNum = n;
+QP::QF::PUBLISH(pe, me);
+BSP_displayPhilStat(n, EATING);
+
+
+
+
+
+ else
+ me->m_isHungry[n] = true;
+
+
+
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+// both forks of Phil[n] must be used
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+m = RIGHT(n); // check the right neighbor
+
+if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+m = LEFT(n); // check the left neighbor
+n = LEFT(m); // left fork of the left neighbor
+if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BSP_displayPaused(1U);
+ BSP_displayPaused(0U);
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// philo ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+me->m_isHungry[n] = true;
+BSP_displayPhilStat(n, HUNGRY);
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+/* both forks of Phil[n] must be used */
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+$declare(Events::TableEvt)
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+$declare(AOs::AO_Philo[N_PHILO])
+
+$declare(AOs::AO_Table)
+
+#endif // dpp_h
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Philo)
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast<uint8_t>(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+$define(AOs::Philo)
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Table)
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast<uint8_t>((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast<uint8_t>((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast<uint8_t>(0);
+static uint8_t const USED = static_cast<uint8_t>(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+$define(AOs::Table)
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/main.cpp b/examples/arm-cm/dpp_mbed-lpc1768/main.cpp
new file mode 100644
index 00000000..b6e28d91
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/main.cpp
@@ -0,0 +1,77 @@
+//****************************************************************************
+// DPP example
+// Last updated for version 5.4.0
+// Last updated on 2015-04-29
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, www.state-machine.com.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+//............................................................................
+int main() {
+ static QP::QEvt const *tableQueueSto[N_PHILO];
+ static QP::QEvt const *philoQueueSto[N_PHILO][N_PHILO];
+ static QP::QSubscrList subscrSto[DPP::MAX_PUB_SIG];
+
+ static QF_MPOOL_EL(DPP::TableEvt) smlPoolSto[2*N_PHILO];
+
+
+ QP::QF::init(); // initialize the framework and the underlying RT kernel
+
+ DPP::BSP_init(); // initialize the BSP
+
+ // object dictionaries...
+ QS_OBJ_DICTIONARY(smlPoolSto);
+ QS_OBJ_DICTIONARY(tableQueueSto);
+ QS_OBJ_DICTIONARY(philoQueueSto[0]);
+ QS_OBJ_DICTIONARY(philoQueueSto[1]);
+ QS_OBJ_DICTIONARY(philoQueueSto[2]);
+ QS_OBJ_DICTIONARY(philoQueueSto[3]);
+ QS_OBJ_DICTIONARY(philoQueueSto[4]);
+
+ QP::QF::psInit(subscrSto, Q_DIM(subscrSto)); // init publish-subscribe
+
+ // initialize event pools...
+ QP::QF::poolInit(smlPoolSto,
+ sizeof(smlPoolSto), sizeof(smlPoolSto[0]));
+
+ // start the active objects...
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
+ philoQueueSto[n], Q_DIM(philoQueueSto[n]),
+ (void *)0, 0U);
+ }
+ DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
+ tableQueueSto, Q_DIM(tableQueueSto),
+ (void *)0, 0U);
+
+ return QP::QF::run(); // run the QF application
+}
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp b/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp
new file mode 100644
index 00000000..0d575c10
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp
@@ -0,0 +1,303 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./philo.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::philo.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+class Philo : public QP::QMActive {
+private:
+ QP::QTimeEvt m_timeEvt;
+
+public:
+ Philo();
+
+protected:
+ static QP::QState initial(Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking (Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking_e(Philo * const me);
+ static QP::QState thinking_x(Philo * const me);
+ static QP::QMState const thinking_s;
+ static QP::QState hungry (Philo * const me, QP::QEvt const * const e);
+ static QP::QState hungry_e(Philo * const me);
+ static QP::QMState const hungry_s;
+ static QP::QState eating (Philo * const me, QP::QEvt const * const e);
+ static QP::QState eating_e(Philo * const me);
+ static QP::QState eating_x(Philo * const me);
+ static QP::QMState const eating_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+//${AOs::Philo::Philo} .......................................................
+Philo::Philo()
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+{}
+
+//${AOs::Philo::SM} ..........................................................
+QP::QState Philo::initial(Philo * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Philo::SM::initial}
+ static bool registered = false; // starts off with 0, per C-standard
+ (void)e; // suppress the compiler warning about unused parameter
+ if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+ }
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+ QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+ me->subscribe(EAT_SIG);
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Philo::SM::thinking} ................................................
+QP::QMState const Philo::thinking_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&thinking),
+ Q_ACTION_CAST(&thinking_e),
+ Q_ACTION_CAST(&thinking_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_e(Philo * const me) {
+ me->m_timeEvt.armX(think_time(), 0U);
+ return QM_ENTRY(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_x(Philo * const me) {
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::thinking::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &hungry_s,
+ {
+ Q_ACTION_CAST(&thinking_x), // exit
+ Q_ACTION_CAST(&hungry_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::thinking::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::hungry} ..................................................
+QP::QMState const Philo::hungry_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&hungry),
+ Q_ACTION_CAST(&hungry_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry_e(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+ pe->philoNum = PHILO_ID(me);
+ AO_Table->POST(pe, me);
+ return QM_ENTRY(&hungry_s);
+}
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::hungry::EAT}
+ case EAT_SIG: {
+ // ${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(Tabl~}
+ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &eating_s,
+ {
+ Q_ACTION_CAST(&eating_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ }
+ else {
+ status_ = QM_UNHANDLED();
+ }
+ break;
+ }
+ // ${AOs::Philo::SM::hungry::DONE}
+ case DONE_SIG: {
+ /* DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::eating} ..................................................
+QP::QMState const Philo::eating_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&eating),
+ Q_ACTION_CAST(&eating_e),
+ Q_ACTION_CAST(&eating_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_e(Philo * const me) {
+ me->m_timeEvt.armX(eat_time(), 0U);
+ return QM_ENTRY(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_x(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+ pe->philoNum = PHILO_ID(me);
+ QP::QF::PUBLISH(pe, me);
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::eating::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&eating_x), // exit
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::eating::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/README.txt b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/README.txt
new file mode 100644
index 00000000..15eff3b2
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/README.txt
@@ -0,0 +1,34 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::LPC1700_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvoptx b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvoptx
new file mode 100644
index 00000000..4173a7dc
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvoptx
@@ -0,0 +1,1068 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0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
+
+ 8
+
+
+ 0
+ MCB1700 Schematics (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700-schematics.pdf
+
+
+ 1
+ User Manual (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700.chm
+
+
+ 2
+ MCB1700 Quick Start Guide (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700_quickstart.pdf
+
+
+ 3
+ MCB1700 Evaluation Board Web Page (MCB1700)
+ http://www.keil.com/mcb1700/
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+ BIN\UL2CM3.DLL
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ lmidk-agdi
+ -U0E10259B -O4622 -S4 -FO61
+
+
+ 0
+ UL2CM3
+ -O207 -S0 -C0 -FO7 -FN1 -FCFE0 -FD10000000 -FF0LPC_IAP_512 -FL080000 -FS00 -FP0($$Device:LPC1768$Flash\LPC_IAP_512.FLM)
+
+
+
+
+
+ 1
+ 2
+ 0x20000200
+ 0
+
+
+
+
+ 2
+ 0
+ 0x400
+ 0
+
+
+
+ 0
+
+
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
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+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qk_pkg.h
+ qk_pkg.h
+ 0
+ 0
+
+
+
+
+ QP_port
+ 1
+ 0
+ 0
+ 0
+
+ 4
+ 25
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+ qep_port.h
+ 0
+ 0
+
+
+ 4
+ 26
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+ qf_port.h
+ 0
+ 0
+
+
+ 4
+ 27
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+ qk_port.h
+ 0
+ 0
+
+
+ 4
+ 28
+ 2
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+ qk_port.s
+ 0
+ 0
+
+
+ 4
+ 29
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+ qs_port.h
+ 0
+ 0
+
+
+
+
+ QS
+ 1
+ 0
+ 0
+ 0
+
+ 5
+ 30
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 31
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+ 5
+ 32
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_pkg.h
+ qs_pkg.h
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvprojx b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvprojx
new file mode 100644
index 00000000..e10100df
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/arm/dpp-qk.uvprojx
@@ -0,0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..\..\..\3rd_party\mbed-lpc1768
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ LPC1768
+ NXP
+ Keil.LPC1700_DFP.2.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x80000) IRAM(0x10000000,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-qk.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ LPC1768
+ NXP
+ Keil.LPC1700_DFP.2.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x80000) IRAM(0x10000000,0x8000) IRAM2(0x2007C000,0x8000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD10000000 -FCFE0 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 -FP0($$Device:LPC1768$Flash\LPC_IAP_512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
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp
new file mode 100644
index 00000000..6c774f02
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp
@@ -0,0 +1,581 @@
+///***************************************************************************
+// Product: DPP example, NXP mbed-LPC1768 board, preemptive QK kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "LPC17xx.h" // CMSIS-compliant header file for the MCU used
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ EINT0_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LEDs available on the board
+#define LED_1 (1U << 18) // P1.18
+#define LED_2 (1U << 20) // P1.20
+#define LED_3 (1U << 21) // P1.21
+#define LED_4 (1U << 23) // P1.23
+
+// Push-Button wired externally to DIP8 (P0.6)
+#define BTN_EXT (1U << 6) // P0.6
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_EINT0_IRQHandler = 0U;
+
+ #define UART_BAUD_RATE 115200U
+ #define UART_FR_TXFE 0x80U
+ #define UART_TXFIFO_DEPTH 16U
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~LPC_GPIO0->FIOPIN; // read P0 with the state of the Buttons
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_EXT) != 0U) { // debounced BTN_EXT state changed?
+ if ((buttons.depressed & BTN_EXT) != 0U) { // is BTN_EXT depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+//............................................................................
+void EINT0_IRQHandler(void); // prototype
+void EINT0_IRQHandler(void) {
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_EINT0_IRQHandler);
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // turn the GPIO clock on
+ LPC_SC->PCONP |= (1U << 15);
+
+ // setup the GPIO pin functions for the LEDs...
+ LPC_PINCON->PINSEL3 &= ~(3U << 4); // LED_1: function P1.18 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 8); // LED_2: function P1.20 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 10); // LED_3: function P1.21 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 14); // LED_4: function P1.23 to GPIO
+
+ // Set GPIO-P1 LED pins to output
+ LPC_GPIO1->FIODIR |= (LED_1 | LED_2 | LED_3 | LED_4);
+
+
+ // setup the GPIO pin function for the Button...
+ LPC_PINCON->PINSEL0 &= ~(3U << 12); // function P0.6 to GPIO, pull-up
+
+ // Set GPIO-P0 Button pin as input
+ LPC_GPIO0->FIODIR &= ~BTN_EXT;
+
+ BSP_randomSeed(1234U);
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_EINT0_IRQHandler);
+ QS_USR_DICTIONARY(PHILO_STAT);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ if (stat[0] == 'h') {
+ LPC_GPIO1->FIOSET = LED_1; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_1; // turn LED off
+ }
+ if (stat[0] == 'e') {
+ LPC_GPIO1->FIOSET = LED_2; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_2; // turn LED off
+ }
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ if (paused != 0U) {
+ LPC_GPIO1->FIOSET = LED_3; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_3; // turn LED off
+ }
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(EINT0_IRQn, DPP::EINT0_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(EINT0_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QK::onIdle(void) {
+ // toggle the User LED on and then off, see NOTE01
+ QF_INT_DISABLE();
+ LPC_GPIO1->FIOSET = LED_4; // turn LED on
+ __NOP(); // a couple of NOPs to actually see the LED glow
+ __NOP();
+ __NOP();
+ __NOP();
+ LPC_GPIO1->FIOCLR = LED_4; // turn LED off
+ QF_INT_ENABLE();
+
+#ifdef Q_SPY
+ if ((LPC_UART0->LSR & 0x20U) != 0U) { // TX Holding Register empty?
+ uint16_t fifo = UART_TXFIFO_DEPTH; // max bytes we can accept
+ uint8_t const *block;
+
+ QF_INT_DISABLE();
+ block = QS::getBlock(&fifo); // try to get next block to transmit
+ QF_INT_ENABLE();
+
+ while (fifo-- != 0) { // any bytes in the block?
+ LPC_UART0->THR = *block++; // put into the FIFO
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ __WFI(); // Wait-For-Interrupt
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+static void UART0_setBaudrate(uint32_t baud); // helper function
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // setup the P0_2 UART0 TX pin
+ LPC_PINCON->PINSEL0 &= ~(3U << 4); /* clear P0_2 function */
+ LPC_PINCON->PINSEL0 |= (1U << 4); /* P0_2 to UART function (TX) */
+ LPC_PINCON->PINMODE0 &= ~(3U << 4); /* P0_2 pull-up register */
+
+ // setup the P0_3 UART0 RX pin
+ LPC_PINCON->PINSEL0 &= ~(3U << 6); /* clear P0_3 function */
+ LPC_PINCON->PINSEL0 |= (1U << 6); /* P0_3 to UART function (RX) */
+ LPC_PINCON->PINMODE0 &= ~(3U << 6); /* P0_3 pull-up register */
+
+ /* enable power to UART0 */
+ LPC_SC->PCONP |= (1U << 3);
+
+ /* enable FIFOs and default RX trigger level */
+ LPC_UART0->FCR =
+ (1U << 0) /* FIFO Enable - 0 = Disables, 1 = Enabled */
+ | (0U << 1) /* Rx Fifo Reset */
+ | (0U << 2) /* Tx Fifo Reset */
+ | (0U << 6); /* Rx irq trig: 0=1char, 1=4chars, 2=8chars, 3=14chars */
+
+ /* disable IRQs */
+ LPC_UART0->IER =
+ (0U << 0) /* Rx Data available IRQ disable */
+ | (0U << 1) /* Tx Fifo empty IRQ disable */
+ | (0U << 2); /* Rx Line Status IRQ disable */
+
+
+ // set default baud rate
+ UART0_setBaudrate(115200U);
+
+ // format 8-data-bits, 1-stop-bit, parity-none
+ LPC_UART0->LCR =
+ (3U << 0) /* 8-data-bits */
+ | (0U << 2) /* 1 stop-bit */
+ | (0U << 3) /* parity disable */
+ | (0U << 4); /* parity none */
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t b;
+
+ QF_INT_DISABLE();
+ while ((b = getByte()) != QS_EOD) { // while not End-Of-Data...
+ QF_INT_ENABLE();
+ while ((LPC_UART0->LSR & 0x20U) == 0U) { // while THR empty...
+ }
+ LPC_UART0->THR = (b & 0xFFU); // put into the DR register
+ }
+ QF_INT_ENABLE();
+}
+
+//............................................................................
+/*
+* Set the LPC UART0 barud-rate generator according to
+* Section 14.4.12 in LPC176x Manual (document UM10360)
+*/
+static void UART0_setBaudrate(uint32_t baud) {
+
+ /* First we check to see if the basic divide with no DivAddVal/MulVal
+ * ratio gives us an integer result. If it does, we set DivAddVal = 0,
+ * MulVal = 1. Otherwise, we search the valid ratio value range to find
+ * the closest match. This could be more elegant, using search methods
+ * and/or lookup tables, but the brute force method is not that much
+ * slower, and is more maintainable.
+ */
+ uint32_t PCLK = SystemCoreClock; /* divider /1 set below */
+ uint16_t DL = PCLK / (16U * baud);
+ uint8_t DivAddVal = 0U;
+ uint8_t MulVal = 1U;
+
+ /* set PCLK divider to 1 */
+ LPC_SC->PCLKSEL0 &= ~(0x3U << 6); /* clear divider bits */
+ LPC_SC->PCLKSEL0 |= (0x1U << 6); /* set divider to 1 */
+
+ if ((PCLK % (16U * baud)) != 0U) { /* non zero remainder? */
+ uint32_t err_best = baud;
+ bool found = false;
+ uint32_t b;
+ uint8_t mv;
+ for (mv = 1U; mv < 16U && !found; mv++) {
+ uint16_t dlv;
+ uint8_t dav;
+ for (dav = 0U; dav < mv; ++dav) {
+ /*
+ * baud = PCLK / (16 * dlv * (1 + (DivAdd / Mul))
+ * solving for dlv, we get
+ * dlv = mul * PCLK / (16 * baud * (divadd + mul))
+ * mul has 4 bits, PCLK has 27 so we have 1 bit headroom,
+ * which can be used for rounding for many values of mul
+ * and PCLK we have 2 or more bits of headroom which can
+ * be used to improve precision
+ * note: X / 32 doesn't round correctly.
+ * Instead, we use ((X / 16) + 1) / 2 for correct rounding
+ */
+ if ((mv*PCLK*2U) & 0x80000000U) { /* 1 bit headroom */
+ dlv = ((((2U*mv*PCLK) / (baud*(dav + mv)))/16U) + 1U)/2U;
+ }
+ else { /* 2 bits headroom, use more precision */
+ dlv = ((((4U*mv*PCLK) / (baud*(dav+mv)))/32U) + 1U)/2U;
+ }
+
+ /* datasheet says if DLL==DLM==0, then 1 is used instead */
+ if (dlv == 0U) {
+ dlv = 1U;
+ }
+ /* datasheet says if dav > 0 then DL must be >= 2 */
+ if ((dav > 0U) && (dlv < 2U)) {
+ dlv = 2U;
+ }
+ /* integer rearrangement of baud equation (with rounding) */
+ b = ((PCLK*mv / (dlv*(dav + mv)*8U)) + 1U)/2U;
+ b = (b >= baud) ? (b - baud) : (baud - b);
+
+ /* check to see how we did */
+ if (b < err_best) {
+ err_best = b;
+ DL = dlv;
+ MulVal = mv;
+ DivAddVal = dav;
+
+ if (b == baud) {
+ found = true;
+ break; /* break out of the inner for-loop */
+ }
+ }
+ }
+ }
+ }
+
+ // set LCR[DLAB] to enable writing to divider registers
+ LPC_UART0->LCR |= (1U << 7);
+
+ // set divider values
+ LPC_UART0->DLM = (DL >> 8) & 0xFFU;
+ LPC_UART0->DLL = (DL >> 0) & 0xFFU;
+ LPC_UART0->FDR = ((uint32_t)DivAddVal << 0)
+ | ((uint32_t)MulVal << 4);
+
+ // clear LCR[DLAB]
+ LPC_UART0->LCR &= ~(1U << 7);
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile
new file mode 100644
index 00000000..86ef7f2d
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile
@@ -0,0 +1,307 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on mbed-LPC1768, QK kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qk
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qk/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/mbed-lpc1768 \
+ $(QPCPP)/3rd_party/mbed-lpc1768/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/mbed-lpc1768
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_LPC17xx.c \
+ startup_LPC17xx.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qk.cpp \
+ qk_mutex.cpp
+
+QP_ASMS := \
+ qk_port.s
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m3
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/dpp-qk.ld b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/dpp-qk.ld
new file mode 100644
index 00000000..e45708ae
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/dpp-qk.ld
@@ -0,0 +1,138 @@
+/*****************************************************************************
+* Product: Linker script for for LPC1768, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of mbed-LPC1768 */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 512K
+ RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x7FDF
+
+ USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
+ ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp
new file mode 100644
index 00000000..8d123edc
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp
@@ -0,0 +1,2972 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 38
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_mutex.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_pkg.h
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.s
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+ mbed-lpc1768
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h
+
+
+
+
+
diff --git a/examples/arm-cm/qk/iar/dpp-qk_ek-tm4c123gxl/dpp-qk.eww b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww
similarity index 100%
rename from examples/arm-cm/qk/iar/dpp-qk_ek-tm4c123gxl/dpp-qk.eww
rename to examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf
new file mode 100644
index 00000000..2057443a
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf
@@ -0,0 +1,39 @@
+/*###ICF### Section handled by ICF editor, don't touch! ****/
+/*-Editor annotation file-*/
+/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
+/*-Specials-*/
+define symbol __ICFEDIT_intvec_start__ = 0x00000000;
+/*-Memory Regions-*/
+define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
+define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x10000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF;
+/*-Sizes-*/
+define symbol __ICFEDIT_size_cstack__ = 1024;
+define symbol __ICFEDIT_size_heap__ = 0;
+/**** End of ICF editor section. ###ICF###*/
+
+define symbol __CRP_start__ = 0x000002FC;
+define symbol __CRP_end__ = 0x000002FF;
+
+define symbol __RAM1_start__ = 0x2007C000;
+define symbol __RAM1_end__ = 0x20083FFF;
+
+define memory mem with size = 4G;
+define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__];
+define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
+define region CRP_region = mem:[from __CRP_start__ to __CRP_end__];
+define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__];
+
+define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
+define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+
+initialize by copy { readwrite };
+do not initialize { section .noinit };
+
+place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
+place in ROM_region { readonly };
+place in RAM_region { readwrite,
+ block CSTACK, block HEAP };
+place in CRP_region { section .crp };
+place in RAM1_region { section .sram };
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/README.txt b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/README.txt
new file mode 100644
index 00000000..15eff3b2
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/README.txt
@@ -0,0 +1,34 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::LPC1700_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvoptx b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvoptx
new file mode 100644
index 00000000..ec37a2e3
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvoptx
@@ -0,0 +1,1029 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 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1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 0
+
+ 8
+
+
+ 0
+ MCB1700 Schematics (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700-schematics.pdf
+
+
+ 1
+ User Manual (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700.chm
+
+
+ 2
+ MCB1700 Quick Start Guide (MCB1700)
+ C:\tools\Keil_v5\ARM\PACK\Keil\LPC1700_DFP\2.0.0\Documents\mcb1700_quickstart.pdf
+
+
+ 3
+ MCB1700 Evaluation Board Web Page (MCB1700)
+ http://www.keil.com/mcb1700/
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+ BIN\UL2CM3.DLL
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ lmidk-agdi
+ -U0E10259B -O4622 -S4 -FO61
+
+
+ 0
+ UL2CM3
+ -O207 -S0 -C0 -FO7 -FN1 -FCFE0 -FD10000000 -FF0LPC_IAP_512 -FL080000 -FS00 -FP0($$Device:LPC1768$Flash\LPC_IAP_512.FLM)
+
+
+
+
+
+ 1
+ 2
+ 0x20000200
+ 0
+
+
+
+
+ 2
+ 0
+ 0x400
+ 0
+
+
+
+ 0
+
+
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
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+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+ qep_port.h
+ 0
+ 0
+
+
+ 4
+ 24
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+ qf_port.h
+ 0
+ 0
+
+
+ 4
+ 25
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+ qv_port.h
+ 0
+ 0
+
+
+ 4
+ 26
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+ qs_port.h
+ 0
+ 0
+
+
+
+
+ QS
+ 1
+ 0
+ 0
+ 0
+
+ 5
+ 27
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 28
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+ 5
+ 29
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_pkg.h
+ qs_pkg.h
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvprojx b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvprojx
new file mode 100644
index 00000000..1ea1b4c0
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/arm/dpp-qv.uvprojx
@@ -0,0 +1,1844 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ LPC1768
+ NXP
+ Keil.LPC1700_DFP.2.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x80000) IRAM(0x10000000,0x8000) IRAM2(0x2007C000,0x8000) CPUTYPE("Cortex-M3") CLOCK(12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p.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ LPC1768
+ NXP
+ Keil.LPC1700_DFP.2.0.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x80000) IRAM(0x10000000,0x8000) IRAM2(0x2007C000,0x8000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD10000000 -FCFE0 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 -FP0($$Device:LPC1768$Flash\LPC_IAP_512.FLM))
+ 0
+ $$Device:LPC1768$Device\Include\LPC17xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:LPC1768$SVD\LPC176x5x.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\rel\
+ dpp-qv
+ 1
+ 0
+ 0
+ 0
+ 0
+ .\rel\
+ 1
+ 0
+ 0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0x0
+
+
+ 0
+ 0x10000000
+ 0x8000
+
+
+ 1
+ 0x0
+ 0x80000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x80000
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x10000000
+ 0x8000
+
+
+ 0
+ 0x2007c000
+ 0x8000
+
+
+
+
+
+ 0
+ 4
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ NDEBUG __FPU_PRESENT
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
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 0x2007c000
+ 0x8000
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ Q_SPY __FPU_PRESENT
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ mbed-lpc1768
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\..\..\..\3rd_party\mbed-lpc1768\arm\startup_LPC17xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp
new file mode 100644
index 00000000..645ff3d3
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp
@@ -0,0 +1,581 @@
+///***************************************************************************
+// Product: DPP example, NXP mbed-LPC1768 board, coopearative QV kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "LPC17xx.h" // CMSIS-compliant header file for the MCU used
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ EINT0_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LEDs available on the board
+#define LED_1 (1U << 18) // P1.18
+#define LED_2 (1U << 20) // P1.20
+#define LED_3 (1U << 21) // P1.21
+#define LED_4 (1U << 23) // P1.23
+
+// Push-Button wired externally to DIP8 (P0.6)
+#define BTN_EXT (1U << 6) // P0.6
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_EINT0_IRQHandler = 0U;
+
+ #define UART_BAUD_RATE 115200U
+ #define UART_FR_TXFE 0x80U
+ #define UART_TXFIFO_DEPTH 16U
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~LPC_GPIO0->FIOPIN; // read P0 with the state of the Buttons
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_EXT) != 0U) { // debounced BTN_EXT state changed?
+ if ((buttons.depressed & BTN_EXT) != 0U) { // is BTN_EXT depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+}
+//............................................................................
+void EINT0_IRQHandler(void); // prototype
+void EINT0_IRQHandler(void) {
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_EINT0_IRQHandler);
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // turn the GPIO clock on
+ LPC_SC->PCONP |= (1U << 15);
+
+ // setup the GPIO pin functions for the LEDs...
+ LPC_PINCON->PINSEL3 &= ~(3U << 4); // LED_1: function P1.18 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 8); // LED_2: function P1.20 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 10); // LED_3: function P1.21 to GPIO
+ LPC_PINCON->PINSEL3 &= ~(3U << 14); // LED_4: function P1.23 to GPIO
+
+ // Set GPIO-P1 LED pins to output
+ LPC_GPIO1->FIODIR |= (LED_1 | LED_2 | LED_3 | LED_4);
+
+
+ // setup the GPIO pin function for the Button...
+ LPC_PINCON->PINSEL0 &= ~(3U << 12); // function P0.6 to GPIO, pull-up
+
+ // Set GPIO-P0 Button pin as input
+ LPC_GPIO0->FIODIR &= ~BTN_EXT;
+
+ BSP_randomSeed(1234U);
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_EINT0_IRQHandler);
+ QS_USR_DICTIONARY(PHILO_STAT);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ if (stat[0] == 'h') {
+ LPC_GPIO1->FIOSET = LED_1; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_1; // turn LED off
+ }
+ if (stat[0] == 'e') {
+ LPC_GPIO1->FIOSET = LED_2; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_2; // turn LED off
+ }
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ if (paused != 0U) {
+ LPC_GPIO1->FIOSET = LED_3; // turn LED on
+ }
+ else {
+ LPC_GPIO1->FIOCLR = LED_3; // turn LED off
+ }
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(EINT0_IRQn, DPP::EINT0_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(EINT0_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QV::onIdle(void) { // called with interrupts disabled, see NOTE01
+ // toggle the User LED on and then off, see NOTE01
+ LPC_GPIO1->FIOSET = LED_4; // turn LED on
+ __NOP(); // a couple of NOPs to actually see the LED glow
+ __NOP();
+ __NOP();
+ __NOP();
+ LPC_GPIO1->FIOCLR = LED_4; // turn LED off
+
+#ifdef Q_SPY
+ QF_INT_ENABLE();
+ if ((LPC_UART0->LSR & 0x20U) != 0U) { // TX Holding Register empty?
+ uint16_t fifo = UART_TXFIFO_DEPTH; // max bytes we can accept
+ uint8_t const *block;
+
+ QF_INT_DISABLE();
+ block = QS::getBlock(&fifo); // try to get next block to transmit
+ QF_INT_ENABLE();
+
+ while (fifo-- != 0) { // any bytes in the block?
+ LPC_UART0->THR = *block++; // put into the FIFO
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M MCU.
+ //
+ QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
+#else
+ QF_INT_ENABLE(); // just enable interrupts
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+static void UART0_setBaudrate(uint32_t baud); // helper function
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // setup the P0_2 UART0 TX pin
+ LPC_PINCON->PINSEL0 &= ~(3U << 4); /* clear P0_2 function */
+ LPC_PINCON->PINSEL0 |= (1U << 4); /* P0_2 to UART function (TX) */
+ LPC_PINCON->PINMODE0 &= ~(3U << 4); /* P0_2 pull-up register */
+
+ // setup the P0_3 UART0 RX pin
+ LPC_PINCON->PINSEL0 &= ~(3U << 6); /* clear P0_3 function */
+ LPC_PINCON->PINSEL0 |= (1U << 6); /* P0_3 to UART function (RX) */
+ LPC_PINCON->PINMODE0 &= ~(3U << 6); /* P0_3 pull-up register */
+
+ /* enable power to UART0 */
+ LPC_SC->PCONP |= (1U << 3);
+
+ /* enable FIFOs and default RX trigger level */
+ LPC_UART0->FCR =
+ (1U << 0) /* FIFO Enable - 0 = Disables, 1 = Enabled */
+ | (0U << 1) /* Rx Fifo Reset */
+ | (0U << 2) /* Tx Fifo Reset */
+ | (0U << 6); /* Rx irq trig: 0=1char, 1=4chars, 2=8chars, 3=14chars */
+
+ /* disable IRQs */
+ LPC_UART0->IER =
+ (0U << 0) /* Rx Data available IRQ disable */
+ | (0U << 1) /* Tx Fifo empty IRQ disable */
+ | (0U << 2); /* Rx Line Status IRQ disable */
+
+
+ // set default baud rate
+ UART0_setBaudrate(115200U);
+
+ // format 8-data-bits, 1-stop-bit, parity-none
+ LPC_UART0->LCR =
+ (3U << 0) /* 8-data-bits */
+ | (0U << 2) /* 1 stop-bit */
+ | (0U << 3) /* parity disable */
+ | (0U << 4); /* parity none */
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t b;
+
+ QF_INT_DISABLE();
+ while ((b = getByte()) != QS_EOD) { // while not End-Of-Data...
+ QF_INT_ENABLE();
+ while ((LPC_UART0->LSR & 0x20U) == 0U) { // while THR empty...
+ }
+ LPC_UART0->THR = (b & 0xFFU); // put into the DR register
+ }
+ QF_INT_ENABLE();
+}
+
+//............................................................................
+/*
+* Set the LPC UART0 barud-rate generator according to
+* Section 14.4.12 in LPC176x Manual (document UM10360)
+*/
+static void UART0_setBaudrate(uint32_t baud) {
+
+ /* First we check to see if the basic divide with no DivAddVal/MulVal
+ * ratio gives us an integer result. If it does, we set DivAddVal = 0,
+ * MulVal = 1. Otherwise, we search the valid ratio value range to find
+ * the closest match. This could be more elegant, using search methods
+ * and/or lookup tables, but the brute force method is not that much
+ * slower, and is more maintainable.
+ */
+ uint32_t PCLK = SystemCoreClock; /* divider /1 set below */
+ uint16_t DL = PCLK / (16U * baud);
+ uint8_t DivAddVal = 0U;
+ uint8_t MulVal = 1U;
+
+ /* set PCLK divider to 1 */
+ LPC_SC->PCLKSEL0 &= ~(0x3U << 6); /* clear divider bits */
+ LPC_SC->PCLKSEL0 |= (0x1U << 6); /* set divider to 1 */
+
+ if ((PCLK % (16U * baud)) != 0U) { /* non zero remainder? */
+ uint32_t err_best = baud;
+ bool found = false;
+ uint32_t b;
+ uint8_t mv;
+ for (mv = 1U; mv < 16U && !found; mv++) {
+ uint16_t dlv;
+ uint8_t dav;
+ for (dav = 0U; dav < mv; ++dav) {
+ /*
+ * baud = PCLK / (16 * dlv * (1 + (DivAdd / Mul))
+ * solving for dlv, we get
+ * dlv = mul * PCLK / (16 * baud * (divadd + mul))
+ * mul has 4 bits, PCLK has 27 so we have 1 bit headroom,
+ * which can be used for rounding for many values of mul
+ * and PCLK we have 2 or more bits of headroom which can
+ * be used to improve precision
+ * note: X / 32 doesn't round correctly.
+ * Instead, we use ((X / 16) + 1) / 2 for correct rounding
+ */
+ if ((mv*PCLK*2U) & 0x80000000U) { /* 1 bit headroom */
+ dlv = ((((2U*mv*PCLK) / (baud*(dav + mv)))/16U) + 1U)/2U;
+ }
+ else { /* 2 bits headroom, use more precision */
+ dlv = ((((4U*mv*PCLK) / (baud*(dav+mv)))/32U) + 1U)/2U;
+ }
+
+ /* datasheet says if DLL==DLM==0, then 1 is used instead */
+ if (dlv == 0U) {
+ dlv = 1U;
+ }
+ /* datasheet says if dav > 0 then DL must be >= 2 */
+ if ((dav > 0U) && (dlv < 2U)) {
+ dlv = 2U;
+ }
+ /* integer rearrangement of baud equation (with rounding) */
+ b = ((PCLK*mv / (dlv*(dav + mv)*8U)) + 1U)/2U;
+ b = (b >= baud) ? (b - baud) : (baud - b);
+
+ /* check to see how we did */
+ if (b < err_best) {
+ err_best = b;
+ DL = dlv;
+ MulVal = mv;
+ DivAddVal = dav;
+
+ if (b == baud) {
+ found = true;
+ break; /* break out of the inner for-loop */
+ }
+ }
+ }
+ }
+ }
+
+ // set LCR[DLAB] to enable writing to divider registers
+ LPC_UART0->LCR |= (1U << 7);
+
+ // set divider values
+ LPC_UART0->DLM = (DL >> 8) & 0xFFU;
+ LPC_UART0->DLL = (DL >> 0) & 0xFFU;
+ LPC_UART0->FDR = ((uint32_t)DivAddVal << 0)
+ | ((uint32_t)MulVal << 4);
+
+ // clear LCR[DLAB]
+ LPC_UART0->LCR &= ~(1U << 7);
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The QV::onIdle() callback is called with interrupts disabled, because the
+// determination of the idle condition might change by any interrupt posting
+// an event. QV::onIdle() must internally enable interrupts, ideally
+// atomically with putting the CPU to the power-saving mode.
+//
+// NOTE02:
+// The User LED is used to visualize the idle loop activity. The brightness
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile
new file mode 100644
index 00000000..ba4d4a1c
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile
@@ -0,0 +1,305 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on mbed-LPC1768, QV kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qv
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qv/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/mbed-lpc1768 \
+ $(QPCPP)/3rd_party/mbed-lpc1768/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/mbed-lpc1768
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_LPC17xx.c \
+ startup_LPC17xx.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qv.cpp
+
+QP_ASMS :=
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m3
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/dpp-qv.ld b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/dpp-qv.ld
new file mode 100644
index 00000000..e45708ae
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/dpp-qv.ld
@@ -0,0 +1,138 @@
+/*****************************************************************************
+* Product: Linker script for for LPC1768, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of mbed-LPC1768 */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 512K
+ RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x7FDF
+
+ USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
+ ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp
new file mode 100644
index 00000000..090a4272
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp
@@ -0,0 +1,2963 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 38
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ mbed-lpc1768
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qv.cpp
+
+
+
+ QP_port
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww
new file mode 100644
index 00000000..8999816a
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\dpp-qv.ewp
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf
new file mode 100644
index 00000000..2057443a
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf
@@ -0,0 +1,39 @@
+/*###ICF### Section handled by ICF editor, don't touch! ****/
+/*-Editor annotation file-*/
+/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
+/*-Specials-*/
+define symbol __ICFEDIT_intvec_start__ = 0x00000000;
+/*-Memory Regions-*/
+define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
+define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x10000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF;
+/*-Sizes-*/
+define symbol __ICFEDIT_size_cstack__ = 1024;
+define symbol __ICFEDIT_size_heap__ = 0;
+/**** End of ICF editor section. ###ICF###*/
+
+define symbol __CRP_start__ = 0x000002FC;
+define symbol __CRP_end__ = 0x000002FF;
+
+define symbol __RAM1_start__ = 0x2007C000;
+define symbol __RAM1_end__ = 0x20083FFF;
+
+define memory mem with size = 4G;
+define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__];
+define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
+define region CRP_region = mem:[from __CRP_start__ to __CRP_end__];
+define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__];
+
+define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
+define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+
+initialize by copy { readwrite };
+do not initialize { section .noinit };
+
+place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
+place in ROM_region { readonly };
+place in RAM_region { readwrite,
+ block CSTACK, block HEAP };
+place in CRP_region { section .crp };
+place in RAM1_region { section .sram };
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_mbed-lpc1768/table.cpp b/examples/arm-cm/dpp_mbed-lpc1768/table.cpp
new file mode 100644
index 00000000..e5546e5b
--- /dev/null
+++ b/examples/arm-cm/dpp_mbed-lpc1768/table.cpp
@@ -0,0 +1,361 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./table.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::table.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+class Table : public QP::QMActive {
+private:
+ uint8_t m_fork[N_PHILO];
+ bool m_isHungry[N_PHILO];
+
+public:
+ Table();
+
+protected:
+ static QP::QState initial(Table * const me, QP::QEvt const * const e);
+ static QP::QState active (Table * const me, QP::QEvt const * const e);
+ static QP::QMState const active_s;
+ static QP::QState serving (Table * const me, QP::QEvt const * const e);
+ static QP::QState serving_e(Table * const me);
+ static QP::QMState const serving_s;
+ static QP::QState paused (Table * const me, QP::QEvt const * const e);
+ static QP::QState paused_e(Table * const me);
+ static QP::QState paused_x(Table * const me);
+ static QP::QMState const paused_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast(0);
+static uint8_t const USED = static_cast(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+//${AOs::Table::Table} .......................................................
+Table::Table()
+ : QMActive(Q_STATE_CAST(&Table::initial))
+{
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+ }
+}
+
+//${AOs::Table::SM} ..........................................................
+QP::QState Table::initial(Table * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Table::SM::initial}
+ (void)e; // suppress the compiler warning about unused parameter
+
+ QS_OBJ_DICTIONARY(&l_table);
+ QS_FUN_DICTIONARY(&QP::QHsm::top);
+ QS_FUN_DICTIONARY(&Table::initial);
+ QS_FUN_DICTIONARY(&Table::active);
+ QS_FUN_DICTIONARY(&Table::serving);
+ QS_FUN_DICTIONARY(&Table::paused);
+
+ QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+ QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+ QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+ me->subscribe(DONE_SIG);
+ me->subscribe(PAUSE_SIG);
+ me->subscribe(SERVE_SIG);
+ me->subscribe(TERMINATE_SIG);
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+ }
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Table::SM::active} ..................................................
+QP::QMState const Table::active_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&active),
+ Q_ACTION_CAST(0), // no entry action
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active}
+QP::QState Table::active(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::TERMINATE}
+ case TERMINATE_SIG: {
+ BSP_terminate(0);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ (void)me; /* avoid compiler warning in case 'me' is not used */
+ return status_;
+}
+//${AOs::Table::SM::active::serving} .........................................
+QP::QMState const Table::serving_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&serving),
+ Q_ACTION_CAST(&serving_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving_e(Table * const me) {
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+ }
+ return QM_ENTRY(&serving_s);
+}
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::serving::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, HUNGRY);
+ uint8_t m = LEFT(n);
+ // ${AOs::Table::SM::active::serving::HUNGRY::[bothfree]}
+ if ((me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = n;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(n, EATING);
+ status_ = QM_HANDLED();
+ }
+ // ${AOs::Table::SM::active::serving::HUNGRY::[else]}
+ else {
+ me->m_isHungry[n] = true;
+ status_ = QM_HANDLED();
+ }
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ // both forks of Phil[n] must be used
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ m = RIGHT(n); // check the right neighbor
+
+ if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ m = LEFT(n); // check the left neighbor
+ n = LEFT(m); // left fork of the left neighbor
+ if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::PAUSE}
+ case PAUSE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &paused_s,
+ {
+ Q_ACTION_CAST(&paused_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Table::SM::active::paused} ..........................................
+QP::QMState const Table::paused_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&paused),
+ Q_ACTION_CAST(&paused_e),
+ Q_ACTION_CAST(&paused_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_e(Table * const me) {
+ BSP_displayPaused(1U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_ENTRY(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_x(Table * const me) {
+ BSP_displayPaused(0U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_EXIT(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::paused::SERVE}
+ case SERVE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&paused_x), // exit
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // philo ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+ me->m_isHungry[n] = true;
+ BSP_displayPhilStat(n, HUNGRY);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ /* both forks of Phil[n] must be used */
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/README.txt b/examples/arm-cm/dpp_nucleo-l053r8/README.txt
new file mode 100644
index 00000000..c180484d
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/README.txt
@@ -0,0 +1,74 @@
+About this Example
+==================
+This directory contains the "Dining Philosophers Problem" (DPP) example
+running on the STM32 NUCLEO-L053R8 board (ARM Cortex-M0+). The following
+versions of the example are provided:
+
+dpp_nucleo-l053r8/
+ |
+ +-qk/ - preemptive QK kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+ |
+ +-qv/ - cooperative QV kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+
+***
+NOTE: The sub-directory "gnu" contains the Makefile for a generic GNU-ARM
+toolset (e.g., see http://gnutoolchains.com/arm-eabi/). Thus, this
+project provides a way of building mbed applications locally with
+free and unrestricted tools.
+***
+***
+NOTE: To build the code on Windows, you need to download and install
+the GNU make utility. The Qtools collection from Quantum Leaps contains
+GNU make and other UNIX-style utilites for Windows (native Windows,
+without the need to install CygWin).
+***
+
+Downloading the Code to STM32 NUCLEO-L053R8 Board
+=================================================
+After building the code with any of the supported toosets, you have
+two options of loading the code to the NUCLEO board.
+
+First, you can use the on-board ST-Link debugger to download the code
+from the toolset IDE (e.g., uVision or IAR EW).
+
+Alternatively, you can simply copy the binary image to the NUCLEO
+folder for execution.
+
+***
+NOTE:
+The whole build process and loading the image to the mbed board can
+be executed directly from the QM modeling (by means of external tools).
+The provided QM model (dpp.qm) comes pre-configured with tools
+setup to build (via make) and copy the code to the mbed board.
+***
+
+
+Support Code for STM32 NUCLEO-L053R8 Board
+------------------------------------------
+The directory qpc\3rd_party\nucleo-l053r8 contains the CMSIS-
+compliant device code for the STM32L0xx MCUs (ARM Cortex-M0+). Please see
+the README file in this folder for more details.
+
+
+QS Software Tracing Instrumentation
+===================================
+This example provides the "Spy" build configuration, which outputs the QS
+(Quantum Spy) software tracing data through UART2, which is connected to
+the virtual COM port of the ST-Link V2 USB debugger.
+
+The output is generated at 115200 baud rate.
+
+Here is an example invocation of the QSPY host application to receive
+the QS data from NUCLEO board:
+
+qspy -cCOM20
+
+The actual COM port number might be different on your Windows machine.
+Please check the Device Manager to find the COM port number.
+
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/README.url b/examples/arm-cm/dpp_nucleo-l053r8/README.url
new file mode 100644
index 00000000..b560efa2
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/arm-cm_dpp_nucleo-l053r8.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/bsp.h b/examples/arm-cm/dpp_nucleo-l053r8/bsp.h
new file mode 100644
index 00000000..aefcc36e
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/bsp.h
@@ -0,0 +1,51 @@
+//****************************************************************************
+// Product: DPP example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef bsp_h
+#define bsp_h
+
+namespace DPP {
+
+uint32_t const BSP_TICKS_PER_SEC = static_cast(100);
+
+void BSP_init(void);
+void BSP_displayPaused(uint8_t const paused);
+void BSP_displayPhilStat(uint8_t const n, char_t const *stat);
+void BSP_terminate(int16_t const result);
+
+void BSP_randomSeed(uint32_t const seed); // random seed
+uint32_t BSP_random(void); // pseudo-random generator
+
+} // namespace DPP
+
+#endif // bsp_h
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.h b/examples/arm-cm/dpp_nucleo-l053r8/dpp.h
new file mode 100644
index 00000000..dcfc2baa
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/dpp.h
@@ -0,0 +1,62 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./dpp.h
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::dpp.h} ................................................................
+#ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+//${Events::TableEvt} ........................................................
+class TableEvt : public QP::QEvt {
+public:
+ uint8_t philoNum;
+};
+
+} // namespace DPP
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Philo[N_PHILO];
+
+} // namespace DPP
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Table;
+
+} // namespace DPP
+
+#endif // dpp_h
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm b/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm
new file mode 100644
index 00000000..18b1c153
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm
@@ -0,0 +1,445 @@
+
+
+ Dining Philosopher Problem example with MSM state machines
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+
+
+
+ static bool registered = false; // starts off with 0, per C-standard
+(void)e; // suppress the compiler warning about unused parameter
+if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+}
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+me->subscribe(EAT_SIG);
+
+
+
+
+
+ me->m_timeEvt.armX(think_time(), 0U);
+ (void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+pe->philoNum = PHILO_ID(me);
+AO_Table->POST(pe, me);
+
+
+ Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)
+
+
+
+
+
+
+
+
+
+ /* DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+ me->m_timeEvt.armX(eat_time(), 0U);
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+pe->philoNum = PHILO_ID(me);
+QP::QF::PUBLISH(pe, me);
+(void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Table::initial))
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+}
+
+
+
+ (void)e; // suppress the compiler warning about unused parameter
+
+QS_OBJ_DICTIONARY(&l_table);
+QS_FUN_DICTIONARY(&QP::QHsm::top);
+QS_FUN_DICTIONARY(&Table::initial);
+QS_FUN_DICTIONARY(&Table::active);
+QS_FUN_DICTIONARY(&Table::serving);
+QS_FUN_DICTIONARY(&Table::paused);
+
+QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+me->subscribe(DONE_SIG);
+me->subscribe(PAUSE_SIG);
+me->subscribe(SERVE_SIG);
+me->subscribe(TERMINATE_SIG);
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+}
+
+
+
+
+
+
+ BSP_terminate(0);
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+}
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, HUNGRY);
+uint8_t m = LEFT(n);
+
+ (me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)
+ me->m_fork[m] = USED;
+me->m_fork[n] = USED;
+TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+pe->philoNum = n;
+QP::QF::PUBLISH(pe, me);
+BSP_displayPhilStat(n, EATING);
+
+
+
+
+
+ else
+ me->m_isHungry[n] = true;
+
+
+
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+// both forks of Phil[n] must be used
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+m = RIGHT(n); // check the right neighbor
+
+if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+m = LEFT(n); // check the left neighbor
+n = LEFT(m); // left fork of the left neighbor
+if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BSP_displayPaused(1U);
+ BSP_displayPaused(0U);
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// philo ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+me->m_isHungry[n] = true;
+BSP_displayPhilStat(n, HUNGRY);
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+/* both forks of Phil[n] must be used */
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+$declare(Events::TableEvt)
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+$declare(AOs::AO_Philo[N_PHILO])
+
+$declare(AOs::AO_Table)
+
+#endif // dpp_h
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Philo)
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast<uint8_t>(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+$define(AOs::Philo)
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Table)
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast<uint8_t>((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast<uint8_t>((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast<uint8_t>(0);
+static uint8_t const USED = static_cast<uint8_t>(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+$define(AOs::Table)
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/main.cpp b/examples/arm-cm/dpp_nucleo-l053r8/main.cpp
new file mode 100644
index 00000000..b6e28d91
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/main.cpp
@@ -0,0 +1,77 @@
+//****************************************************************************
+// DPP example
+// Last updated for version 5.4.0
+// Last updated on 2015-04-29
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, www.state-machine.com.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+//............................................................................
+int main() {
+ static QP::QEvt const *tableQueueSto[N_PHILO];
+ static QP::QEvt const *philoQueueSto[N_PHILO][N_PHILO];
+ static QP::QSubscrList subscrSto[DPP::MAX_PUB_SIG];
+
+ static QF_MPOOL_EL(DPP::TableEvt) smlPoolSto[2*N_PHILO];
+
+
+ QP::QF::init(); // initialize the framework and the underlying RT kernel
+
+ DPP::BSP_init(); // initialize the BSP
+
+ // object dictionaries...
+ QS_OBJ_DICTIONARY(smlPoolSto);
+ QS_OBJ_DICTIONARY(tableQueueSto);
+ QS_OBJ_DICTIONARY(philoQueueSto[0]);
+ QS_OBJ_DICTIONARY(philoQueueSto[1]);
+ QS_OBJ_DICTIONARY(philoQueueSto[2]);
+ QS_OBJ_DICTIONARY(philoQueueSto[3]);
+ QS_OBJ_DICTIONARY(philoQueueSto[4]);
+
+ QP::QF::psInit(subscrSto, Q_DIM(subscrSto)); // init publish-subscribe
+
+ // initialize event pools...
+ QP::QF::poolInit(smlPoolSto,
+ sizeof(smlPoolSto), sizeof(smlPoolSto[0]));
+
+ // start the active objects...
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
+ philoQueueSto[n], Q_DIM(philoQueueSto[n]),
+ (void *)0, 0U);
+ }
+ DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
+ tableQueueSto, Q_DIM(tableQueueSto),
+ (void *)0, 0U);
+
+ return QP::QF::run(); // run the QF application
+}
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp b/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp
new file mode 100644
index 00000000..0d575c10
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp
@@ -0,0 +1,303 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./philo.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::philo.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+class Philo : public QP::QMActive {
+private:
+ QP::QTimeEvt m_timeEvt;
+
+public:
+ Philo();
+
+protected:
+ static QP::QState initial(Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking (Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking_e(Philo * const me);
+ static QP::QState thinking_x(Philo * const me);
+ static QP::QMState const thinking_s;
+ static QP::QState hungry (Philo * const me, QP::QEvt const * const e);
+ static QP::QState hungry_e(Philo * const me);
+ static QP::QMState const hungry_s;
+ static QP::QState eating (Philo * const me, QP::QEvt const * const e);
+ static QP::QState eating_e(Philo * const me);
+ static QP::QState eating_x(Philo * const me);
+ static QP::QMState const eating_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+//${AOs::Philo::Philo} .......................................................
+Philo::Philo()
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+{}
+
+//${AOs::Philo::SM} ..........................................................
+QP::QState Philo::initial(Philo * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Philo::SM::initial}
+ static bool registered = false; // starts off with 0, per C-standard
+ (void)e; // suppress the compiler warning about unused parameter
+ if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+ }
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+ QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+ me->subscribe(EAT_SIG);
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Philo::SM::thinking} ................................................
+QP::QMState const Philo::thinking_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&thinking),
+ Q_ACTION_CAST(&thinking_e),
+ Q_ACTION_CAST(&thinking_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_e(Philo * const me) {
+ me->m_timeEvt.armX(think_time(), 0U);
+ return QM_ENTRY(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_x(Philo * const me) {
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::thinking::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &hungry_s,
+ {
+ Q_ACTION_CAST(&thinking_x), // exit
+ Q_ACTION_CAST(&hungry_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::thinking::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::hungry} ..................................................
+QP::QMState const Philo::hungry_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&hungry),
+ Q_ACTION_CAST(&hungry_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry_e(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+ pe->philoNum = PHILO_ID(me);
+ AO_Table->POST(pe, me);
+ return QM_ENTRY(&hungry_s);
+}
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::hungry::EAT}
+ case EAT_SIG: {
+ // ${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(Tabl~}
+ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &eating_s,
+ {
+ Q_ACTION_CAST(&eating_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ }
+ else {
+ status_ = QM_UNHANDLED();
+ }
+ break;
+ }
+ // ${AOs::Philo::SM::hungry::DONE}
+ case DONE_SIG: {
+ /* DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::eating} ..................................................
+QP::QMState const Philo::eating_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&eating),
+ Q_ACTION_CAST(&eating_e),
+ Q_ACTION_CAST(&eating_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_e(Philo * const me) {
+ me->m_timeEvt.armX(eat_time(), 0U);
+ return QM_ENTRY(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_x(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+ pe->philoNum = PHILO_ID(me);
+ QP::QF::PUBLISH(pe, me);
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::eating::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&eating_x), // exit
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::eating::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/README.txt b/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/README.txt
new file mode 100644
index 00000000..9c651b2b
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/README.txt
@@ -0,0 +1,34 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::STM32L0xx_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C++ framework location (includes, source code,
+and port). These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/dpp-qk.uvoptx b/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/dpp-qk.uvoptx
new file mode 100644
index 00000000..b1f85f07
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/dpp-qk.uvoptx
@@ -0,0 +1,1213 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 32000000
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 18
+
+
+ 0
+ User Manual (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\DM00118944.pdf
+
+
+ 1
+ Data Brief (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\DM00122138.pdf
+
+
+ 2
+ Schematics (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\MB1143.pdf
+
+
+ 3
+ User Manual (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 4
+ Overview (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 5
+ Getting started (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 6
+ Schematics (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 7
+ STM32 Nucleo board (NUCLEO-L053R8)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260001
+
+
+ 8
+ STM32L053-Discovery Web Page (STM32L053-Discovery)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260319
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066CFF484951775087074312 -I0 -O8431 -S3 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TI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Discovery\Documents\DM00118944.pdf
+
+
+ 1
+ Data Brief (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\DM00122138.pdf
+
+
+ 2
+ Schematics (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\MB1143.pdf
+
+
+ 3
+ User Manual (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 4
+ Overview (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 5
+ Getting started (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 6
+ Schematics (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 7
+ STM32 Nucleo board (NUCLEO-L053R8)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260001
+
+
+ 8
+ STM32L053-Discovery Web Page (STM32L053-Discovery)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260319
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066CFF484951775087074312 -I0 -O8431 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21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0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\DM00118944.pdf
+
+
+ 1
+ Data Brief (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\DM00122138.pdf
+
+
+ 2
+ Schematics (STM32L053-Discovery)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32L0xx_DFP\1.3.0\Boards\ST\STM32L053-Discovery\Documents\MB1143.pdf
+
+
+ 3
+ User Manual (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 4
+ Overview (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 5
+ Getting started (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 6
+ Schematics (NUCLEO-L053R8)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 7
+ STM32 Nucleo board (NUCLEO-L053R8)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260001
+
+
+ 8
+ STM32L053-Discovery Web Page (STM32L053-Discovery)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260319
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066CFF484951775087074312 -I0 -O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p-qk.uvprojx
new file mode 100644
index 00000000..c72a8cc5
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/arm/dpp-qk.uvprojx
@@ -0,0 +1,1949 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ STM32L053R8
+ STMicroelectronics
+ Keil.STM32L0xx_DFP.1.3.0
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x10000) IRAM(0x20000000,0x2000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_64 -FS08000000 -FL010000 -FP0($$Device:STM32L053R8$Flash\STM32L0xx_64.FLM))
+ 0
+ $$Device:STM32L053R8$Device\Include\stm32l0xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L053R8$SVD\STM32L053x.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\dbg\
+ dpp-qk
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\dbg\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\dbg\dpp-qk.bin .\dbg\dpp-qk.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+
+ DARMCM1.DLL
+ -pCM0+
+ SARMCM3.DLL
+
+ TARMCM1.DLL
+ -pCM0+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 16
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
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
+
+
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l053r8
+
+
+ stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h
+
+
+ stm32l053xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h
+
+
+ system_stm32l0xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c
+
+
+ system_stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h
+
+
+ startup_stm32l053xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\arm\startup_stm32l053xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ STM32L053R8
+ STMicroelectronics
+ Keil.STM32L0xx_DFP.1.3.0
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x10000) IRAM(0x20000000,0x2000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_64 -FS08000000 -FL010000 -FP0($$Device:STM32L053R8$Flash\STM32L0xx_64.FLM))
+ 0
+ $$Device:STM32L053R8$Device\Include\stm32l0xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L053R8$SVD\STM32L053x.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\rel\
+ dpp-qk
+ 1
+ 0
+ 0
+ 0
+ 0
+ .\rel\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\rel\dpp-qk.bin .\rel\dpp-qk.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+
+ DARMCM1.DLL
+ -pCM0+
+ SARMCM3.DLL
+
+ TARMCM1.DLL
+ -pCM0+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 16
+
+
+ 0
+ 1
+ 1
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 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ NDEBUG
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qk.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l053r8
+
+
+ stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h
+
+
+ stm32l053xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h
+
+
+ system_stm32l0xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c
+
+
+ system_stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h
+
+
+ startup_stm32l053xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\arm\startup_stm32l053xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ STM32L053R8
+ STMicroelectronics
+ Keil.STM32L0xx_DFP.1.3.0
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x10000) IRAM(0x20000000,0x2000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_64 -FS08000000 -FL010000 -FP0($$Device:STM32L053R8$Flash\STM32L0xx_64.FLM))
+ 0
+ $$Device:STM32L053R8$Device\Include\stm32l0xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L053R8$SVD\STM32L053x.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\spy\
+ dpp-qk
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\spy\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\spy\dpp-qk.bin .\spy\dpp-qk.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+
+ DARMCM1.DLL
+ -pCM0+
+ SARMC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
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x2000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ Q_SPY
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qk.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Source Code
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l053r8
+
+
+ stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h
+
+
+ stm32l053xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h
+
+
+ system_stm32l0xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c
+
+
+ system_stm32l0xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h
+
+
+ startup_stm32l053xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l053r8\arm\startup_stm32l053xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp
new file mode 100644
index 00000000..5fd36d1d
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp
@@ -0,0 +1,468 @@
+///***************************************************************************
+// Product: DPP example, STM32 NUCLEO-L053R8 board, preemptive QK kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "stm32l0xx.h" // CMSIS-compliant header file for the MCU used
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ EXTI0_1_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LED pins available on the board (just one user LED LD2--Green on PA.5)
+#define LED_LD2 (1U << 5)
+
+// Button pins available on the board (just one user Button B1 on PC.13)
+#define BTN_B1 (1U << 13)
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_EXTI0_1_IRQHandler = 0U;
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~GPIOC->IDR; // read Port C with the state of Button B1
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_B1) != 0U) { // debounced BTN_B1 state changed?
+ if ((buttons.depressed & BTN_B1) != 0U) { // is BTN_B1 depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+//............................................................................
+void EXTI0_1_IRQHandler(void); // prototype
+void EXTI0_1_IRQHandler(void) {
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_EXTI0_1_IRQHandler);
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // enable GPIOA clock port for the LED LD2
+ RCC->IOPENR |= (1U << 0);
+
+ // configure LED (PA.5) pin as push-pull output, no pull-up, pull-down
+ GPIOA->MODER &= ~((3U << 2*5));
+ GPIOA->MODER |= ((1U << 2*5));
+ GPIOA->OTYPER &= ~((1U << 5));
+ GPIOA->OSPEEDR &= ~((3U << 2*5));
+ GPIOA->OSPEEDR |= ((1U << 2*5));
+ GPIOA->PUPDR &= ~((3U << 2*5));
+
+ // enable GPIOC clock port for the Button B1
+ RCC->IOPENR |= (1U << 2);
+
+ // configure Button (PC.13) pins as input, no pull-up, pull-down
+ GPIOC->MODER &= ~(3U << 2*13);
+ GPIOC->OSPEEDR &= ~(3U << 2*13);
+ GPIOC->OSPEEDR |= (1U << 2*13);
+ GPIOC->PUPDR &= ~(3U << 2*13);
+
+ BSP_randomSeed(1234U);
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_EXTI0_1_IRQHandler);
+ QS_USR_DICTIONARY(PHILO_STAT);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ if (stat[0] == 'h') {
+ GPIOA->BSRR |= LED_LD2; // turn LED on
+ }
+ else {
+ GPIOA->BSRR |= (LED_LD2 << 16); // turn LED off
+ }
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ // not enough LEDs to implement this feature
+ if (paused != (uint8_t)0) {
+ //GPIOA->BSRR |= (LED_LD2); // turn LED[n] on
+ }
+ else {
+ //GPIOA->BSRR |= (LED_LD2 << 16); // turn LED[n] off
+ }
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(EXTI0_1_IRQn, DPP::EXTI0_1_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(EXTI0_1_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QK::onIdle(void) {
+ // toggle the User LED on and then off (not enough LEDs, see NOTE01)
+ QF_INT_DISABLE();
+ //GPIOA->BSRR |= (LED_LD2); // turn LED[n] on
+ //GPIOA->BSRR |= (LED_LD2 << 16); // turn LED[n] off
+ QF_INT_ENABLE();
+
+#ifdef Q_SPY
+ if ((USART2->ISR & 0x0080U) != 0) { // is TXE empty?
+ QF_INT_DISABLE();
+ uint16_t b = QS::getByte();
+ QF_INT_ENABLE();
+
+ if (b != QS_EOD) { // not End-Of-Data?
+ USART2->TDR = (b & 0xFFU); // put into the DR register
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ // !!!CAUTION!!!
+ // The WFI instruction stops the CPU clock, which unfortunately disables
+ // the JTAG port, so the ST-Link debugger can no longer connect to the
+ // board. For that reason, the call to __WFI() has to be used with CAUTION.
+ //
+ // NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
+ // reset the board, then connect with ST-Link Utilities and erase the part.
+ // The trick with BOOT(0) is it gets the part to run the System Loader
+ // instead of your broken code. When done disconnect BOOT0, and start over.
+ //
+ //__WFI(); Wait-For-Interrupt
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+/*..........................................................................*/
+#define __DIV(__PCLK, __BAUD) (((__PCLK / 4U) * 25U)/(__BAUD))
+#define __DIVMANT(__PCLK, __BAUD) (__DIV(__PCLK, __BAUD)/100U)
+#define __DIVFRAQ(__PCLK, __BAUD) \
+ (((__DIV(__PCLK, __BAUD) - (__DIVMANT(__PCLK, __BAUD) * 100U)) \
+ * 16U + 50U) / 100U)
+#define __USART_BRR(__PCLK, __BAUD) \
+ ((__DIVMANT(__PCLK, __BAUD) << 4)|(__DIVFRAQ(__PCLK, __BAUD) & 0x0FU))
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable peripheral clock for USART2
+ RCC->IOPENR |= ( 1ul << 0); // Enable GPIOA clock
+ RCC->APB1ENR |= ( 1ul << 17); // Enable USART#2 clock
+
+ // Configure PA3 to USART2_RX, PA2 to USART2_TX */
+ GPIOA->AFR[0] &= ~((15ul << 4* 3) | (15ul << 4* 2) );
+ GPIOA->AFR[0] |= (( 4ul << 4* 3) | ( 4ul << 4* 2) );
+ GPIOA->MODER &= ~(( 3ul << 2* 3) | ( 3ul << 2* 2) );
+ GPIOA->MODER |= (( 2ul << 2* 3) | ( 2ul << 2* 2) );
+
+ USART2->BRR = __USART_BRR(SystemCoreClock, 115200ul); // baud rate
+ USART2->CR3 = 0x0000; // no flow control
+ USART2->CR2 = 0x0000; // 1 stop bit
+ USART2->CR1 = ((1ul << 2) | // enable RX
+ (1ul << 3) | // enable TX
+ (0ul << 12) | // 8 data bits
+ (0ul << 28) | // 8 data bits
+ (1ul << 0) ); // enable USART
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t b;
+
+ QF_INT_DISABLE();
+ while ((b = getByte()) != QS_EOD) { // while not End-Of-Data...
+ QF_INT_ENABLE();
+ while ((USART2->ISR & 0x0080U) == 0U) { // while TXE not empty
+ }
+ USART2->TDR = (b & 0xFFU); // put into the DR register
+ }
+ QF_INT_ENABLE();
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile
new file mode 100644
index 00000000..86c7041a
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile
@@ -0,0 +1,307 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on STM32 NUCLEO-L053R8, QK kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-05-07
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qk
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qk/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/nucleo-l053r8 \
+ $(QPCPP)/3rd_party/nucleo-l053r8/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/nucleo-l053r8
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_stm32l0xx.c \
+ startup_stm32l053xx.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qk.cpp \
+ qk_mutex.cpp
+
+QP_ASMS := \
+ qk_port.s
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m0plus
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/dpp-qk.ld b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/dpp-qk.ld
new file mode 100644
index 00000000..f43f3ae1
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/dpp-qk.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for STM32L053R8, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of STM32L053R8 */
+ ROM (rx) : ORIGIN = 0x08000000, LENGTH = 64K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1000;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp
new file mode 100644
index 00000000..42a2dfa4
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp
@@ -0,0 +1,2990 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 35
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L053x8 ST STM32L053x8
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ nucleo-l053r8
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qv.cpp
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_64bit.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww
new file mode 100644
index 00000000..8999816a
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\dpp-qv.ewp
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf
new file mode 100644
index 00000000..51f3a2ec
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf
@@ -0,0 +1,37 @@
+/*###ICF### Section handled by ICF editor, don't touch! ****/
+/*-Editor annotation file-*/
+/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
+/*-Specials-*/
+define symbol __ICFEDIT_intvec_start__ = 0x08000000;
+/*-Memory Regions-*/
+define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
+define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF;
+/*-Sizes-*/
+define symbol __ICFEDIT_size_cstack__ = 1024;
+define symbol __ICFEDIT_size_heap__ = 0;
+/**** End of ICF editor section. ###ICF###*/
+
+define memory mem with size = 4G;
+define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
+define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
+
+define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
+define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+
+initialize by copy { readwrite };
+do not initialize { section .noinit };
+
+place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
+
+place in ROM_region { readonly };
+place in RAM_region { readwrite,
+ block CSTACK, block HEAP };
+
+define symbol __region_EEPROM_start__ = 0x08080000;
+define symbol __region_EEPROM_end__ = 0x080807FF;
+define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__];
+
+place in EEPROM_region { section .eeprom };
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_nucleo-l053r8/table.cpp b/examples/arm-cm/dpp_nucleo-l053r8/table.cpp
new file mode 100644
index 00000000..e5546e5b
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l053r8/table.cpp
@@ -0,0 +1,361 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./table.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::table.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+class Table : public QP::QMActive {
+private:
+ uint8_t m_fork[N_PHILO];
+ bool m_isHungry[N_PHILO];
+
+public:
+ Table();
+
+protected:
+ static QP::QState initial(Table * const me, QP::QEvt const * const e);
+ static QP::QState active (Table * const me, QP::QEvt const * const e);
+ static QP::QMState const active_s;
+ static QP::QState serving (Table * const me, QP::QEvt const * const e);
+ static QP::QState serving_e(Table * const me);
+ static QP::QMState const serving_s;
+ static QP::QState paused (Table * const me, QP::QEvt const * const e);
+ static QP::QState paused_e(Table * const me);
+ static QP::QState paused_x(Table * const me);
+ static QP::QMState const paused_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast(0);
+static uint8_t const USED = static_cast(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+namespace DPP {
+
+//${AOs::Table} ..............................................................
+//${AOs::Table::Table} .......................................................
+Table::Table()
+ : QMActive(Q_STATE_CAST(&Table::initial))
+{
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+ }
+}
+
+//${AOs::Table::SM} ..........................................................
+QP::QState Table::initial(Table * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Table::SM::initial}
+ (void)e; // suppress the compiler warning about unused parameter
+
+ QS_OBJ_DICTIONARY(&l_table);
+ QS_FUN_DICTIONARY(&QP::QHsm::top);
+ QS_FUN_DICTIONARY(&Table::initial);
+ QS_FUN_DICTIONARY(&Table::active);
+ QS_FUN_DICTIONARY(&Table::serving);
+ QS_FUN_DICTIONARY(&Table::paused);
+
+ QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+ QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+ QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+ QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+ me->subscribe(DONE_SIG);
+ me->subscribe(PAUSE_SIG);
+ me->subscribe(SERVE_SIG);
+ me->subscribe(TERMINATE_SIG);
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+ }
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Table::SM::active} ..................................................
+QP::QMState const Table::active_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&active),
+ Q_ACTION_CAST(0), // no entry action
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active}
+QP::QState Table::active(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::TERMINATE}
+ case TERMINATE_SIG: {
+ BSP_terminate(0);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ (void)me; /* avoid compiler warning in case 'me' is not used */
+ return status_;
+}
+//${AOs::Table::SM::active::serving} .........................................
+QP::QMState const Table::serving_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&serving),
+ Q_ACTION_CAST(&serving_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving_e(Table * const me) {
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+ }
+ return QM_ENTRY(&serving_s);
+}
+// ${AOs::Table::SM::active::serving}
+QP::QState Table::serving(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::serving::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, HUNGRY);
+ uint8_t m = LEFT(n);
+ // ${AOs::Table::SM::active::serving::HUNGRY::[bothfree]}
+ if ((me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = n;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(n, EATING);
+ status_ = QM_HANDLED();
+ }
+ // ${AOs::Table::SM::active::serving::HUNGRY::[else]}
+ else {
+ me->m_isHungry[n] = true;
+ status_ = QM_HANDLED();
+ }
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ // both forks of Phil[n] must be used
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ m = RIGHT(n); // check the right neighbor
+
+ if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ m = LEFT(n); // check the left neighbor
+ n = LEFT(m); // left fork of the left neighbor
+ if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+ }
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::EAT}
+ case EAT_SIG: {
+ Q_ERROR();
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::serving::PAUSE}
+ case PAUSE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &paused_s,
+ {
+ Q_ACTION_CAST(&paused_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Table::SM::active::paused} ..........................................
+QP::QMState const Table::paused_s = {
+ &Table::active_s, // superstate
+ Q_STATE_CAST(&paused),
+ Q_ACTION_CAST(&paused_e),
+ Q_ACTION_CAST(&paused_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_e(Table * const me) {
+ BSP_displayPaused(1U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_ENTRY(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused_x(Table * const me) {
+ BSP_displayPaused(0U);
+ (void)me; // avoid compiler warning in case 'me' is not used
+ return QM_EXIT(&paused_s);
+}
+// ${AOs::Table::SM::active::paused}
+QP::QState Table::paused(Table * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Table::SM::active::paused::SERVE}
+ case SERVE_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &serving_s,
+ {
+ Q_ACTION_CAST(&paused_x), // exit
+ Q_ACTION_CAST(&serving_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::HUNGRY}
+ case HUNGRY_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // philo ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+ me->m_isHungry[n] = true;
+ BSP_displayPhilStat(n, HUNGRY);
+ status_ = QM_HANDLED();
+ break;
+ }
+ // ${AOs::Table::SM::active::paused::DONE}
+ case DONE_SIG: {
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+ // phil ID must be in range and he must be not hungry
+ Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+ BSP_displayPhilStat(n, THINKING);
+ uint8_t m = LEFT(n);
+ /* both forks of Phil[n] must be used */
+ Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+ me->m_fork[m] = FREE;
+ me->m_fork[n] = FREE;
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_nucleo-l152re/README.txt b/examples/arm-cm/dpp_nucleo-l152re/README.txt
new file mode 100644
index 00000000..7f61d727
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/README.txt
@@ -0,0 +1,74 @@
+About this Example
+==================
+This directory contains the "Dining Philosophers Problem" (DPP) example
+running on the STM32 NUCLEO-L152RE board (ARM Cortex-M3). The following
+versions of the example are provided:
+
+dpp_nucleo-l152re/
+ |
+ +-qk/ - preemptive QK kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+ |
+ +-qv/ - cooperative QV kernel
+ | +-arm/ - ARM-KEIL toolset
+ | +-gnu/ - GNU-ARM toolset
+ | +-iar/ - IAR-ARM toolset
+
+***
+NOTE: The sub-directory "gnu" contains the Makefile for a generic GNU-ARM
+toolset (e.g., see http://gnutoolchains.com/arm-eabi/). Thus, this
+project provides a way of building mbed applications locally with
+free and unrestricted tools.
+***
+***
+NOTE: To build the code on Windows, you need to download and install
+the GNU make utility. The Qtools collection from Quantum Leaps contains
+GNU make and other UNIX-style utilites for Windows (native Windows,
+without the need to install CygWin).
+***
+
+Downloading the Code to STM32 NUCLEO-L152RE Board
+=================================================
+After building the code with any of the supported toosets, you have
+two options of loading the code to the NUCLEO board.
+
+First, you can use the on-board ST-Link debugger to download the code
+from the toolset IDE (e.g., uVision or IAR EW).
+
+Alternatively, you can simply copy the binary image to the NUCLEO
+folder for execution.
+
+***
+NOTE:
+The whole build process and loading the image to the mbed board can
+be executed directly from the QM modeling (by means of external tools).
+The provided QM model (dpp.qm) comes pre-configured with tools
+setup to build (via make) and copy the code to the mbed board.
+***
+
+
+Support Code for STM32 NUCLEO-L152RE Board
+------------------------------------------
+The directory qpc\3rd_party\nucleo-l152re contains the CMSIS-
+compliant device code for the STM32L0xx MCUs (ARM Cortex-M3). Please see
+the README file in this folder for more details.
+
+
+QS Software Tracing Instrumentation
+===================================
+This example provides the "Spy" build configuration, which outputs the QS
+(Quantum Spy) software tracing data through UART2, which is connected to
+the virtual COM port of the ST-Link V2 USB debugger.
+
+The output is generated at 115200 baud rate.
+
+Here is an example invocation of the QSPY host application to receive
+the QS data from NUCLEO board:
+
+qspy -cCOM20
+
+The actual COM port number might be different on your Windows machine.
+Please check the Device Manager to find the COM port number.
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/README.url b/examples/arm-cm/dpp_nucleo-l152re/README.url
new file mode 100644
index 00000000..1e6e8f1b
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/README.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.state-machine.com/qpcpp/arm-cm_dpp_nucleo-l152re.html
+IconFile=http://www.state-machine.com/qp.ico
diff --git a/examples/arm-cm/dpp_nucleo-l152re/bsp.h b/examples/arm-cm/dpp_nucleo-l152re/bsp.h
new file mode 100644
index 00000000..aefcc36e
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/bsp.h
@@ -0,0 +1,51 @@
+//****************************************************************************
+// Product: DPP example
+// Last Updated for Version: 5.4.0
+// Date of the Last Update: 2015-05-04
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web : http://www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#ifndef bsp_h
+#define bsp_h
+
+namespace DPP {
+
+uint32_t const BSP_TICKS_PER_SEC = static_cast(100);
+
+void BSP_init(void);
+void BSP_displayPaused(uint8_t const paused);
+void BSP_displayPhilStat(uint8_t const n, char_t const *stat);
+void BSP_terminate(int16_t const result);
+
+void BSP_randomSeed(uint32_t const seed); // random seed
+uint32_t BSP_random(void); // pseudo-random generator
+
+} // namespace DPP
+
+#endif // bsp_h
diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.h b/examples/arm-cm/dpp_nucleo-l152re/dpp.h
new file mode 100644
index 00000000..dcfc2baa
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/dpp.h
@@ -0,0 +1,62 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./dpp.h
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::dpp.h} ................................................................
+#ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+//${Events::TableEvt} ........................................................
+class TableEvt : public QP::QEvt {
+public:
+ uint8_t philoNum;
+};
+
+} // namespace DPP
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Philo[N_PHILO];
+
+} // namespace DPP
+
+namespace DPP {
+
+extern QP::QMActive * const AO_Table;
+
+} // namespace DPP
+
+#endif // dpp_h
diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.qm b/examples/arm-cm/dpp_nucleo-l152re/dpp.qm
new file mode 100644
index 00000000..18b1c153
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/dpp.qm
@@ -0,0 +1,445 @@
+
+
+ Dining Philosopher Problem example with MSM state machines
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+
+
+
+ static bool registered = false; // starts off with 0, per C-standard
+(void)e; // suppress the compiler warning about unused parameter
+if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+}
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+me->subscribe(EAT_SIG);
+
+
+
+
+
+ me->m_timeEvt.armX(think_time(), 0U);
+ (void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+pe->philoNum = PHILO_ID(me);
+AO_Table->POST(pe, me);
+
+
+ Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)
+
+
+
+
+
+
+
+
+
+ /* DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+ me->m_timeEvt.armX(eat_time(), 0U);
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+pe->philoNum = PHILO_ID(me);
+QP::QF::PUBLISH(pe, me);
+(void)me->m_timeEvt.disarm();
+
+
+
+
+
+
+ /* EAT or DONE must be for other Philos than this one */
+Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ : QMActive(Q_STATE_CAST(&Table::initial))
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ m_fork[n] = FREE;
+ m_isHungry[n] = false;
+}
+
+
+
+ (void)e; // suppress the compiler warning about unused parameter
+
+QS_OBJ_DICTIONARY(&l_table);
+QS_FUN_DICTIONARY(&QP::QHsm::top);
+QS_FUN_DICTIONARY(&Table::initial);
+QS_FUN_DICTIONARY(&Table::active);
+QS_FUN_DICTIONARY(&Table::serving);
+QS_FUN_DICTIONARY(&Table::paused);
+
+QS_SIG_DICTIONARY(DONE_SIG, (void *)0); // global signals
+QS_SIG_DICTIONARY(EAT_SIG, (void *)0);
+QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0);
+QS_SIG_DICTIONARY(SERVE_SIG, (void *)0);
+QS_SIG_DICTIONARY(TERMINATE_SIG, (void *)0);
+
+QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal just for Table
+
+me->subscribe(DONE_SIG);
+me->subscribe(PAUSE_SIG);
+me->subscribe(SERVE_SIG);
+me->subscribe(TERMINATE_SIG);
+
+for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ me->m_fork[n] = FREE;
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, THINKING);
+}
+
+
+
+
+
+
+ BSP_terminate(0);
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+ for (uint8_t n = 0U; n < N_PHILO; ++n) { // give permissions to eat...
+ if (me->m_isHungry[n]
+ && (me->m_fork[LEFT(n)] == FREE)
+ && (me->m_fork[n] == FREE))
+ {
+ me->m_fork[LEFT(n)] = USED;
+ me->m_fork[n] = USED;
+ TableEvt *te = Q_NEW(TableEvt, EAT_SIG);
+ te->philoNum = n;
+ QP::QF::PUBLISH(te, me);
+ me->m_isHungry[n] = false;
+ BSP_displayPhilStat(n, EATING);
+ }
+}
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, HUNGRY);
+uint8_t m = LEFT(n);
+
+ (me->m_fork[m] == FREE) && (me->m_fork[n] == FREE)
+ me->m_fork[m] = USED;
+me->m_fork[n] = USED;
+TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+pe->philoNum = n;
+QP::QF::PUBLISH(pe, me);
+BSP_displayPhilStat(n, EATING);
+
+
+
+
+
+ else
+ me->m_isHungry[n] = true;
+
+
+
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+// both forks of Phil[n] must be used
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+m = RIGHT(n); // check the right neighbor
+
+if (me->m_isHungry[m] && (me->m_fork[m] == FREE)) {
+ me->m_fork[n] = USED;
+ me->m_fork[m] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+m = LEFT(n); // check the left neighbor
+n = LEFT(m); // left fork of the left neighbor
+if (me->m_isHungry[m] && (me->m_fork[n] == FREE)) {
+ me->m_fork[m] = USED;
+ me->m_fork[n] = USED;
+ me->m_isHungry[m] = false;
+ TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
+ pe->philoNum = m;
+ QP::QF::PUBLISH(pe, me);
+ BSP_displayPhilStat(m, EATING);
+}
+
+
+
+
+
+ Q_ERROR();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BSP_displayPaused(1U);
+ BSP_displayPaused(0U);
+
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// philo ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+me->m_isHungry[n] = true;
+BSP_displayPhilStat(n, HUNGRY);
+
+
+
+
+
+ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum;
+// phil ID must be in range and he must be not hungry
+Q_ASSERT((n < N_PHILO) && (!me->m_isHungry[n]));
+
+BSP_displayPhilStat(n, THINKING);
+uint8_t m = LEFT(n);
+/* both forks of Phil[n] must be used */
+Q_ASSERT((me->m_fork[n] == USED) && (me->m_fork[m] == USED));
+
+me->m_fork[m] = FREE;
+me->m_fork[n] = FREE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #ifndef dpp_h
+#define dpp_h
+
+namespace DPP {
+
+enum DPPSignals {
+ EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
+ DONE_SIG, // published by Philosopher when done eating
+ PAUSE_SIG, // published by BSP to pause the application
+ SERVE_SIG, // published by BSP to serve re-start serving forks
+ TERMINATE_SIG, // published by BSP to terminate the application
+ MAX_PUB_SIG, // the last published signal
+
+ HUNGRY_SIG, // posted direclty to Table from hungry Philo
+ MAX_SIG // the last signal
+};
+
+} // namespace DPP
+
+$declare(Events::TableEvt)
+
+// number of philosophers
+#define N_PHILO ((uint8_t)5)
+
+$declare(AOs::AO_Philo[N_PHILO])
+
+$declare(AOs::AO_Table)
+
+#endif // dpp_h
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Philo)
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast<QP::QTimeEvtCtr>((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast<uint8_t>(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+$define(AOs::Philo)
+
+
+ #include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+$declare(AOs::Table)
+
+namespace DPP {
+
+// helper function to provide the RIGHT neighbour of a Philo[n]
+inline uint8_t RIGHT(uint8_t const n) {
+ return static_cast<uint8_t>((n + (N_PHILO - 1U)) % N_PHILO);
+}
+
+// helper function to provide the LEFT neighbour of a Philo[n]
+inline uint8_t LEFT(uint8_t const n) {
+ return static_cast<uint8_t>((n + 1U) % N_PHILO);
+}
+
+static uint8_t const FREE = static_cast<uint8_t>(0);
+static uint8_t const USED = static_cast<uint8_t>(1);
+
+static char_t const * const THINKING = &"thinking"[0];
+static char_t const * const HUNGRY = &"hungry "[0];
+static char_t const * const EATING = &"eating "[0];
+
+// Local objects -------------------------------------------------------------
+static Table l_table; // the single instance of the Table active object
+
+// Global-scope objects ------------------------------------------------------
+QP::QMActive * const AO_Table = &l_table; // "opaque" AO pointer
+
+} // namespace DPP
+
+//............................................................................
+$define(AOs::Table)
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/main.cpp b/examples/arm-cm/dpp_nucleo-l152re/main.cpp
new file mode 100644
index 00000000..b6e28d91
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/main.cpp
@@ -0,0 +1,77 @@
+//****************************************************************************
+// DPP example
+// Last updated for version 5.4.0
+// Last updated on 2015-04-29
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, www.state-machine.com.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+//............................................................................
+int main() {
+ static QP::QEvt const *tableQueueSto[N_PHILO];
+ static QP::QEvt const *philoQueueSto[N_PHILO][N_PHILO];
+ static QP::QSubscrList subscrSto[DPP::MAX_PUB_SIG];
+
+ static QF_MPOOL_EL(DPP::TableEvt) smlPoolSto[2*N_PHILO];
+
+
+ QP::QF::init(); // initialize the framework and the underlying RT kernel
+
+ DPP::BSP_init(); // initialize the BSP
+
+ // object dictionaries...
+ QS_OBJ_DICTIONARY(smlPoolSto);
+ QS_OBJ_DICTIONARY(tableQueueSto);
+ QS_OBJ_DICTIONARY(philoQueueSto[0]);
+ QS_OBJ_DICTIONARY(philoQueueSto[1]);
+ QS_OBJ_DICTIONARY(philoQueueSto[2]);
+ QS_OBJ_DICTIONARY(philoQueueSto[3]);
+ QS_OBJ_DICTIONARY(philoQueueSto[4]);
+
+ QP::QF::psInit(subscrSto, Q_DIM(subscrSto)); // init publish-subscribe
+
+ // initialize event pools...
+ QP::QF::poolInit(smlPoolSto,
+ sizeof(smlPoolSto), sizeof(smlPoolSto[0]));
+
+ // start the active objects...
+ for (uint8_t n = 0U; n < N_PHILO; ++n) {
+ DPP::AO_Philo[n]->start((uint8_t)(n + 1U),
+ philoQueueSto[n], Q_DIM(philoQueueSto[n]),
+ (void *)0, 0U);
+ }
+ DPP::AO_Table->start((uint8_t)(N_PHILO + 1U),
+ tableQueueSto, Q_DIM(tableQueueSto),
+ (void *)0, 0U);
+
+ return QP::QF::run(); // run the QF application
+}
diff --git a/examples/arm-cm/dpp_nucleo-l152re/philo.cpp b/examples/arm-cm/dpp_nucleo-l152re/philo.cpp
new file mode 100644
index 00000000..0d575c10
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/philo.cpp
@@ -0,0 +1,303 @@
+//****************************************************************************
+// Model: dpp.qm
+// File: ./philo.cpp
+//
+// This code has been generated by QM tool (see state-machine.com/qm).
+// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//****************************************************************************
+//${.::philo.cpp} ............................................................
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+Q_DEFINE_THIS_FILE
+
+// Active object class -------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+class Philo : public QP::QMActive {
+private:
+ QP::QTimeEvt m_timeEvt;
+
+public:
+ Philo();
+
+protected:
+ static QP::QState initial(Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking (Philo * const me, QP::QEvt const * const e);
+ static QP::QState thinking_e(Philo * const me);
+ static QP::QState thinking_x(Philo * const me);
+ static QP::QMState const thinking_s;
+ static QP::QState hungry (Philo * const me, QP::QEvt const * const e);
+ static QP::QState hungry_e(Philo * const me);
+ static QP::QMState const hungry_s;
+ static QP::QState eating (Philo * const me, QP::QEvt const * const e);
+ static QP::QState eating_e(Philo * const me);
+ static QP::QState eating_x(Philo * const me);
+ static QP::QMState const eating_s;
+};
+
+} // namespace DPP
+
+namespace DPP {
+
+// Local objects -------------------------------------------------------------
+static Philo l_philo[N_PHILO]; // storage for all Philos
+
+// helper function to provide a randomized think time for Philos
+inline QP::QTimeEvtCtr think_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + (BSP_TICKS_PER_SEC/2U));
+}
+
+// helper function to provide a randomized eat time for Philos
+inline QP::QTimeEvtCtr eat_time() {
+ return static_cast((BSP_random() % BSP_TICKS_PER_SEC)
+ + BSP_TICKS_PER_SEC);
+}
+
+// helper function to provide the ID of Philo "me"
+inline uint8_t PHILO_ID(Philo const * const me) {
+ return static_cast(me - l_philo);
+}
+
+enum InternalSignals { // internal signals
+ TIMEOUT_SIG = MAX_SIG
+};
+
+// Global objects ------------------------------------------------------------
+QP::QMActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO
+ &l_philo[0],
+ &l_philo[1],
+ &l_philo[2],
+ &l_philo[3],
+ &l_philo[4]
+};
+
+} // namespace DPP
+
+// Philo definition ----------------------------------------------------------
+namespace DPP {
+
+//${AOs::Philo} ..............................................................
+//${AOs::Philo::Philo} .......................................................
+Philo::Philo()
+ : QMActive(Q_STATE_CAST(&Philo::initial)),
+ m_timeEvt(this, TIMEOUT_SIG, 0U)
+{}
+
+//${AOs::Philo::SM} ..........................................................
+QP::QState Philo::initial(Philo * const me, QP::QEvt const * const e) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ // ${AOs::Philo::SM::initial}
+ static bool registered = false; // starts off with 0, per C-standard
+ (void)e; // suppress the compiler warning about unused parameter
+ if (!registered) {
+ registered = true;
+
+ QS_OBJ_DICTIONARY(&l_philo[0]);
+ QS_OBJ_DICTIONARY(&l_philo[0].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[1]);
+ QS_OBJ_DICTIONARY(&l_philo[1].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[2]);
+ QS_OBJ_DICTIONARY(&l_philo[2].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[3]);
+ QS_OBJ_DICTIONARY(&l_philo[3].m_timeEvt);
+ QS_OBJ_DICTIONARY(&l_philo[4]);
+ QS_OBJ_DICTIONARY(&l_philo[4].m_timeEvt);
+
+ QS_FUN_DICTIONARY(&Philo::initial);
+ QS_FUN_DICTIONARY(&Philo::thinking);
+ QS_FUN_DICTIONARY(&Philo::hungry);
+ QS_FUN_DICTIONARY(&Philo::eating);
+ }
+ QS_SIG_DICTIONARY(HUNGRY_SIG, me); // signal for each Philos
+ QS_SIG_DICTIONARY(TIMEOUT_SIG, me); // signal for each Philos
+
+ me->subscribe(EAT_SIG);
+ return QM_TRAN_INIT(&tatbl_);
+}
+//${AOs::Philo::SM::thinking} ................................................
+QP::QMState const Philo::thinking_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&thinking),
+ Q_ACTION_CAST(&thinking_e),
+ Q_ACTION_CAST(&thinking_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_e(Philo * const me) {
+ me->m_timeEvt.armX(think_time(), 0U);
+ return QM_ENTRY(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking_x(Philo * const me) {
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&thinking_s);
+}
+// ${AOs::Philo::SM::thinking}
+QP::QState Philo::thinking(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::thinking::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &hungry_s,
+ {
+ Q_ACTION_CAST(&thinking_x), // exit
+ Q_ACTION_CAST(&hungry_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::thinking::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::hungry} ..................................................
+QP::QMState const Philo::hungry_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&hungry),
+ Q_ACTION_CAST(&hungry_e),
+ Q_ACTION_CAST(0), // no exit action
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry_e(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
+ pe->philoNum = PHILO_ID(me);
+ AO_Table->POST(pe, me);
+ return QM_ENTRY(&hungry_s);
+}
+// ${AOs::Philo::SM::hungry}
+QP::QState Philo::hungry(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::hungry::EAT}
+ case EAT_SIG: {
+ // ${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(Tabl~}
+ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[2];
+ } const tatbl_ = { // transition-action table
+ &eating_s,
+ {
+ Q_ACTION_CAST(&eating_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ }
+ else {
+ status_ = QM_UNHANDLED();
+ }
+ break;
+ }
+ // ${AOs::Philo::SM::hungry::DONE}
+ case DONE_SIG: {
+ /* DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+//${AOs::Philo::SM::eating} ..................................................
+QP::QMState const Philo::eating_s = {
+ static_cast(0), // superstate (top)
+ Q_STATE_CAST(&eating),
+ Q_ACTION_CAST(&eating_e),
+ Q_ACTION_CAST(&eating_x),
+ Q_ACTION_CAST(0) // no intitial tran.
+};
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_e(Philo * const me) {
+ me->m_timeEvt.armX(eat_time(), 0U);
+ return QM_ENTRY(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating_x(Philo * const me) {
+ TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
+ pe->philoNum = PHILO_ID(me);
+ QP::QF::PUBLISH(pe, me);
+ (void)me->m_timeEvt.disarm();
+ return QM_EXIT(&eating_s);
+}
+// ${AOs::Philo::SM::eating}
+QP::QState Philo::eating(Philo * const me, QP::QEvt const * const e) {
+ QP::QState status_;
+ switch (e->sig) {
+ // ${AOs::Philo::SM::eating::TIMEOUT}
+ case TIMEOUT_SIG: {
+ static struct {
+ QP::QMState const *target;
+ QP::QActionHandler act[3];
+ } const tatbl_ = { // transition-action table
+ &thinking_s,
+ {
+ Q_ACTION_CAST(&eating_x), // exit
+ Q_ACTION_CAST(&thinking_e), // entry
+ Q_ACTION_CAST(0) // zero terminator
+ }
+ };
+ status_ = QM_TRAN(&tatbl_);
+ break;
+ }
+ // ${AOs::Philo::SM::eating::EAT, DONE}
+ case EAT_SIG: /* intentionally fall through */
+ case DONE_SIG: {
+ /* EAT or DONE must be for other Philos than this one */
+ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me));
+ status_ = QM_HANDLED();
+ break;
+ }
+ default: {
+ status_ = QM_SUPER();
+ break;
+ }
+ }
+ return status_;
+}
+
+} // namespace DPP
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/arm/README.txt b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/README.txt
new file mode 100644
index 00000000..ffd93b28
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/README.txt
@@ -0,0 +1,77 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::STM32L152_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numberical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+
+Startup Code
+============
+The startup code for the STM32L1xx MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+The file startup_stm32l1xx.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
+
+Adjusting the CPU Clock Speed
+=============================
+The current setting is to run at 2MHz from the MSI (internal oscillator),
+but the CPU clock speed can be modified by editing the file
+system_stm32l1xx.c. Ther file system_stm32l1xx_pll.c provides an example
+of clock setting using the PLL driven from the MSE.
+
+***
+NOTE:
+The NUCLEO boards have a wide range of possible clock selections, depending
+on the solder bridge configuration. Please see Chapter 5.7 "OSC clock" in
+the STM32 NUCLEO Boards User Manual (ST document UM1724) for more information.
+***
+
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvoptx b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvoptx
new file mode 100644
index 00000000..7e62611e
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvoptx
@@ -0,0 +1,1202 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 0
+ 1
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 18
+
+
+ 0
+ User Manual (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 1
+ Overview (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 2
+ Getting started (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 3
+ Schematics (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 4
+ STM32 Nucleo board (NUCLEO-L152RE)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066EFF495056805087184715 -I0 -O8398 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$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SP\1.3.0\Documents\MB1136.pdf
+
+
+ 4
+ STM32 Nucleo board (NUCLEO-L152RE)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066EFF495056805087184715 -I0 -O8430 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM)
+
+
+ 0
+ UL2CM3
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+
+
+
+
+ 0
+ 0
+ 214
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ ..\bsp.cpp
+
+
+
+
+
+
+ 1
+ 2
+ 0x20000200
+ 0
+
+
+
+
+ 2
+ 0
+ 0x400
+ 0
+
+
+
+ 0
+
+
+ 0
+ 0
+ 1
+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
+ 37
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_pkg.h
+ qs_pkg.h
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvprojx b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvprojx
new file mode 100644
index 00000000..a08b643f
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/arm/dpp-qk.uvprojx
@@ -0,0 +1,1964 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\dbg\
+ dpp-qk
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\dbg\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\dbg\dpp-qk.bin .\dbg\dpp-qk.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+ -REMAP -MPU
+ DCM.DLL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+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x14000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ HSE_VALUE=4000000
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=512 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\rel\
+ dpp-qk
+ 1
+ 0
+ 0
+ 0
+ 0
+ .\rel\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\rel\dpp-qk.bin .\rel\dpp-qk.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
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0
+ 0x0
+
+
+ 1
+ 0x8000000
+ 0x80000
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x14000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 4
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ NDEBUG
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=512 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qk.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\spy\
+ dpp-qk
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\spy\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 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x8000000
+ 0x80000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x8000000
+ 0x80000
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x14000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ Q_SPY
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qk\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qk.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qk.cpp
+ 1
+ ..\..\..\..\..\source\qk.cpp
+
+
+ qk_mutex.cpp
+ 1
+ ..\..\..\..\..\source\qk_mutex.cpp
+
+
+ qk_pkg.h
+ 5
+ ..\..\..\..\..\source\qk_pkg.h
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qf_port.h
+
+
+ qk_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.h
+
+
+ qk_port.s
+ 2
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qk_port.s
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qk\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.cpp
new file mode 100644
index 00000000..29eac587
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.cpp
@@ -0,0 +1,467 @@
+///***************************************************************************
+// Product: DPP example, STM32 NUCLEO-L152RE board, preemptive QK kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "stm32l1xx.h" // CMSIS-compliant header file for the MCU used
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ EXTI0_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LED pins available on the board (just one user LED LD2--Green on PA.5)
+#define LED_LD2 (1U << 5)
+
+// Button pins available on the board (just one user Button B1 on PC.13)
+#define BTN_B1 (1U << 13)
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_EXTI0_IRQHandler = 0U;
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~GPIOC->IDR; // read Port C with the state of Button B1
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_B1) != 0U) { // debounced BTN_B1 state changed?
+ if ((buttons.depressed & BTN_B1) != 0U) { // is BTN_B1 depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+//............................................................................
+void EXTI0_IRQHandler(void); // prototype
+void EXTI0_IRQHandler(void) {
+ QK_ISR_ENTRY(); // inform QK about entering an ISR
+
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_EXTI0_IRQHandler);
+
+ QK_ISR_EXIT(); // inform QK about exiting an ISR
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // enable GPIOA clock port for the LED LD2
+ RCC->AHBENR |= (1U << 0);
+
+ // configure LED (PA.5) pin as push-pull output, no pull-up, pull-down
+ GPIOA->MODER &= ~((3U << 2*5));
+ GPIOA->MODER |= ((1U << 2*5));
+ GPIOA->OTYPER &= ~((1U << 5));
+ GPIOA->OSPEEDR &= ~((3U << 2*5));
+ GPIOA->OSPEEDR |= ((1U << 2*5));
+ GPIOA->PUPDR &= ~((3U << 2*5));
+
+ // enable GPIOC clock port for the Button B1
+ RCC->AHBENR |= (1U << 2);
+
+ // configure Button (PC.13) pins as input, no pull-up, pull-down
+ GPIOC->MODER &= ~(3U << 2*13);
+ GPIOC->OSPEEDR &= ~(3U << 2*13);
+ GPIOC->OSPEEDR |= (1U << 2*13);
+ GPIOC->PUPDR &= ~(3U << 2*13);
+
+ BSP_randomSeed(1234U);
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_EXTI0_IRQHandler);
+ QS_USR_DICTIONARY(PHILO_STAT);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ if (stat[0] == 'h') {
+ GPIOA->BSRRL |= LED_LD2; // turn LED on
+ }
+ else {
+ GPIOA->BSRRH |= LED_LD2; // turn LED off
+ }
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ // not enough LEDs to implement this feature
+ if (paused != (uint8_t)0) {
+ //GPIOA->BSRRL |= LED_LD2; // turn LED on
+ }
+ else {
+ //GPIOA->BSRRH |= LED_LD2; // turn LED off
+ }
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(EXTI0_IRQn, DPP::EXTI0_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(EXTI0_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QK::onIdle(void) {
+ // toggle the User LED on and then off (not enough LEDs, see NOTE01)
+ QF_INT_DISABLE();
+ //GPIOA->BSRRL |= LED_LD2; // turn LED on
+ //GPIOA->BSRRH |= LED_LD2; // turn LED off
+ QF_INT_ENABLE();
+
+#ifdef Q_SPY
+ if ((USART2->SR & 0x0080U) != 0) { // is TXE empty?
+ QF_INT_DISABLE();
+ uint16_t b = QS::getByte();
+ QF_INT_ENABLE();
+
+ if (b != QS_EOD) { // not End-Of-Data?
+ USART2->DR = (b & 0xFFU); // put into the DR register
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ // !!!CAUTION!!!
+ // The WFI instruction stops the CPU clock, which unfortunately disables
+ // the JTAG port, so the ST-Link debugger can no longer connect to the
+ // board. For that reason, the call to __WFI() has to be used with CAUTION.
+ //
+ // NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
+ // reset the board, then connect with ST-Link Utilities and erase the part.
+ // The trick with BOOT(0) is it gets the part to run the System Loader
+ // instead of your broken code. When done disconnect BOOT0, and start over.
+ //
+ //__WFI(); Wait-For-Interrupt
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+/*..........................................................................*/
+#define __DIV(__PCLK, __BAUD) (((__PCLK / 4U) * 25U)/(__BAUD))
+#define __DIVMANT(__PCLK, __BAUD) (__DIV(__PCLK, __BAUD)/100U)
+#define __DIVFRAQ(__PCLK, __BAUD) \
+ (((__DIV(__PCLK, __BAUD) - (__DIVMANT(__PCLK, __BAUD) * 100U)) \
+ * 16U + 50U) / 100U)
+#define __USART_BRR(__PCLK, __BAUD) \
+ ((__DIVMANT(__PCLK, __BAUD) << 4)|(__DIVFRAQ(__PCLK, __BAUD) & 0x0FU))
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable peripheral clock for USART2
+ RCC->AHBENR |= (1U << 0); // Enable GPIOA clock
+ RCC->APB1ENR |= (1U << 17); // Enable USART#2 clock
+
+ // Configure PA3 to USART2_RX, PA2 to USART2_TX
+ GPIOA->AFR[0] &= ~((15U << 4*3) | (15U << 4*2));
+ GPIOA->AFR[0] |= (( 7U << 4*3) | ( 7U << 4*2));
+ GPIOA->MODER &= ~(( 3U << 2*3) | ( 3U << 2*2));
+ GPIOA->MODER |= (( 2U << 2*3) | ( 2U << 2*2));
+
+ USART2->BRR = __USART_BRR(SystemCoreClock, 115200U); // baud rate
+ USART2->CR3 = 0x0000U; // no flow control
+ USART2->CR2 = 0x0000U; // 1 stop bit
+ USART2->CR1 = ((1U << 2) | // enable RX
+ (1U << 3) | // enable TX
+ (0U << 12) | // 1 start bit, 8 data bits
+ (1U << 13)); // enable USART
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t b;
+
+ QF_INT_DISABLE();
+ while ((b = getByte()) != QS_EOD) { // while not End-Of-Data...
+ QF_INT_ENABLE();
+ while ((USART2->SR & 0x0080U) == 0U) { // while TXE not empty
+ }
+ USART2->DR = (b & 0xFFU); // put into the DR register
+ }
+ QF_INT_ENABLE();
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile
new file mode 100644
index 00000000..60546d3a
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile
@@ -0,0 +1,307 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on STM32 NUCLEO-L152RE, QK kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-05-07
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qk
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qk/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/nucleo-l152re \
+ $(QPCPP)/3rd_party/nucleo-l152re/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/nucleo-l152re
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_stm32l1xx.c \
+ startup_stm32l1xx.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qk.cpp \
+ qk_mutex.cpp
+
+QP_ASMS := \
+ qk_port.s
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m3
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/dpp-qk.ld b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/dpp-qk.ld
new file mode 100644
index 00000000..4f1214d9
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/dpp-qk.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for STM32L152RET6, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of STM32L152RET6 */
+ ROM (rx) : ORIGIN = 0x08000000, LENGTH = 512K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 80K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp
new file mode 100644
index 00000000..b074e393
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp
@@ -0,0 +1,2986 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 38
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
+
+
+
+ BILINK
+ 0
+
+
+
+ Coder
+ 0
+
+
+
+
+ Application
+
+ $PROJ_DIR$\..\bsp.cpp
+
+
+ $PROJ_DIR$\..\..\bsp.h
+
+
+ $PROJ_DIR$\..\..\dpp.h
+
+
+ $PROJ_DIR$\..\..\main.cpp
+
+
+ $PROJ_DIR$\..\..\philo.cpp
+
+
+ $PROJ_DIR$\..\..\table.cpp
+
+
+
+ nucleo-l152re
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_mutex.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_pkg.h
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_64bit.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww
new file mode 100644
index 00000000..b41c128d
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\dpp-qk.ewp
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf
new file mode 100644
index 00000000..233e1dbc
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf
@@ -0,0 +1,36 @@
+/*###ICF### Section handled by ICF editor, don't touch! ****/
+/*-Editor annotation file-*/
+/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
+/*-Specials-*/
+define symbol __ICFEDIT_intvec_start__ = 0x08000000;
+/*-Memory Regions-*/
+define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
+define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
+/*-Sizes-*/
+define symbol __ICFEDIT_size_cstack__ = 1024;
+define symbol __ICFEDIT_size_heap__ = 0;
+/**** End of ICF editor section. ###ICF###*/
+
+define memory mem with size = 4G;
+define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
+define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
+
+define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
+define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
+
+initialize by copy { readwrite };
+do not initialize { section .noinit };
+
+place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
+
+place in ROM_region { readonly };
+place in RAM_region { readwrite,
+ block CSTACK, block HEAP };
+
+define symbol __region_EEPROM_start__ = 0x08080000;
+define symbol __region_EEPROM_end__ = 0x08083FFF;
+define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__];
+
+place in EEPROM_region { section .eeprom };
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/arm/README.txt b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/README.txt
new file mode 100644
index 00000000..ffd93b28
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/README.txt
@@ -0,0 +1,77 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::STM32L152_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numberical value of the heap size.
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
+
+Startup Code
+============
+The startup code for the STM32L1xx MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+The file startup_stm32l1xx.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intended to handle catastrophic errors and
+should NOT return.
+***
+
+
+Adjusting the CPU Clock Speed
+=============================
+The current setting is to run at 2MHz from the MSI (internal oscillator),
+but the CPU clock speed can be modified by editing the file
+system_stm32l1xx.c. Ther file system_stm32l1xx_pll.c provides an example
+of clock setting using the PLL driven from the MSE.
+
+***
+NOTE:
+The NUCLEO boards have a wide range of possible clock selections, depending
+on the solder bridge configuration. Please see Chapter 5.7 "OSC clock" in
+the STM32 NUCLEO Boards User Manual (ST document UM1724) for more information.
+***
+
+
\ No newline at end of file
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvoptx b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvoptx
new file mode 100644
index 00000000..7be20026
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvoptx
@@ -0,0 +1,1112 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 0
+ 1
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\dbg\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 18
+
+
+ 0
+ User Manual (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 1
+ Overview (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 2
+ Getting started (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 3
+ Schematics (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 4
+ STM32 Nucleo board (NUCLEO-L152RE)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+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 66
+ 8
+ .\rel\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 0
+
+ 18
+
+
+ 0
+ User Manual (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 1
+ Overview (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 2
+ Getting started (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 3
+ Schematics (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 4
+ STM32 Nucleo board (NUCLEO-L152RE)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066EFF495056805087184715 -I0 -O8430 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM)
+
+
+ 0
+ UL2CM3
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+
+
+
+
+
+ 1
+ 2
+ 0x20000200
+ 0
+
+
+
+
+ 2
+ 0
+ 0x400
+ 0
+
+
+
+ 0
+
+
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 0
+ 1
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\spy\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 0
+
+ 18
+
+
+ 0
+ User Manual (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105823.pdf
+
+
+ 1
+ Overview (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105918.pdf
+
+
+ 2
+ Getting started (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\DM00105925.pdf
+
+
+ 3
+ Schematics (NUCLEO-L152RE)
+ C:\tools\Keil_v5\ARM\PACK\Keil\STM32NUCLEO_BSP\1.3.0\Documents\MB1136.pdf
+
+
+ 4
+ STM32 Nucleo board (NUCLEO-L152RE)
+ http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 11
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U066EFF495056805087184715 -I0 -O8398 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM)
+
+
+ 0
+ UL2CM3
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+
+
+
+
+
+ 1
+ 2
+ 0x20000200
+ 0
+
+
+
+
+ 2
+ 0
+ 0x400
+ 0
+
+
+
+ 0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..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+ 5
+ 34
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_pkg.h
+ qs_pkg.h
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvprojx b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvprojx
new file mode 100644
index 00000000..950a2e02
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/arm/dpp-qv.uvprojx
@@ -0,0 +1,1919 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ dpp-dbg
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\dbg\
+ dpp-qv
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\dbg\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\dbg\dpp-qv.bin .\dbg\dpp-qv.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+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0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x14000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=512 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-rel
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\rel\
+ dpp-qv
+ 1
+ 0
+ 0
+ 0
+ 0
+ .\rel\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\rel\dpp-qv.bin .\rel\dpp-qv.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+ -REMAP -MPU
+ DCM.DLL
+ -pCM3
+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+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x14000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 4
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ NDEBUG
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=512 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ dpp-spy
+ 0x4
+ ARM-ADS
+
+
+ STM32L152RE
+ STMicroelectronics
+ Keil.STM32L1xx_DFP.1.0.2
+ http://www.keil.com/pack/
+ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM))
+ 0
+ $$Device:STM32L152RE$Device\Include\STM32L1xx.h
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L152RE$SVD\STM32L1xx.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\spy\
+ dpp-qv
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\spy\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin --output .\spy\dpp-qv.bin .\spy\dpp-qv.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 1
+
+
+ SARMCM3.DLL
+ -REMAP -MPU
+ DCM.DLL
+ -pCM3
+ SARMCM3.DLL
+ -MPU
+ TCM.DLL
+ -pCM3
+
+
+
+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+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+
+
+ Q_SPY
+
+ ..\..;..\..\..\..\..\include;..\..\..\..\..\source;..\..\..\..\..\ports\arm-cm\qv\arm;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ Stack_Size=1024 Heap_Size=16
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x00000000
+ 0x20000000
+
+ dpp-qv.sct
+
+
+ --entry Reset_Handler
+
+
+
+
+
+
+
+ Application
+
+
+ bsp.h
+ 5
+ ..\..\bsp.h
+
+
+ dpp.h
+ 5
+ ..\..\dpp.h
+
+
+ main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ philo.cpp
+ 1
+ ..\..\philo.cpp
+
+
+ README.txt
+ 5
+ ..\..\README.txt
+
+
+ table.cpp
+ 1
+ ..\..\table.cpp
+
+
+ bsp.cpp
+ 1
+ ..\bsp.cpp
+
+
+
+
+ nucleo-l152re
+
+
+ README.txt
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\README.txt
+
+
+ stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h
+
+
+ system_stm32l1xx.c
+ 1
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c
+
+
+ system_stm32l1xx.h
+ 5
+ ..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h
+
+
+ startup_stm32l1xx.s
+ 2
+ ..\..\..\..\..\3rd_party\nucleo-l152re\arm\startup_stm32l1xx.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.cpp b/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.cpp
new file mode 100644
index 00000000..fbf334bd
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.cpp
@@ -0,0 +1,466 @@
+///***************************************************************************
+// Product: DPP example, STM32 NUCLEO-L152RE board, cooperative QV kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "stm32l1xx.h" // CMSIS-compliant header file for the MCU used
+// add other drivers if necessary...
+
+// namespace DPP *************************************************************
+namespace DPP {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ EXTI0_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LED pins available on the board (just one user LED LD2--Green on PA.5)
+#define LED_LD2 (1U << 5)
+
+// Button pins available on the board (just one user Button B1 on PC.13)
+#define BTN_B1 (1U << 13)
+
+static unsigned l_rnd; // random seed
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_EXTI0_IRQHandler = 0U;
+
+ enum AppRecords { // application-specific trace records
+ PHILO_STAT = QP::QS_USER
+ };
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+ // state of the button debouncing, see below
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+ uint32_t tmp;
+
+#ifdef Q_SPY
+ {
+ tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ current = ~GPIOC->IDR; // read Port C with the state of Button B1
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & BTN_B1) != 0U) { // debounced BTN_B1 state changed?
+ if ((buttons.depressed & BTN_B1) != 0U) { // is BTN_B1 depressed?
+ static QP::QEvt const pauseEvt = { DPP::PAUSE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&pauseEvt, &l_SysTick_Handler);
+ }
+ else { // the button is released
+ static QP::QEvt const serveEvt = { DPP::SERVE_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler);
+ }
+ }
+}
+//............................................................................
+void EXTI0_IRQHandler(void); // prototype
+void EXTI0_IRQHandler(void) {
+ // for testing..
+ DPP::AO_Table->POST(Q_NEW(QP::QEvt, DPP::MAX_PUB_SIG),
+ &l_EXTI0_IRQHandler);
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // enable GPIOA clock port for the LED LD2
+ RCC->AHBENR |= (1U << 0);
+
+ // configure LED (PA.5) pin as push-pull output, no pull-up, pull-down
+ GPIOA->MODER &= ~((3U << 2*5));
+ GPIOA->MODER |= ((1U << 2*5));
+ GPIOA->OTYPER &= ~((1U << 5));
+ GPIOA->OSPEEDR &= ~((3U << 2*5));
+ GPIOA->OSPEEDR |= ((1U << 2*5));
+ GPIOA->PUPDR &= ~((3U << 2*5));
+
+ // enable GPIOC clock port for the Button B1
+ RCC->AHBENR |= (1U << 2);
+
+ // configure Button (PC.13) pins as input, no pull-up, pull-down
+ GPIOC->MODER &= ~(3U << 2*13);
+ GPIOC->OSPEEDR &= ~(3U << 2*13);
+ GPIOC->OSPEEDR |= (1U << 2*13);
+ GPIOC->PUPDR &= ~(3U << 2*13);
+
+ BSP_randomSeed(1234U);
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_EXTI0_IRQHandler);
+ QS_USR_DICTIONARY(PHILO_STAT);
+}
+//............................................................................
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+ if (stat[0] == 'h') {
+ GPIOA->BSRRL |= LED_LD2; // turn LED on
+ }
+ else {
+ GPIOA->BSRRH |= LED_LD2; // turn LED off
+ }
+
+ QS_BEGIN(PHILO_STAT, AO_Philo[n]) // application-specific record begin
+ QS_U8(1, n); // Philosopher number
+ QS_STR(stat); // Philosopher status
+ QS_END()
+}
+//............................................................................
+void BSP_displayPaused(uint8_t paused) {
+ // not enough LEDs to implement this feature
+ if (paused != (uint8_t)0) {
+ //GPIOA->BSRRL |= LED_LD2; // turn LED on
+ }
+ else {
+ //GPIOA->BSRRH |= LED_LD2; // turn LED off
+ }
+}
+//............................................................................
+uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
+ // "Super-Duper" Linear Congruential Generator (LCG)
+ // LCG(2^32, 3*7*11*13*23, 0, seed)
+ //
+ l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+
+ return l_rnd >> 8;
+}
+//............................................................................
+void BSP_randomSeed(uint32_t seed) {
+ l_rnd = seed;
+}
+//............................................................................
+void BSP_terminate(int16_t result) {
+ (void)result;
+}
+
+} // namespace DPP
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / DPP::BSP_TICKS_PER_SEC);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(SysTick_IRQn, DPP::SYSTICK_PRIO);
+ NVIC_SetPriority(EXTI0_IRQn, DPP::EXTI0_PRIO);
+ // ...
+
+ // enable IRQs...
+ NVIC_EnableIRQ(EXTI0_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QV::onIdle(void) { // called with interrupts disabled, see NOTE01
+ // toggle the User LED on and then off (not enough LEDs, see NOTE02)
+ //GPIOA->BSRRL |= LED_LD2; // turn LED on
+ //GPIOA->BSRRH |= LED_LD2; // turn LED off
+
+#ifdef Q_SPY
+ QF_INT_ENABLE();
+ if ((USART2->SR & 0x0080U) != 0) { // is TXE empty?
+ QF_INT_DISABLE();
+ uint16_t b = QS::getByte();
+ QF_INT_ENABLE();
+
+ if (b != QS_EOD) { // not End-Of-Data?
+ USART2->DR = (b & 0xFFU); // put into the DR register
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ // !!!CAUTION!!!
+ // The WFI instruction stops the CPU clock, which unfortunately disables
+ // the JTAG port, so the ST-Link debugger can no longer connect to the
+ // board. For that reason, the call to __WFI() has to be used with CAUTION.
+ //
+ // NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
+ // reset the board, then connect with ST-Link Utilities and erase the part.
+ // The trick with BOOT(0) is it gets the part to run the System Loader
+ // instead of your broken code. When done disconnect BOOT0, and start over.
+ //
+ //QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
+ QF_INT_ENABLE(); // for now, just enable interrupts
+#else
+ QF_INT_ENABLE(); // just enable interrupts
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+/*..........................................................................*/
+#define __DIV(__PCLK, __BAUD) (((__PCLK / 4U) * 25U)/(__BAUD))
+#define __DIVMANT(__PCLK, __BAUD) (__DIV(__PCLK, __BAUD)/100U)
+#define __DIVFRAQ(__PCLK, __BAUD) \
+ (((__DIV(__PCLK, __BAUD) - (__DIVMANT(__PCLK, __BAUD) * 100U)) \
+ * 16U + 50U) / 100U)
+#define __USART_BRR(__PCLK, __BAUD) \
+ ((__DIVMANT(__PCLK, __BAUD) << 4)|(__DIVFRAQ(__PCLK, __BAUD) & 0x0FU))
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable peripheral clock for USART2
+ RCC->AHBENR |= (1U << 0); // Enable GPIOA clock
+ RCC->APB1ENR |= (1U << 17); // Enable USART#2 clock
+
+ // Configure PA3 to USART2_RX, PA2 to USART2_TX
+ GPIOA->AFR[0] &= ~((15U << 4*3) | (15U << 4*2));
+ GPIOA->AFR[0] |= (( 7U << 4*3) | ( 7U << 4*2));
+ GPIOA->MODER &= ~(( 3U << 2*3) | ( 3U << 2*2));
+ GPIOA->MODER |= (( 2U << 2*3) | ( 2U << 2*2));
+
+ USART2->BRR = __USART_BRR(SystemCoreClock, 115200U); // baud rate
+ USART2->CR3 = 0x0000U; // no flow control
+ USART2->CR2 = 0x0000U; // 1 stop bit
+ USART2->CR1 = ((1U << 2) | // enable RX
+ (1U << 3) | // enable TX
+ (0U << 12) | // 1 start bit, 8 data bits
+ (1U << 13)); // enable USART
+
+ DPP::QS_tickPeriod_ = SystemCoreClock / DPP::BSP_TICKS_PER_SEC;
+ DPP::QS_tickTime_ = DPP::QS_tickPeriod_; // to start the timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return DPP::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return DPP::QS_tickTime_ + DPP::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t b;
+
+ QF_INT_DISABLE();
+ while ((b = getByte()) != QS_EOD) { // while not End-Of-Data...
+ QF_INT_ENABLE();
+ while ((USART2->SR & 0x0080U) == 0U) { // while TXE not empty
+ }
+ USART2->DR = (b & 0xFFU); // put into the DR register
+ }
+ QF_INT_ENABLE();
+}
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call any QF services. These ISRs
+// are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF services. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The QV_onIdle() callback is called with interrupts disabled, because the
+// determination of the idle condition might change by any interrupt posting
+// an event. QV_onIdle() must internally enable interrupts, ideally
+// atomically with putting the CPU to the power-saving mode.
+//
+// NOTE02:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile
new file mode 100644
index 00000000..25b85c23
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile
@@ -0,0 +1,305 @@
+##############################################################################
+# Product: Makefile for QP/C++, DPP on STM32 NUCLEO-L152RE, QV kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-05-07
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := dpp-qv
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qv/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/nucleo-l152re \
+ $(QPCPP)/3rd_party/nucleo-l152re/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/nucleo-l152re
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_stm32l1xx.c \
+ startup_stm32l1xx.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ philo.cpp \
+ table.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qv.cpp
+
+QP_ASMS :=
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m3
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/dpp-qv.ld b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/dpp-qv.ld
new file mode 100644
index 00000000..4f1214d9
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/dpp-qv.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for STM32L152RET6, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of STM32L152RET6 */
+ ROM (rx) : ORIGIN = 0x08000000, LENGTH = 512K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 80K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp
new file mode 100644
index 00000000..6d6be1ab
--- /dev/null
+++ b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp
@@ -0,0 +1,2977 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 38
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+
+ OGProductVersion
+ 5.11.0.50579
+
+
+ OGLastSavedByProductVersion
+ 7.40.2.8567
+
+
+ GeneralEnableMisra
+ 0
+
+
+ GeneralMisraVerbose
+ 0
+
+
+ OGChipSelectEditMenu
+ STM32L152xE ST STM32L152xE
+
IlinkOverrideProgramEntryLabel
@@ -2811,50 +2852,149 @@
0
+
+ Coder
+ 0
+
+
- Source
+ Application
- $PROJ_DIR$\bsp.cpp
+ $PROJ_DIR$\..\bsp.cpp
- $PROJ_DIR$\bsp.h
+ $PROJ_DIR$\..\..\bsp.h
- $PROJ_DIR$\display96x16x1.c
+ $PROJ_DIR$\..\..\game.h
- $PROJ_DIR$\display96x16x1.h
+ $PROJ_DIR$\..\..\main.cpp
- $PROJ_DIR$\game.h
+ $PROJ_DIR$\..\..\mine1.cpp
- $PROJ_DIR$\lm3s_config.h
+ $PROJ_DIR$\..\..\mine2.cpp
- $PROJ_DIR$\main.cpp
+ $PROJ_DIR$\..\..\missile.cpp
- $PROJ_DIR$\mine1.cpp
+ $PROJ_DIR$\..\..\ship.cpp
- $PROJ_DIR$\mine2.cpp
+ $PROJ_DIR$\..\..\tunnel.cpp
+
+
+
+ ek-lm3s811
+
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.c
- $PROJ_DIR$\missile.cpp
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.h
- $PROJ_DIR$\ship.cpp
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\LM3S811.h
- $PROJ_DIR$\startup_lm3s.c
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\iar\startup_LM3S811.s
- $PROJ_DIR$\system_lm3s.c
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.c
- $PROJ_DIR$\tunnel.cpp
+ $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.h
+
+
+
+ QP
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_hsm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qep_msm.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_act.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_actq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_defer.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_dyn.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_mem.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_pkg.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_ps.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qeq.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_qmact.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qf_time.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_mutex.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qk_pkg.h
+
+
+
+ QP_port
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.s
+
+
+ $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h
+
+
+
+ QS
+
+ Debug
+ Release
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_64bit.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_fp.cpp
+
+
+ $PROJ_DIR$\..\..\..\..\..\source\qs_pkg.h
diff --git a/examples/arm-cm/qk/iar/game-qk_ek-lm3s811/game-qk.eww b/examples/arm-cm/game_ek-lm3s811/qk/iar/game-qk.eww
similarity index 100%
rename from examples/arm-cm/qk/iar/game-qk_ek-lm3s811/game-qk.eww
rename to examples/arm-cm/game_ek-lm3s811/qk/iar/game-qk.eww
diff --git a/examples/arm-cm/qk/iar/game-qk_ek-lm3s811/game-qk.icf b/examples/arm-cm/game_ek-lm3s811/qk/iar/game-qk.icf
similarity index 90%
rename from examples/arm-cm/qk/iar/game-qk_ek-lm3s811/game-qk.icf
rename to examples/arm-cm/game_ek-lm3s811/qk/iar/game-qk.icf
index 40979ff1..dbadafeb 100644
--- a/examples/arm-cm/qk/iar/game-qk_ek-lm3s811/game-qk.icf
+++ b/examples/arm-cm/game_ek-lm3s811/qk/iar/game-qk.icf
@@ -25,5 +25,5 @@ do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
-place at start of RAM_region {block CSTACK };
-place in RAM_region { readwrite, block HEAP };
\ No newline at end of file
+place in RAM_region { readwrite,
+ block CSTACK, block HEAP };
\ No newline at end of file
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/arm/README.txt b/examples/arm-cm/game_ek-lm3s811/qv/arm/README.txt
new file mode 100644
index 00000000..1d4754a2
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/arm/README.txt
@@ -0,0 +1,35 @@
+About this Example
+==================
+This example demonstrates how to use the uVision IDE together with
+the MDK-ARM toolchain.
+
+***
+NOTE: This example requires installing the following Software Pack
+in the Keil uVision: Keil::LPC1700_DFP.
+***
+
+
+uVision Project File
+====================
+The MDK-ARM uVision project file provided with this example uses
+relative paths to the QP/C framework location (includes, port, and
+libraries. These relative paths must be modified when the project
+is moved to different relative location.
+
+
+Adjusting Stack and Heap Sizes
+==============================
+The stack and heap sizes are determined in this project by the
+command-line options for the ARM assembler (see the Asm tab in
+the "Options for Target" dialog box in uVision). Specifically,
+you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
+xxx represents a numerical value of stack size and yyy the
+numerical value of the heap size (for most embedded projects
+yyy should be 0, as the using the heap is not recommended).
+
+***
+NOTE:
+C++ programs seem not to tolerate heap size of 0. Therefore it is
+recommended to set the Heap_Size symbol to a minimal value of 16.
+***
+
\ No newline at end of file
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvoptx b/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvoptx
new file mode 100644
index 00000000..443870b8
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvoptx
@@ -0,0 +1,1092 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (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 33
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+ qs_port.h
+ 0
+ 0
+
+
+
+
+ QS
+ 1
+ 0
+ 0
+ 0
+
+ 5
+ 34
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs.cpp
+ qs.cpp
+ 0
+ 0
+
+
+ 5
+ 35
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_64bit.cpp
+ qs_64bit.cpp
+ 0
+ 0
+
+
+ 5
+ 36
+ 1
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_fp.cpp
+ qs_fp.cpp
+ 0
+ 0
+
+
+ 5
+ 37
+ 5
+ 0
+ 0
+ 0
+ 0
+ ..\..\..\..\..\source\qs_pkg.h
+ qs_pkg.h
+ 0
+ 0
+
+
+
+
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvprojx b/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvprojx
new file mode 100644
index 00000000..83db7e27
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/arm/game-qv.uvprojx
@@ -0,0 +1,1964 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ game-dbg
+ 0x4
+ ARM-ADS
+
+
+ ARMCM3
+ ARM
+ ARM.CMSIS.4.3.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x40000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ESEL ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM3$Device\ARM\Flash\NEW_DEVICE.FLM))
+ 0
+ $$Device:ARMCM3$Device\ARM\ARMCM3\Include\ARMCM3.h
+
+
+
+
+
+
+
+
+
+ $$Device:ARMCM3$Device\ARM\SVD\ARMCM3.svd
+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+ ship.cpp
+ 1
+ ..\..\ship.cpp
+
+
+ tunnel.cpp
+ 1
+ ..\..\tunnel.cpp
+
+
+
+
+ ek-lm3s811
+
+
+ display96x16x1.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.c
+
+
+ display96x16x1.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.h
+
+
+ LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\LM3S811.h
+
+
+ system_LM3S811.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.c
+
+
+ system_LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.h
+
+
+ startup_LM3S811.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-lm3s811\arm\startup_LM3S811.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ game-rel
+ 0x4
+ ARM-ADS
+
+
+ ARMCM3
+ ARM
+ ARM.CMSIS.4.3.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x40000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ESEL ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM3$Device\ARM\Flash\NEW_DEVICE.FLM))
+ 0
+ $$Device:ARMCM3$Device\ARM\ARMCM3\Include\ARMCM3.h
+
+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mine2.cpp
+ 1
+ ..\..\mine2.cpp
+
+
+ missile.cpp
+ 1
+ ..\..\missile.cpp
+
+
+ ship.cpp
+ 1
+ ..\..\ship.cpp
+
+
+ tunnel.cpp
+ 1
+ ..\..\tunnel.cpp
+
+
+
+
+ ek-lm3s811
+
+
+ display96x16x1.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.c
+
+
+ display96x16x1.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.h
+
+
+ LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\LM3S811.h
+
+
+ system_LM3S811.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.c
+
+
+ system_LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.h
+
+
+ startup_LM3S811.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-lm3s811\arm\startup_LM3S811.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+ 1
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+ game-spy
+ 0x4
+ ARM-ADS
+
+
+ ARMCM3
+ ARM
+ ARM.CMSIS.4.3.0
+ http://www.keil.com/pack/
+ IROM(0x00000000,0x40000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ESEL ELITTLE
+
+
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM3$Device\ARM\Flash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main.cpp
+ 1
+ ..\..\main.cpp
+
+
+ mine1.cpp
+ 1
+ ..\..\mine1.cpp
+
+
+ mine2.cpp
+ 1
+ ..\..\mine2.cpp
+
+
+ missile.cpp
+ 1
+ ..\..\missile.cpp
+
+
+ ship.cpp
+ 1
+ ..\..\ship.cpp
+
+
+ tunnel.cpp
+ 1
+ ..\..\tunnel.cpp
+
+
+
+
+ ek-lm3s811
+
+
+ display96x16x1.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.c
+
+
+ display96x16x1.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\display96x16x1.h
+
+
+ LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\LM3S811.h
+
+
+ system_LM3S811.c
+ 1
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.c
+
+
+ system_LM3S811.h
+ 5
+ ..\..\..\..\..\3rd_party\ek-lm3s811\system_LM3S811.h
+
+
+ startup_LM3S811.s
+ 2
+ ..\..\..\..\..\3rd_party\ek-lm3s811\arm\startup_LM3S811.s
+
+
+
+
+ QP
+
+
+ qep_hsm.cpp
+ 1
+ ..\..\..\..\..\source\qep_hsm.cpp
+
+
+ qep_msm.cpp
+ 1
+ ..\..\..\..\..\source\qep_msm.cpp
+
+
+ qf_act.cpp
+ 1
+ ..\..\..\..\..\source\qf_act.cpp
+
+
+ qf_actq.cpp
+ 1
+ ..\..\..\..\..\source\qf_actq.cpp
+
+
+ qf_defer.cpp
+ 1
+ ..\..\..\..\..\source\qf_defer.cpp
+
+
+ qf_dyn.cpp
+ 1
+ ..\..\..\..\..\source\qf_dyn.cpp
+
+
+ qf_mem.cpp
+ 1
+ ..\..\..\..\..\source\qf_mem.cpp
+
+
+ qf_pkg.h
+ 5
+ ..\..\..\..\..\source\qf_pkg.h
+
+
+ qf_ps.cpp
+ 1
+ ..\..\..\..\..\source\qf_ps.cpp
+
+
+ qf_qact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qact.cpp
+
+
+ qf_qeq.cpp
+ 1
+ ..\..\..\..\..\source\qf_qeq.cpp
+
+
+ qf_qmact.cpp
+ 1
+ ..\..\..\..\..\source\qf_qmact.cpp
+
+
+ qf_time.cpp
+ 1
+ ..\..\..\..\..\source\qf_time.cpp
+
+
+ qv.cpp
+ 1
+ ..\..\..\..\..\source\qv.cpp
+
+
+
+
+ QP_port
+
+
+ qep_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qep_port.h
+
+
+ qf_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qf_port.h
+
+
+ qv_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qv_port.h
+
+
+ qs_port.h
+ 5
+ ..\..\..\..\..\ports\arm-cm\qv\arm\qs_port.h
+
+
+
+
+ QS
+
+
+ qs.cpp
+ 1
+ ..\..\..\..\..\source\qs.cpp
+
+
+ qs_64bit.cpp
+ 1
+ ..\..\..\..\..\source\qs_64bit.cpp
+
+
+ qs_fp.cpp
+ 1
+ ..\..\..\..\..\source\qs_fp.cpp
+
+
+ qs_pkg.h
+ 5
+ ..\..\..\..\..\source\qs_pkg.h
+
+
+
+
+
+
+
+
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/bsp.cpp b/examples/arm-cm/game_ek-lm3s811/qv/bsp.cpp
new file mode 100644
index 00000000..badc2e5c
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/bsp.cpp
@@ -0,0 +1,521 @@
+///***************************************************************************
+// Product: "Fly 'n' Shoot" game example on EK-LM3S811, cooperative QV kernel
+// Last updated for version 5.4.0
+// Last updated on 2015-05-06
+//
+// Q u a n t u m L e a P s
+// ---------------------------
+// innovating embedded systems
+//
+// Copyright (C) Quantum Leaps, LLC. All rights reserved.
+//
+// This program is open source software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Alternatively, this program may be distributed and modified under the
+// terms of Quantum Leaps commercial licenses, which expressly supersede
+// the GNU General Public License and are specifically designed for
+// licensees interested in retaining the proprietary status of their code.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// Contact information:
+// Web: www.state-machine.com
+// Email: info@state-machine.com
+//****************************************************************************
+#include "qpcpp.h"
+#include "game.h"
+#include "bsp.h"
+
+#include "LM3S811.h" // the device specific header (TI)
+#include "display96x16x1.h" // the OLED display driver (TI)
+// add other drivers if necessary...
+
+
+// namespace GAME ************************************************************
+namespace GAME {
+
+Q_DEFINE_THIS_FILE
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority().
+// DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+//
+enum KernelUnawareISRs { // see NOTE00
+ // ...
+ MAX_KERNEL_UNAWARE_CMSIS_PRI // keep always last
+};
+// "kernel-unaware" interrupts can't overlap "kernel-aware" interrupts
+Q_ASSERT_COMPILE(MAX_KERNEL_UNAWARE_CMSIS_PRI <= QF_AWARE_ISR_CMSIS_PRI);
+
+enum KernelAwareISRs {
+ ADCSEQ3_PRIO = QF_AWARE_ISR_CMSIS_PRI, // see NOTE00
+ GPIOPORTA_PRIO,
+ SYSTICK_PRIO,
+ // ...
+ MAX_KERNEL_AWARE_CMSIS_PRI // keep always last
+};
+// "kernel-aware" interrupts should not overlap the PendSV priority
+Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
+
+// Local-scope objects -------------------------------------------------------
+// LEDs available on the board
+#define USER_LED (1U << 5)
+
+// Push-Button wired externally to DIP8 (P0.6)
+#define USER_BTN (1U << 4)
+
+// other useful registers...
+#define ADC_TRIGGER_TIMER 0x00000005U
+#define ADC_CTL_IE 0x00000040U
+#define ADC_CTL_END 0x00000020U
+#define ADC_CTL_CH0 0x00000000U
+#define ADC_SSFSTAT0_EMPTY 0x00000100U
+#define UART_FR_TXFE 0x00000080U
+
+#ifdef Q_SPY
+
+ QP::QSTimeCtr QS_tickTime_;
+ QP::QSTimeCtr QS_tickPeriod_;
+
+ // event-source identifiers used for tracing
+ static uint8_t const l_SysTick_Handler = 0U;
+ static uint8_t const l_ADCSeq3_IRQHandler = 0U;
+ static uint8_t const l_GPIOPortA_IRQHandler = 0U;
+
+ #define UART_BAUD_RATE 115200U
+ #define UART_TXFIFO_DEPTH 16U
+
+#endif
+
+// ISRs used in this project =================================================
+extern "C" {
+
+//............................................................................
+void SysTick_Handler(void); // prototype
+void SysTick_Handler(void) {
+
+#ifdef Q_SPY
+ {
+ uint32_t volatile tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
+ (void)tmp; // unused local variable
+ QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
+ }
+#endif
+
+ static QP::QEvt const tickEvt = { TIME_TICK_SIG, 0U, 0U };
+ QP::QF::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0
+ QP::QF::PUBLISH(&tickEvt, &l_SysTick_Handler); // publish to subscribers
+}
+//............................................................................
+void ADCSeq3_IRQHandler(void); // prototype
+void ADCSeq3_IRQHandler(void) {
+ static uint32_t adcLPS = 0U; // Low-Pass-Filtered ADC reading
+ static uint32_t wheel = 0U; // the last wheel position
+ uint32_t tmp;
+
+ ADC->ISC = (1U << 3); // clear the ADCSeq3 interrupt
+
+ // the ADC Sequence 3 FIFO must have a sample
+ Q_ASSERT((ADC->SSFSTAT3 & ADC_SSFSTAT0_EMPTY) == 0U);
+
+
+ // 1st order low-pass filter: time constant ~= 2^n samples
+ // TF = (1/2^n)/(z-((2^n - 1)/2^n)),
+ // eg, n=3, y(k+1) = y(k) - y(k)/8 + x(k)/8 => y += (x - y)/8
+ //
+ tmp = ADC->SSFIFO3; // read the data from the ADC
+ adcLPS += (((int)tmp - (int)adcLPS + 4) >> 3);
+
+ // compute the next position of the wheel
+ tmp = (((1U << 10) - adcLPS)*(BSP_SCREEN_HEIGHT - 2U)) >> 10;
+
+ if (tmp != wheel) { // did the wheel position change?
+ ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
+ ope->x = (uint8_t)GAME_SHIP_X; // x-position is fixed
+ ope->y = (uint8_t)tmp;
+ AO_Ship->POST(ope, &l_ADCSeq3_IRQHandler);
+ wheel = tmp; // save the last position of the wheel
+ }
+
+ // Perform the debouncing of buttons. The algorithm for debouncing
+ // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
+ // and Michael Barr, page 71.
+ //
+ static struct ButtonsDebouncing {
+ uint32_t depressed;
+ uint32_t previous;
+ } buttons = { ~0U, ~0U };
+ uint32_t current;
+
+ current = ~GPIOC->DATA; // read the port with the User Button
+ tmp = buttons.depressed; // save the debounced depressed buttons
+ buttons.depressed |= (buttons.previous & current); // set depressed
+ buttons.depressed &= (buttons.previous | current); // clear released
+ buttons.previous = current; // update the history
+ tmp ^= buttons.depressed; // changed debounced depressed
+ if ((tmp & USER_BTN) != 0U) { // debounced USER_BTN state changed?
+ if ((buttons.depressed & USER_BTN) != 0U) { // is USER_BTN depressed?
+ static QP::QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U};
+ QP::QF::PUBLISH(&fireEvt, &l_ADCSeq3_IRQHandler);
+ }
+ else { // the button is released
+ }
+ }
+}
+//............................................................................
+void GPIOPortA_IRQHandler(void); // prototype
+void GPIOPortA_IRQHandler(void) {
+ AO_Tunnel->POST(Q_NEW(QP::QEvt, MAX_PUB_SIG), // for testing...
+ &l_GPIOPortA_IRQHandler);
+}
+
+} // extern "C"
+
+// BSP functions =============================================================
+void BSP_init(void) {
+ // NOTE: SystemInit() already called from the startup code
+ // but SystemCoreClock needs to be updated
+ //
+ SystemCoreClockUpdate();
+
+ // enable clock to the peripherals used by the application
+ SYSCTL->RCGC0 |= (1U << 16); // enable clock to ADC
+ SYSCTL->RCGC1 |= (1U << 16) | (1U << 17); // enable clock to TIMER0 & 1
+ SYSCTL->RCGC2 |= (1U << 0) | (1U << 2); // enable clock to GPIOA & C
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // Configure the ADC Sequence 3 to sample the potentiometer when the
+ // timer expires. Set the sequence priority to 0 (highest).
+ //
+ ADC->EMUX = (ADC->EMUX & ~(0xFU << (3*4)))
+ | (ADC_TRIGGER_TIMER << (3*4));
+ ADC->SSPRI = (ADC->SSPRI & ~(0xFU << (3*4)))
+ | (0U << (3*4));
+
+ // set ADC Sequence 3 step to 0
+ ADC->SSMUX3 = (ADC->SSMUX3 & ~(0xFU << (0*4)))
+ | ((ADC_CTL_CH0 | ADC_CTL_IE | ADC_CTL_END) << (0*4));
+ ADC->SSCTL3 = (ADC->SSCTL3 & ~(0xFU << (0*4)))
+ | (((ADC_CTL_CH0 | ADC_CTL_IE | ADC_CTL_END) >> 4) <<(0*4));
+ ADC->ACTSS |= (1U << 3);
+
+ // configure TIMER1 to trigger the ADC to sample the potentiometer
+ TIMER1->CTL &= ~((1U << 0) | (1U << 16));
+ TIMER1->CFG = 0x00U;
+ TIMER1->TAMR = 0x02U;
+ TIMER1->TAILR = SystemCoreClock / 120U;
+ TIMER1->CTL |= 0x02U;
+ TIMER1->CTL |= 0x20U;
+
+ // configure the User LED...
+ GPIOC->DIR |= USER_LED; // set direction: output
+ GPIOC->DEN |= USER_LED; // digital enable
+ GPIOC->DATA_Bits[USER_LED] = 0U; // turn the User LED off
+
+ // configure the User Button...
+ GPIOC->DIR &= ~USER_BTN; // set direction: input
+ GPIOC->DEN |= USER_BTN; // digital enable
+
+ Display96x16x1Init(1); // initialize the OLED display
+
+ if (QS_INIT((void *)0) == 0U) { // initialize the QS software tracing
+ Q_ERROR();
+ }
+ QS_OBJ_DICTIONARY(&l_SysTick_Handler);
+ QS_OBJ_DICTIONARY(&l_ADCSeq3_IRQHandler);
+ QS_OBJ_DICTIONARY(&l_GPIOPortA_IRQHandler);
+}
+//............................................................................
+void BSP_drawBitmap(uint8_t const *bitmap) {
+ Display96x16x1ImageDraw(bitmap, 0, 0,
+ BSP_SCREEN_WIDTH, (BSP_SCREEN_HEIGHT >> 3));
+}
+//............................................................................
+void BSP_drawBitmapXY(uint8_t const *bitmap, uint8_t x, uint8_t y) {
+ Display96x16x1ImageDraw(bitmap, x, y,
+ BSP_SCREEN_WIDTH, (BSP_SCREEN_HEIGHT >> 3));
+}
+//............................................................................
+void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
+ Display96x16x1StringDraw(str, x, y);
+}
+//............................................................................
+void BSP_updateScore(uint16_t score) {
+ // no room on the OLED display of the EV-LM3S811 board for the score
+}
+//............................................................................
+void BSP_displayOn(void) {
+ Display96x16x1DisplayOn();
+}
+//............................................................................
+void BSP_displayOff(void) {
+ Display96x16x1DisplayOff();
+}
+
+} // namespace GAME
+
+
+// namespace QP **************************************************************
+namespace QP {
+
+// QF callbacks ==============================================================
+void QF::onStartup(void) {
+ // set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
+ SysTick_Config(SystemCoreClock / GAME::BSP_TICKS_PER_SEC);
+
+ // assing all priority bits for preemption-prio. and none to sub-prio.
+ NVIC_SetPriorityGrouping(0U);
+
+ // set priorities of ALL ISRs used in the system, see NOTE00
+ //
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority()
+ // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE!
+ //
+ NVIC_SetPriority(ADCSeq3_IRQn, GAME::ADCSEQ3_PRIO);
+ NVIC_SetPriority(SysTick_IRQn, GAME::GPIOPORTA_PRIO);
+ NVIC_SetPriority(SysTick_IRQn, GAME::SYSTICK_PRIO);
+ // ...
+
+ // enable ADC
+ ADC->ISC = (1U << 3);
+ ADC->IM |= (1U << 3);
+
+ TIMER1->CTL |= ((1U << 0) | (1U << 16)); // enable TIMER1
+
+ // enable IRQs...
+ NVIC_EnableIRQ(GPIOPortA_IRQn);
+ NVIC_EnableIRQ(ADCSeq3_IRQn);
+}
+//............................................................................
+void QF::onCleanup(void) {
+}
+//............................................................................
+void QV::onIdle(void) { // called with interrupts disabled, see NOTE01
+ // toggle the User LED on and then off, see NOTE02
+ QF_INT_DISABLE();
+ GPIOC->DATA_Bits[USER_LED] = 0xFFU; // turn the User LED on
+ GPIOC->DATA_Bits[USER_LED] = 0x00U; // turn the User LED off
+ QF_INT_ENABLE();
+
+#ifdef Q_SPY
+ if ((UART0->FR & UART_FR_TXFE) != 0U) { // TX done?
+ uint16_t fifo = UART_TXFIFO_DEPTH; // max bytes we can accept
+ uint8_t const *block;
+
+ QF_INT_DISABLE();
+ block = QS::getBlock(&fifo); // try to get next block to transmit
+ QF_INT_ENABLE();
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the FIFO
+ }
+ }
+#elif defined NDEBUG
+ // Put the CPU and peripherals to the low-power mode.
+ // you might need to customize the clock management for your application,
+ // see the datasheet for your particular Cortex-M3 MCU.
+ //
+ QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
+#else
+ QF_INT_ENABLE(); // just enable interrupts
+#endif
+}
+
+//............................................................................
+// NOTE Q_onAssert() defined in assembly in startup_TM4C123GH6PM.s
+
+// QS callbacks ==============================================================
+#ifdef Q_SPY
+
+//............................................................................
+bool QS::onStartup(void const *arg) {
+ static uint8_t qsBuf[2*1024]; // buffer for Quantum Spy
+ initBuf(qsBuf, sizeof(qsBuf));
+
+ // enable the peripherals used by the UART0
+ SYSCTL->RCGC1 |= (1U << 0); // enable clock to UART0
+ SYSCTL->RCGC2 |= (1U << 0); // enable clock to GPIOA
+ __NOP(); // wait after enabling clocks
+ __NOP();
+ __NOP();
+
+ // configure UART0 pins for UART operation
+ uint32_t tmp = (1U << 0) | (1U << 1);
+ GPIOA->DIR &= ~tmp;
+ GPIOA->AFSEL |= tmp;
+ GPIOA->DR2R |= tmp; // set 2mA drive, DR4R and DR8R are cleared
+ GPIOA->SLR &= ~tmp;
+ GPIOA->ODR &= ~tmp;
+ GPIOA->PUR &= ~tmp;
+ GPIOA->PDR &= ~tmp;
+ GPIOA->DEN |= tmp;
+
+ // configure the UART for the desired baud rate, 8-N-1 operation
+ tmp = (((SystemCoreClock * 8U) / UART_BAUD_RATE) + 1U) / 2U;
+ UART0->IBRD = tmp / 64U;
+ UART0->FBRD = tmp % 64U;
+ UART0->LCRH = 0x60U; // configure 8-N-1 operation
+ UART0->LCRH |= 0x10U;
+ UART0->CTL |= (1U << 0) | (1U << 8) | (1U << 9);
+
+ GAME::QS_tickPeriod_ = SystemCoreClock / GAME::BSP_TICKS_PER_SEC;
+ GAME::QS_tickTime_ = GAME::QS_tickPeriod_; // to start timestamp at zero
+
+ // setup the QS filters...
+ QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+ QS_FILTER_ON(QS_QEP_STATE_EXIT);
+ QS_FILTER_ON(QS_QEP_STATE_INIT);
+ QS_FILTER_ON(QS_QEP_INIT_TRAN);
+ QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+ QS_FILTER_ON(QS_QEP_TRAN);
+ QS_FILTER_ON(QS_QEP_IGNORED);
+ QS_FILTER_ON(QS_QEP_DISPATCH);
+ QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+// QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+// QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+// QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET);
+// QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+// QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET);
+// QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+// QS_FILTER_ON(QS_QF_MPOOL_INIT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET);
+// QS_FILTER_ON(QS_QF_MPOOL_PUT);
+// QS_FILTER_ON(QS_QF_PUBLISH);
+// QS_FILTER_ON(QS_QF_RESERVED8);
+// QS_FILTER_ON(QS_QF_NEW);
+// QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+// QS_FILTER_ON(QS_QF_GC);
+ QS_FILTER_ON(QS_QF_TICK);
+// QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+// QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+// QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+// QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+// QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+// QS_FILTER_ON(QS_QF_CRIT_EXIT);
+// QS_FILTER_ON(QS_QF_ISR_ENTRY);
+// QS_FILTER_ON(QS_QF_ISR_EXIT);
+// QS_FILTER_ON(QS_QF_INT_DISABLE);
+// QS_FILTER_ON(QS_QF_INT_ENABLE);
+// QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+// QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+// QS_FILTER_ON(QS_QF_RESERVED1);
+// QS_FILTER_ON(QS_QF_RESERVED0);
+
+// QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+// QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+// QS_FILTER_ON(QS_QK_SCHEDULE);
+// QS_FILTER_ON(QS_QK_RESERVED1);
+// QS_FILTER_ON(QS_QK_RESERVED0);
+
+// QS_FILTER_ON(QS_QEP_TRAN_HIST);
+// QS_FILTER_ON(QS_QEP_TRAN_EP);
+// QS_FILTER_ON(QS_QEP_TRAN_XP);
+// QS_FILTER_ON(QS_QEP_RESERVED1);
+// QS_FILTER_ON(QS_QEP_RESERVED0);
+
+ QS_FILTER_ON(QS_SIG_DICT);
+ QS_FILTER_ON(QS_OBJ_DICT);
+ QS_FILTER_ON(QS_FUN_DICT);
+ QS_FILTER_ON(QS_USR_DICT);
+ QS_FILTER_ON(QS_EMPTY);
+ QS_FILTER_ON(QS_RESERVED3);
+ QS_FILTER_ON(QS_RESERVED2);
+ QS_FILTER_ON(QS_TEST_RUN);
+ QS_FILTER_ON(QS_TEST_FAIL);
+ QS_FILTER_ON(QS_ASSERT_FAIL);
+
+ return true; // return success
+}
+//............................................................................
+void QS::onCleanup(void) {
+}
+//............................................................................
+QSTimeCtr QS::onGetTime(void) { // NOTE: invoked with interrupts DISABLED
+ if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
+ return GAME::QS_tickTime_ - static_cast(SysTick->VAL);
+ }
+ else { // the rollover occured, but the SysTick_ISR did not run yet
+ return GAME::QS_tickTime_ + GAME::QS_tickPeriod_
+ - static_cast(SysTick->VAL);
+ }
+}
+//............................................................................
+void QS::onFlush(void) {
+ uint16_t fifo = UART_TXFIFO_DEPTH; // Tx FIFO depth
+ uint8_t const *block;
+ QF_INT_DISABLE();
+ while ((block = getBlock(&fifo)) != (uint8_t *)0) {
+ QF_INT_ENABLE();
+ // busy-wait until TX FIFO empty
+ while ((UART0->FR & UART_FR_TXFE) == 0U) {
+ }
+
+ while (fifo-- != 0U) { // any bytes in the block?
+ UART0->DR = *block++; // put into the TX FIFO
+ }
+ fifo = UART_TXFIFO_DEPTH; // re-load the Tx FIFO depth
+ QF_INT_DISABLE();
+ }
+ QF_INT_ENABLE();
+}
+
+#endif // Q_SPY
+//--------------------------------------------------------------------------*/
+
+} // namespace QP
+
+//****************************************************************************
+// NOTE00:
+// The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest
+// ISR priority that is disabled by the QF framework. The value is suitable
+// for the NVIC_SetPriority() CMSIS function.
+//
+// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
+// with the numerical values of priorities equal or higher than
+// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
+// macros or any other QF/QK services. These ISRs are "QF-aware".
+//
+// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
+// level (i.e., with the numerical values of priorities less than
+// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
+// Such "QF-unaware" ISRs cannot call any QF/QK services. In particular they
+// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
+// by which a "QF-unaware" ISR can communicate with the QF framework is by
+// triggering a "QF-aware" ISR, which can post/publish events.
+//
+// NOTE01:
+// The QV::onIdle() callback is called with interrupts disabled, because the
+// determination of the idle condition might change by any interrupt posting
+// an event. QV::onIdle() must internally enable interrupts, ideally
+// atomically with putting the CPU to the power-saving mode.
+//
+// NOTE02:
+// The User LED is used to visualize the idle loop activity. The brightness
+// of the LED is proportional to the frequency of invcations of the idle loop.
+// Please note that the LED is toggled with interrupts locked, so no interrupt
+// execution time contributes to the brightness of the User LED.
+//
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/gnu/Makefile b/examples/arm-cm/game_ek-lm3s811/qv/gnu/Makefile
new file mode 100644
index 00000000..17fc1d36
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/gnu/Makefile
@@ -0,0 +1,309 @@
+##############################################################################
+# Product: Makefile for QP/C++, Game on EK-LM3S811, QV kernel, GNU-ARM
+# Last Updated for Version: 5.4.0
+# Date of the Last Update: 2015-04-03
+#
+# Q u a n t u m L e a P s
+# ---------------------------
+# innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# Contact information:
+# Web: http://www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+# http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT := game-qv
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP/C++ framework (if not provided in an environemnt var.)
+ifeq ($(QPCPP),)
+QPCPP := ../../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPCPP)/ports/arm-cm/qv/gnu
+
+# list of all source directories used by this project
+VPATH = \
+ .. \
+ ../.. \
+ $(QPCPP)/source \
+ $(QP_PORT_DIR) \
+ $(QPCPP)/3rd_party/ek-lm3s811 \
+ $(QPCPP)/3rd_party/ek-lm3s811/gnu
+
+# list of all include directories needed by this project
+INCLUDES = \
+ -I../.. \
+ -I$(QPCPP)/include \
+ -I$(QPCPP)/source \
+ -I$(QP_PORT_DIR) \
+ -I$(QPCPP)/3rd_party/CMSIS/Include \
+ -I$(QPCPP)/3rd_party/ek-lm3s811
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# assembler source files
+ASM_SRCS :=
+
+# C source files
+C_SRCS := \
+ system_LM3S811.c \
+ startup_LM3S811.c \
+ display96x16x1.c
+
+# C++ source files
+CPP_SRCS := \
+ bsp.cpp \
+ main.cpp \
+ ship.cpp \
+ missile.cpp \
+ tunnel.cpp \
+ mine1.cpp \
+ mine2.cpp
+
+OUTPUT := $(PROJECT)
+LD_SCRIPT := $(PROJECT).ld
+
+QP_SRCS := \
+ qep_hsm.cpp \
+ qep_msm.cpp \
+ qf_act.cpp \
+ qf_actq.cpp \
+ qf_defer.cpp \
+ qf_dyn.cpp \
+ qf_mem.cpp \
+ qf_ps.cpp \
+ qf_qact.cpp \
+ qf_qeq.cpp \
+ qf_qmact.cpp \
+ qf_time.cpp \
+ qv.cpp
+
+QP_ASMS :=
+
+QS_SRCS := \
+ qs.cpp \
+ qs_fp.cpp
+
+LIB_DIRS :=
+LIBS :=
+
+# combine all the necessary soruces
+#
+VPATH += $(QPCPP)/3rd_party/gnu_cpp
+CPP_SRCS += $(QP_SRCS) mini_cpp.cpp
+ASM_SRCS += $(QP_ASMS)
+
+
+# defines
+DEFINES :=
+
+# ARM CPU, FPU, and Float-ABI types
+ARM_CPU := -mcpu=cortex-m3
+ARM_FPU :=
+FLOAT_ABI :=
+
+#-----------------------------------------------------------------------------
+# GNU-ARM toolset (NOTE: You need to adjust to your machine)
+# see http://gnutoolchains.com/arm-eabi/
+#
+ifeq ($(GNU_ARM),)
+GNU_ARM = C:/tools/gnu_arm-eabi
+endif
+
+# make sure that the GNU-ARM toolset exists...
+ifeq ("$(wildcard $(GNU_ARM))","")
+$(error GNU_ARM toolset not found. Please adjust the Makefile)
+endif
+
+CC := $(GNU_ARM)/bin/arm-eabi-gcc
+CPP := $(GNU_ARM)/bin/arm-eabi-g++
+AS := $(GNU_ARM)/bin/arm-eabi-as
+LINK := $(GNU_ARM)/bin/arm-eabi-g++
+BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
+
+##############################################################################
+# Typically, you should not need to change anything below this line
+
+# basic utilities (included in Qtools for Windows), see:
+# http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations for ARM Cortex-M4F
+#
+
+ifeq (rel, $(CONF)) # Release configuration ............................
+
+BIN_DIR := rel
+
+ASFLAGS = $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -Os $(INCLUDES) $(DEFINES) -DNDEBUG
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else ifeq (spy, $(CONF)) # Spy configuration ................................
+
+BIN_DIR := spy
+
+CPP_SRCS += $(QS_SRCS)
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+else # default Debug configuration .......................
+
+BIN_DIR := dbg
+
+ASFLAGS = -g $(ARM_CPU) -defsym=FPU_VFP_V4_SP_D16=1
+
+CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
+ -ffunction-sections -fdata-sections -O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
+ -ffunction-sections -fdata-sections -Wall -fno-rtti -fno-exceptions \
+ -O $(INCLUDES) $(DEFINES)
+
+LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
+ -mthumb -nostdlib \
+ -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
+
+endif
+
+ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
+C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
+CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
+
+TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
+TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
+ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
+C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_BIN)
+#all: $(TARGET_ELF)
+
+$(TARGET_BIN): $(TARGET_ELF)
+ $(BIN) -O binary $< $@
+
+$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
+ $(LINK) $(LINKFLAGS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+ $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+ $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+ $(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+ $(CPP) $(CPPFLAGS) -c $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+ endif
+endif
+
+
+.PHONY : clean
+clean:
+ -$(RM) $(BIN_DIR)/*.o \
+ $(BIN_DIR)/*.d \
+ $(BIN_DIR)/*.bin \
+ $(BIN_DIR)/*.elf \
+ $(BIN_DIR)/*.map
+
+show:
+ @echo PROJECT = $(PROJECT)
+ @echo CONF = $(CONF)
+ @echo ASM_SRCS = $(ASM_SRCS)
+ @echo C_SRCS = $(C_SRCS)
+ @echo CPP_SRCS = $(CPP_SRCS)
+ @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
+ @echo C_OBJS_EXT = $(C_OBJS_EXT)
+ @echo C_DEPS_EXT = $(C_DEPS_EXT)
+ @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+ @echo TARGET_ELF = $(TARGET_ELF)
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/gnu/flash.bat b/examples/arm-cm/game_ek-lm3s811/qv/gnu/flash.bat
new file mode 100644
index 00000000..544ab547
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/gnu/flash.bat
@@ -0,0 +1,28 @@
+::============================================================================
+:: Batch file to load the DPP program to the flash of EK-LM3S811
+::
+:: NOTE: requires the LMFlash programmer from Texas Instruments, see:
+:: http://www.ti.com/tool/LMFLASHPROGRAMMER
+::
+setlocal
+
+@echo off
+@echo Load the program to the flash of EK-LM3S811
+@echo usage: flash
+@echo usage: flash rel
+@echo usage: flash spy
+
+::----------------------------------------------------------------------------
+:: NOTE: Adjust the following symbol to the location of the
+:: LMFlash utility on your machine
+::
+set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe
+
+:: set the build directory depending on the first parameter %1
+set BUILD_DIR=dbg
+if [%1] NEQ [] set BUILD_DIR=%1
+@echo on
+
+%LMFLASH% -q ek-lm3s811 %BUILD_DIR%\game-qv.bin
+
+endlocal
\ No newline at end of file
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/gnu/game-qv.ld b/examples/arm-cm/game_ek-lm3s811/qv/gnu/game-qv.ld
new file mode 100644
index 00000000..99ea00f0
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/gnu/game-qv.ld
@@ -0,0 +1,135 @@
+/*****************************************************************************
+* Product: Linker script for for LM3S811, GNU-ARM linker
+* Last Updated for Version: 5.4.0
+* Date of the Last Update: 2015-04-05
+*
+* Q u a n t u m L e a P s
+* ---------------------------
+* innovating embedded systems
+*
+* Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+* Contact information:
+* Web : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(Reset_Handler) /* entry Point */
+
+MEMORY { /* memory map of LM3S811 */
+ ROM (rx) : ORIGIN = 0x00000000, LENGTH = 64K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
+}
+
+/* The size of the stack used by the application. NOTE: you need to adjust */
+STACK_SIZE = 1024;
+
+/* The size of the heap used by the application. NOTE: you need to adjust */
+HEAP_SIZE = 0;
+
+SECTIONS {
+
+ .isr_vector : { /* the vector table goes FIRST into ROM */
+ KEEP(*(.isr_vector)) /* vector table */
+ . = ALIGN(4);
+ } >ROM
+
+ .text : { /* code and constants */
+ . = ALIGN(4);
+ *(.text) /* .text sections (code) */
+ *(.text*) /* .text* sections (code) */
+ *(.rodata) /* .rodata sections (constants, strings, etc.) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+
+ KEEP (*(.init))
+ KEEP (*(.fini))
+
+ . = ALIGN(4);
+ } >ROM
+
+ .preinit_array : {
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP (*(.preinit_array*))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ } >ROM
+
+ .init_array : {
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array*))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ } >ROM
+
+ .fini_array : {
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP (*(.fini_array*))
+ KEEP (*(SORT(.fini_array.*)))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ } >ROM
+
+ _etext = .; /* global symbols at end of code */
+
+ .stack : {
+ __stack_start__ = .;
+ . = . + STACK_SIZE;
+ . = ALIGN(4);
+ __stack_end__ = .;
+ } >RAM
+
+ .data : AT (_etext) {
+ __data_load = LOADADDR (.data);
+ __data_start = .;
+ *(.data) /* .data sections */
+ *(.data*) /* .data* sections */
+ . = ALIGN(4);
+ __data_end__ = .;
+ _edata = __data_end__;
+ } >RAM
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .; /* define a global symbol at bss end */
+ __bss_end__ = .;
+ } >RAM
+
+ PROVIDE ( end = _ebss );
+ PROVIDE ( _end = _ebss );
+ PROVIDE ( __end__ = _ebss );
+
+ .heap : {
+ __heap_start__ = .;
+ . = . + HEAP_SIZE;
+ . = ALIGN(4);
+ __heap_end__ = .;
+ } >RAM
+
+ /* Remove information from the standard libraries */
+ /DISCARD/ : {
+ libc.a ( * )
+ libm.a ( * )
+ libgcc.a ( * )
+ }
+}
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/iar/README.txt b/examples/arm-cm/game_ek-lm3s811/qv/iar/README.txt
new file mode 100644
index 00000000..c342251b
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/iar/README.txt
@@ -0,0 +1,58 @@
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+About this Example
+==================
+This example demonstrates how to use the IAR EWARM IDE to build
+a QP application.
+
+
+IAR Project File
+----------------
+The IAR EWARM project file provided with this example uses relative paths
+to the QP/C framework location (includes, port). These relative paths must
+be modified when the project is moved to different relative location.
+
+
+Stack Size and Heap Size
+------------------------
+In this project, the size of the C stack and heap are determined in
+the linker script blinky-qk.icf (see the next section).
+
+
+Linker Script
+-------------
+The IAR linker script provides a template of the recommended linker script
+for QP applications. This file needs to be customized to set the
+application-specific sizes of the Stack and Heap. This file can be edited
+from the IAR EWARM IDE via the Project Options/Linker settings.
+
+
+Startup Code
+------------
+The startup code for the LM3S811 MCU used in this project is
+located in the "3rd_party" folder in the following location:
+
+3rd_party\ek-lm3s811\iar\startup_LM3S811.s
+
+The file startup_LM3S811.s provides a template of the recommended
+startup for QP applications and should be easily customizable for other
+ARM Cortex-M microcontrollers.
+
+The startup file typically does not need to be modified or adapted for
+applications. It provides only weak definitions of all exception and
+interrupt handlers, as well as the assert_failed() function.
+
+The weak function assert_failed() defined in this file might be re-defined
+in the application to customize it for the application-specific error-
+handling policy.
+
+***
+NOTE: The function assert_failed() typically should NOT use the stack,
+because stack might be corrupted by the time this function is called.
+Also, assert_failed() is intened to handle catastrophic errors and
+should NOT return.
+***
+
+
diff --git a/examples/arm-cm/game_ek-lm3s811/qv/iar/game-qv.ewp b/examples/arm-cm/game_ek-lm3s811/qv/iar/game-qv.ewp
new file mode 100644
index 00000000..74f73286
--- /dev/null
+++ b/examples/arm-cm/game_ek-lm3s811/qv/iar/game-qv.ewp
@@ -0,0 +1,2993 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 22
+ 1
+ 1
+
+ ExePath
+ dbg
+
+
+ ObjPath
+ dbg
+
+
+ ListPath
+ dbg
+
+
+ Variant
+ 21
+ 38
+
+
+ GEndianMode
+ 0
+
+
+ Input variant
+ 3
+ 6
+
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+
+ Input description
+ No specifier n, no float nor long long, no scan set, no assignment suppressing.
+
+
+ Output variant
+ 2
+ 7
+
+
+ Output description
+ No specifier a, A, no specifier n, no float nor long long, no flags.
+
+
+ GOutputBinary
+ 0
+
+
+ FPU
+ 5
+ 0
+
+
+ OGCoreOrChip
+ 1
+
+
+ GRuntimeLibSelect
+ 0
+ 1
+
+
+ GRuntimeLibSelectSlave
+ 0
+ 1
+
+
+ RTDescription
+ Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.
+