同步最新代码
This commit is contained in:
54
.gitignore
vendored
Normal file
54
.gitignore
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# ---> C
|
||||||
|
# Prerequisites
|
||||||
|
*.d
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
*.o
|
||||||
|
*.ko
|
||||||
|
*.obj
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
# Linker output
|
||||||
|
*.ilk
|
||||||
|
*.map
|
||||||
|
*.exp
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Libraries
|
||||||
|
*.lib
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
|
||||||
|
# Shared objects (inc. Windows DLLs)
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
*.i*86
|
||||||
|
*.x86_64
|
||||||
|
*.hex
|
||||||
|
|
||||||
|
# Debug files
|
||||||
|
*.dSYM/
|
||||||
|
*.su
|
||||||
|
*.idb
|
||||||
|
*.pdb
|
||||||
|
|
||||||
|
# Kernel Module Compile Results
|
||||||
|
*.mod*
|
||||||
|
*.cmd
|
||||||
|
.tmp_versions/
|
||||||
|
modules.order
|
||||||
|
Module.symvers
|
||||||
|
Mkfile.old
|
||||||
|
dkms.conf
|
||||||
|
|
||||||
232
LICENSE
Normal file
232
LICENSE
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
New-Infantry-C-Board-Legacy
|
||||||
|
Copyright (C) 2025 ELCT
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
New-Infantry-C-Board-Legacy Copyright (C) 2025 ELCT
|
||||||
|
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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
4
README.md
Normal file
4
README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# New-Infantry-C-Board-Legacy
|
||||||
|
|
||||||
|
@Peng Ge的全向轮步兵代码,基于C板,使用标准库编写
|
||||||
|
编译器使用Keil V5
|
||||||
18
云台/.vscode/c_cpp_properties.json
vendored
Normal file
18
云台/.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "windows-cygwin-gcc-x64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "C:/cygwin64/bin/gcc.exe",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "linux-gcc-x64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
24
云台/.vscode/launch.json
vendored
Normal file
24
云台/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "C/C++ Runner: Debug Session",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": true,
|
||||||
|
"cwd": "f:/Mas_Infantry_Control-main/开源代码/V1.0/new-infantry/云台/云台/Function",
|
||||||
|
"program": "f:/Mas_Infantry_Control-main/开源代码/V1.0/new-infantry/云台/云台/Function/build/Debug/outDebug",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
59
云台/.vscode/settings.json
vendored
Normal file
59
云台/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
|
"C_Cpp_Runner.cStandard": "",
|
||||||
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
|
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||||
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
|
"C_Cpp_Runner.warnings": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wpedantic",
|
||||||
|
"-Wshadow",
|
||||||
|
"-Wformat=2",
|
||||||
|
"-Wcast-align",
|
||||||
|
"-Wconversion",
|
||||||
|
"-Wsign-conversion",
|
||||||
|
"-Wnull-dereference"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
|
"/W4",
|
||||||
|
"/permissive-",
|
||||||
|
"/w14242",
|
||||||
|
"/w14287",
|
||||||
|
"/w14296",
|
||||||
|
"/w14311",
|
||||||
|
"/w14826",
|
||||||
|
"/w44062",
|
||||||
|
"/w44242",
|
||||||
|
"/w14905",
|
||||||
|
"/w14906",
|
||||||
|
"/w14263",
|
||||||
|
"/w44265",
|
||||||
|
"/w14928"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
|
"C_Cpp_Runner.includePaths": [],
|
||||||
|
"C_Cpp_Runner.includeSearch": [
|
||||||
|
"*",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
|
"**/build",
|
||||||
|
"**/build/**",
|
||||||
|
"**/.*",
|
||||||
|
"**/.*/**",
|
||||||
|
"**/.vscode",
|
||||||
|
"**/.vscode/**"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
|
}
|
||||||
20
云台/云台/.clang-format
Normal file
20
云台/云台/.clang-format
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# For more options, open this url: https://clang.llvm.net.cn/docs/ClangFormatStyleOptions.html
|
||||||
|
---
|
||||||
|
BasedOnStyle: Microsoft
|
||||||
|
IndentWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
TabWidth: 4
|
||||||
|
ColumnLimit: 0
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
NamespaceIndentation: All
|
||||||
|
FixNamespaceComments: false
|
||||||
|
BreakBeforeBraces: Linux
|
||||||
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AllowShortBlocksOnASingleLine: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
SortIncludes: false
|
||||||
|
AlignConsecutiveMacros: AcrossEmptyLines
|
||||||
|
AlignConsecutiveAssignments: Consecutive
|
||||||
100
云台/云台/.cmsis/device/ARM/ARMCA5/Config/mem_ARMCA5.h
Normal file
100
云台/云台/.cmsis/device/ARM/ARMCA5/Config/mem_ARMCA5.h
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mem_ARMCA5.h
|
||||||
|
* @brief Memory base and size definitions (used in scatter file)
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MEM_ARMCA5_H
|
||||||
|
#define __MEM_ARMCA5_H
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/*
|
||||||
|
//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- ROM Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> ROM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> ROM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x80000000
|
||||||
|
#define __ROM_SIZE 0x00200000
|
||||||
|
|
||||||
|
/*--------------------- RAM Configuration -----------------------------------
|
||||||
|
// <h> RAM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> RAM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> RAM Total Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <h> Data Sections
|
||||||
|
// <o2> RW_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o3> ZI_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// <h> Stack / Heap Configuration
|
||||||
|
// <o4> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o5> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <h> Exceptional Modes
|
||||||
|
// <o6> UND Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o7> ABT Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o8> SVC Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o9> IRQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o10> FIQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x80200000
|
||||||
|
#define __RAM_SIZE 0x00200000
|
||||||
|
|
||||||
|
#define __RW_DATA_SIZE 0x00100000
|
||||||
|
#define __ZI_DATA_SIZE 0x000F0000
|
||||||
|
|
||||||
|
#define __STACK_SIZE 0x00001000
|
||||||
|
#define __HEAP_SIZE 0x00008000
|
||||||
|
|
||||||
|
#define __UND_STACK_SIZE 0x00000100
|
||||||
|
#define __ABT_STACK_SIZE 0x00000100
|
||||||
|
#define __SVC_STACK_SIZE 0x00000100
|
||||||
|
#define __IRQ_STACK_SIZE 0x00000100
|
||||||
|
#define __FIQ_STACK_SIZE 0x00000100
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*--------------------- TTB Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> TTB Configuration
|
||||||
|
// <i> The TLB L1 contains 4096 32-bit entries and must be 16kB aligned
|
||||||
|
// <i> The TLB L2 entries are placed after the L1 in the MMU config
|
||||||
|
// <o0> TTB Base Address <0x0-0xFFFFFFFF:0x4000>
|
||||||
|
// <o1> TTB Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __TTB_BASE 0x80500000
|
||||||
|
#define __TTB_SIZE 0x00005000
|
||||||
|
|
||||||
|
#endif /* __MEM_ARMCA5_H */
|
||||||
65
云台/云台/.cmsis/device/ARM/ARMCA5/Config/system_ARMCA5.h
Normal file
65
云台/云台/.cmsis/device/ARM/ARMCA5/Config/system_ARMCA5.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA5.h
|
||||||
|
* @brief CMSIS Device System Header File for Arm Cortex-A5 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSTEM_ARMCA5_H
|
||||||
|
#define __SYSTEM_ARMCA5_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Create Translation Table.
|
||||||
|
|
||||||
|
Creates Memory Management Unit Translation Table.
|
||||||
|
*/
|
||||||
|
extern void MMU_CreateTranslationTable(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SYSTEM_ARMCA5_H */
|
||||||
138
云台/云台/.cmsis/device/ARM/ARMCA5/Include/ARMCA5.h
Normal file
138
云台/云台/.cmsis/device/ARM/ARMCA5/Include/ARMCA5.h
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file ARMCA5.h
|
||||||
|
* @brief CMSIS Cortex-A5 Core Peripheral Access Layer Header File
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ARMCA5_H__
|
||||||
|
#define __ARMCA5_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/****** SGI Interrupts Numbers ****************************************/
|
||||||
|
SGI0_IRQn = 0, /*!< Software Generated Interrupt 0 */
|
||||||
|
SGI1_IRQn = 1, /*!< Software Generated Interrupt 1 */
|
||||||
|
SGI2_IRQn = 2, /*!< Software Generated Interrupt 2 */
|
||||||
|
SGI3_IRQn = 3, /*!< Software Generated Interrupt 3 */
|
||||||
|
SGI4_IRQn = 4, /*!< Software Generated Interrupt 4 */
|
||||||
|
SGI5_IRQn = 5, /*!< Software Generated Interrupt 5 */
|
||||||
|
SGI6_IRQn = 6, /*!< Software Generated Interrupt 6 */
|
||||||
|
SGI7_IRQn = 7, /*!< Software Generated Interrupt 7 */
|
||||||
|
SGI8_IRQn = 8, /*!< Software Generated Interrupt 8 */
|
||||||
|
SGI9_IRQn = 9, /*!< Software Generated Interrupt 9 */
|
||||||
|
SGI10_IRQn = 10, /*!< Software Generated Interrupt 10 */
|
||||||
|
SGI11_IRQn = 11, /*!< Software Generated Interrupt 11 */
|
||||||
|
SGI12_IRQn = 12, /*!< Software Generated Interrupt 12 */
|
||||||
|
SGI13_IRQn = 13, /*!< Software Generated Interrupt 13 */
|
||||||
|
SGI14_IRQn = 14, /*!< Software Generated Interrupt 14 */
|
||||||
|
SGI15_IRQn = 15, /*!< Software Generated Interrupt 15 */
|
||||||
|
|
||||||
|
/****** Cortex-A5 Processor Exceptions Numbers ****************************************/
|
||||||
|
GlobalTimer_IRQn = 27, /*!< Global Timer Interrupt */
|
||||||
|
PrivTimer_IRQn = 29, /*!< Private Timer Interrupt */
|
||||||
|
PrivWatchdog_IRQn = 30, /*!< Private Watchdog Interrupt */
|
||||||
|
|
||||||
|
/****** Platform Exceptions Numbers ***************************************************/
|
||||||
|
Watchdog_IRQn = 32, /*!< SP805 Interrupt */
|
||||||
|
Timer0_IRQn = 34, /*!< SP804 Interrupt */
|
||||||
|
Timer1_IRQn = 35, /*!< SP804 Interrupt */
|
||||||
|
RTClock_IRQn = 36, /*!< PL031 Interrupt */
|
||||||
|
UART0_IRQn = 37, /*!< PL011 Interrupt */
|
||||||
|
UART1_IRQn = 38, /*!< PL011 Interrupt */
|
||||||
|
UART2_IRQn = 39, /*!< PL011 Interrupt */
|
||||||
|
UART3_IRQn = 40, /*!< PL011 Interrupt */
|
||||||
|
MCI0_IRQn = 41, /*!< PL180 Interrupt (1st) */
|
||||||
|
MCI1_IRQn = 42, /*!< PL180 Interrupt (2nd) */
|
||||||
|
AACI_IRQn = 43, /*!< PL041 Interrupt */
|
||||||
|
Keyboard_IRQn = 44, /*!< PL050 Interrupt */
|
||||||
|
Mouse_IRQn = 45, /*!< PL050 Interrupt */
|
||||||
|
CLCD_IRQn = 46, /*!< PL111 Interrupt */
|
||||||
|
Ethernet_IRQn = 47, /*!< SMSC_91C111 Interrupt */
|
||||||
|
VFS2_IRQn = 73, /*!< VFS2 Interrupt */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Peripheral memory map */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Peripheral and RAM base address */
|
||||||
|
#define VE_A5_MP_FLASH_BASE0 (0x00000000UL) /*!< (FLASH0 ) Base Address */
|
||||||
|
#define VE_A5_MP_FLASH_BASE1 (0x0C000000UL) /*!< (FLASH1 ) Base Address */
|
||||||
|
#define VE_A5_MP_SRAM_BASE (0x14000000UL) /*!< (SRAM ) Base Address */
|
||||||
|
#define VE_A5_MP_PERIPH_BASE_CS2 (0x18000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A5_MP_VRAM_BASE (0x00000000UL + VE_A5_MP_PERIPH_BASE_CS2) /*!< (VRAM ) Base Address */
|
||||||
|
#define VE_A5_MP_ETHERNET_BASE (0x02000000UL + VE_A5_MP_PERIPH_BASE_CS2) /*!< (ETHERNET ) Base Address */
|
||||||
|
#define VE_A5_MP_USB_BASE (0x03000000UL + VE_A5_MP_PERIPH_BASE_CS2) /*!< (USB ) Base Address */
|
||||||
|
#define VE_A5_MP_PERIPH_BASE_CS3 (0x1C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A5_MP_DAP_BASE (0x00000000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (LOCAL DAP ) Base Address */
|
||||||
|
#define VE_A5_MP_SYSTEM_REG_BASE (0x00010000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (SYSTEM REG ) Base Address */
|
||||||
|
#define VE_A5_MP_SERIAL_BASE (0x00030000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (SERIAL ) Base Address */
|
||||||
|
#define VE_A5_MP_AACI_BASE (0x00040000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (AACI ) Base Address */
|
||||||
|
#define VE_A5_MP_MMCI_BASE (0x00050000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (MMCI ) Base Address */
|
||||||
|
#define VE_A5_MP_KMI0_BASE (0x00060000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (KMI0 ) Base Address */
|
||||||
|
#define VE_A5_MP_UART_BASE (0x00090000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (UART ) Base Address */
|
||||||
|
#define VE_A5_MP_WDT_BASE (0x000F0000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (WDT ) Base Address */
|
||||||
|
#define VE_A5_MP_TIMER_BASE (0x00110000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (TIMER ) Base Address */
|
||||||
|
#define VE_A5_MP_DVI_BASE (0x00160000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (DVI ) Base Address */
|
||||||
|
#define VE_A5_MP_RTC_BASE (0x00170000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (RTC ) Base Address */
|
||||||
|
#define VE_A5_MP_UART4_BASE (0x001B0000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (UART4 ) Base Address */
|
||||||
|
#define VE_A5_MP_CLCD_BASE (0x001F0000UL + VE_A5_MP_PERIPH_BASE_CS3) /*!< (CLCD ) Base Address */
|
||||||
|
#define VE_A5_MP_PRIVATE_PERIPH_BASE (0x2C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A5_MP_GIC_DISTRIBUTOR_BASE (0x00001000UL + VE_A5_MP_PRIVATE_PERIPH_BASE) /*!< (GIC DIST ) Base Address */
|
||||||
|
#define VE_A5_MP_GIC_INTERFACE_BASE (0x00000100UL + VE_A5_MP_PRIVATE_PERIPH_BASE) /*!< (GIC CPU IF ) Base Address */
|
||||||
|
#define VE_A5_MP_PRIVATE_TIMER (0x00000600UL + VE_A5_MP_PRIVATE_PERIPH_BASE) /*!< (PTIM ) Base Address */
|
||||||
|
#define VE_A5_MP_PL310_BASE (0x000F0000UL + VE_A5_MP_PRIVATE_PERIPH_BASE) /*!< (L2C-310 ) Base Address */
|
||||||
|
#define VE_A5_MP_SSRAM_BASE (0x2E000000UL) /*!< (System SRAM) Base Address */
|
||||||
|
#define VE_A5_MP_DRAM_BASE (0x80000000UL) /*!< (DRAM ) Base Address */
|
||||||
|
#define GIC_DISTRIBUTOR_BASE VE_A5_MP_GIC_DISTRIBUTOR_BASE
|
||||||
|
#define GIC_INTERFACE_BASE VE_A5_MP_GIC_INTERFACE_BASE
|
||||||
|
#define TIMER_BASE VE_A5_MP_PRIVATE_TIMER
|
||||||
|
|
||||||
|
//The VE-A5 model implements L1 cache as architecturally defined, but does not implement L2 cache.
|
||||||
|
//Do not enable the L2 cache if you are running RTX on a VE-A5 model as it may cause a data abort.
|
||||||
|
#define L2C_310_BASE VE_A5_MP_PL310_BASE
|
||||||
|
|
||||||
|
/* -------- Configuration of the Cortex-A5 Processor and Core Peripherals ------- */
|
||||||
|
#define __CA_REV 0x0000U /* Core revision r0p0 */
|
||||||
|
#define __CORTEX_A 5U /* Cortex-A5 Core */
|
||||||
|
#define __FPU_PRESENT 1U /* FPU present */
|
||||||
|
#define __GIC_PRESENT 1U /* GIC present */
|
||||||
|
#define __TIM_PRESENT 1U /* TIM present */
|
||||||
|
#define __L2C_PRESENT 0U /* L2C present */
|
||||||
|
|
||||||
|
#include "core_ca.h"
|
||||||
|
#include <system_ARMCA5.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __ARMCA5_H__
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC5/ARMCA5.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC5/ARMCA5.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armcc -E
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA5.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
151
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC5/startup_ARMCA5.c
Normal file
151
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC5/startup_ARMCA5.c
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA5.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A5 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA5.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((section("RESET")));
|
||||||
|
void Reset_Handler (void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Vectors(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
IMPORT Undef_Handler
|
||||||
|
IMPORT SVC_Handler
|
||||||
|
IMPORT PAbt_Handler
|
||||||
|
IMPORT DAbt_Handler
|
||||||
|
IMPORT IRQ_Handler
|
||||||
|
IMPORT FIQ_Handler
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Reset_Handler(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5 // Read MPIDR
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
IMPORT |Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =|Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =|Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =|Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =|Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =|Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =|Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
IMPORT SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
IMPORT __main
|
||||||
|
BL __main
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC6/ARMCA5.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC6/ARMCA5.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-a5 -xc
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA5.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC6/startup_ARMCA5.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA5/Source/AC6/startup_ARMCA5.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA5.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A5 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA5.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void) __attribute__ ((noreturn));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$ARM_LIB_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL __main \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
181
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/ARMCA5.ld
Normal file
181
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/ARMCA5.ld
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
#include "mem_ARMCA5.h"
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
ROM (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
L_TTB (rw) : ORIGIN = __TTB_BASE, LENGTH = __TTB_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
|
||||||
|
Image$$VECTORS$$Base = .;
|
||||||
|
* (RESET)
|
||||||
|
KEEP(*(.isr_vector))
|
||||||
|
Image$$VECTORS$$Limit = .;
|
||||||
|
|
||||||
|
*(SVC_TABLE)
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
Image$$RO_DATA$$Base = .;
|
||||||
|
*(.rodata*)
|
||||||
|
Image$$RO_DATA$$Limit = .;
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > ROM
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG (__data_end__ - __data_start__)
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
LONG (__bss_start__)
|
||||||
|
LONG (__bss_end__ - __bss_start__)
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__etext = .;
|
||||||
|
|
||||||
|
.ttb :
|
||||||
|
{
|
||||||
|
Image$$TTB$$ZI$$Base = .;
|
||||||
|
. += __TTB_SIZE;
|
||||||
|
Image$$TTB$$ZI$$Limit = .;
|
||||||
|
} > L_TTB
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
Image$$RW_DATA$$Base = .;
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data*)
|
||||||
|
Image$$RW_DATA$$Limit = .;
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
|
||||||
|
.bss ALIGN(0x400):
|
||||||
|
{
|
||||||
|
Image$$ZI_DATA$$Base = .;
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
__bss_end__ = .;
|
||||||
|
Image$$ZI_DATA$$Limit = .;
|
||||||
|
__end__ = .;
|
||||||
|
end = __end__;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
#if defined(__HEAP_SIZE) && (__HEAP_SIZE > 0)
|
||||||
|
.heap (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
Image$$HEAP$$ZI$$Base = .;
|
||||||
|
. += __HEAP_SIZE;
|
||||||
|
Image$$HEAP$$ZI$$Limit = .;
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.stack (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE - __FIQ_STACK_SIZE - __IRQ_STACK_SIZE - __SVC_STACK_SIZE - __ABT_STACK_SIZE - __UND_STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
|
||||||
|
__StackTop = .;
|
||||||
|
Image$$SYS_STACK$$ZI$$Base = .;
|
||||||
|
. += __STACK_SIZE;
|
||||||
|
Image$$SYS_STACK$$ZI$$Limit = .;
|
||||||
|
__stack = .;
|
||||||
|
|
||||||
|
Image$$FIQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __FIQ_STACK_SIZE;
|
||||||
|
Image$$FIQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$IRQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __IRQ_STACK_SIZE;
|
||||||
|
Image$$IRQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$SVC_STACK$$ZI$$Base = .;
|
||||||
|
. += __SVC_STACK_SIZE;
|
||||||
|
Image$$SVC_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$ABT_STACK$$ZI$$Base = .;
|
||||||
|
. += __ABT_STACK_SIZE;
|
||||||
|
Image$$ABT_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$UND_STACK$$ZI$$Base = .;
|
||||||
|
. += __UND_STACK_SIZE;
|
||||||
|
Image$$UND_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
}
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/ARMCA5.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/ARMCA5.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-a5 -xc
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA5.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/startup_ARMCA5.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA5/Source/GCC/startup_ARMCA5.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA5.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A5 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA5.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$SYS_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL _start \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
67
云台/云台/.cmsis/device/ARM/ARMCA5/Source/IAR/ARMCA5.icf
Normal file
67
云台/云台/.cmsis/device/ARM/ARMCA5/Source/IAR/ARMCA5.icf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
/*-Memory Regions-*/
|
||||||
|
define symbol __ICFEDIT_region_IROM1_start__ = 0x80000000;
|
||||||
|
define symbol __ICFEDIT_region_IROM1_end__ = 0x801FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_start__ = 0x80200000;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_end__ = 0x803FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_TTB_start__ = 0x80500000;
|
||||||
|
define symbol __ICFEDIT_region_TTB_end__ = 0x805FFFFF;
|
||||||
|
|
||||||
|
/*-Sizes-*/
|
||||||
|
define symbol __ICFEDIT_size_cstack__ = 0x1000;
|
||||||
|
define symbol __ICFEDIT_size_irqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_svcstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_abtstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_undstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_heap__ = 0x8000;
|
||||||
|
define symbol __ICFEDIT_size_ttb__ = 0x4000;
|
||||||
|
|
||||||
|
define memory mem with size = 4G;
|
||||||
|
define region IROM_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__];
|
||||||
|
define region IRAM_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__];
|
||||||
|
define region ERAM_region = mem:[from __ICFEDIT_region_ERAM1_start__ to __ICFEDIT_region_ERAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM2_start__ to __ICFEDIT_region_ERAM2_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM3_start__ to __ICFEDIT_region_ERAM3_end__];
|
||||||
|
define region TTB_region = mem:[from __ICFEDIT_region_TTB_start__ to __ICFEDIT_region_TTB_end__ ];
|
||||||
|
|
||||||
|
define block USR_STACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||||
|
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
|
||||||
|
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
|
||||||
|
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
|
||||||
|
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
|
||||||
|
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
|
||||||
|
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||||
|
define block TTB with alignment = 8, size = __ICFEDIT_size_ttb__ { section TTB };
|
||||||
|
|
||||||
|
do not initialize { section .noinit };
|
||||||
|
|
||||||
|
initialize by copy { readwrite };
|
||||||
|
if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
|
||||||
|
{
|
||||||
|
// Required in a multi-threaded application
|
||||||
|
initialize by copy with packing = none { section __DLIB_PERTHREAD };
|
||||||
|
}
|
||||||
|
|
||||||
|
place at address mem:__ICFEDIT_region_IROM1_start__ { readonly section RESET };
|
||||||
|
place in IROM_region { readonly };
|
||||||
|
place in IRAM_region { readwrite, block HEAP, block USR_STACK, block IRQ_STACK, block FIQ_STACK, block SVC_STACK, block ABT_STACK, block UND_STACK };
|
||||||
|
place in TTB_region { block TTB };
|
||||||
140
云台/云台/.cmsis/device/ARM/ARMCA5/Source/IAR/startup_ARMCA5.s
Normal file
140
云台/云台/.cmsis/device/ARM/ARMCA5/Source/IAR/startup_ARMCA5.s
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA9.s
|
||||||
|
* @brief CMSIS Device System Source File for ARM Cortex-A5 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 01 Nov 2017
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MODULE ?startup_ARMCA5
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
PUBLIC Reset_Handler
|
||||||
|
PUBWEAK Undef_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PAbt_Handler
|
||||||
|
PUBWEAK DAbt_Handler
|
||||||
|
PUBWEAK IRQ_Handler
|
||||||
|
PUBWEAK FIQ_Handler
|
||||||
|
|
||||||
|
SECTION SVC_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION IRQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION FIQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION ABT_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION UND_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION USR_STACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
section RESET:CODE:NOROOT(2)
|
||||||
|
PUBLIC Vectors
|
||||||
|
|
||||||
|
Vectors:
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
|
||||||
|
|
||||||
|
section .text:CODE:NOROOT(4)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
EXTERN SystemInit
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
|
||||||
|
Reset_Handler:
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep:
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exception mode
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =SFE(FIQ_STACK)
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =SFE(IRQ_STACK)
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =SFE(SVC_STACK)
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =SFE(ABT_STACK)
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =SFE(UND_STACK)
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =SFE(USR_STACK)
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __iar_program_start
|
||||||
|
BL __iar_program_start
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
Undef_Handler:
|
||||||
|
SVC_Handler:
|
||||||
|
PAbt_Handler:
|
||||||
|
DAbt_Handler:
|
||||||
|
IRQ_Handler:
|
||||||
|
FIQ_Handler:
|
||||||
|
Default_Handler:
|
||||||
|
B .
|
||||||
|
|
||||||
|
END
|
||||||
232
云台/云台/.cmsis/device/ARM/ARMCA5/Source/mmu_ARMCA5.c
Normal file
232
云台/云台/.cmsis/device/ARM/ARMCA5/Source/mmu_ARMCA5.c
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mmu_ARMCA5.c
|
||||||
|
* @brief MMU Configuration for ARM Cortex-A5 Device Series
|
||||||
|
* @version V1.2.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Memory map description from: DUI0447G_v2m_p1_trm.pdf 4.2.2 Arm Cortex-A Series memory map
|
||||||
|
|
||||||
|
Memory Type
|
||||||
|
0xffffffff |--------------------------| ------------
|
||||||
|
| FLAG SYNC | Device Memory
|
||||||
|
0xfffff000 |--------------------------| ------------
|
||||||
|
| Fault | Fault
|
||||||
|
0xfff00000 |--------------------------| ------------
|
||||||
|
| | Normal
|
||||||
|
| |
|
||||||
|
| Daughterboard |
|
||||||
|
| memory |
|
||||||
|
| |
|
||||||
|
0x80505000 |--------------------------| ------------
|
||||||
|
|TTB (L2 Sync Flags ) 4k | Normal
|
||||||
|
0x80504C00 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-B) 16k| Normal
|
||||||
|
0x80504800 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-A) 16k| Normal
|
||||||
|
0x80504400 |--------------------------| ------------
|
||||||
|
|TTB (L2 Priv Periphs) 4k | Normal
|
||||||
|
0x80504000 |--------------------------| ------------
|
||||||
|
| TTB (L1 Descriptors) | Normal
|
||||||
|
0x80500000 |--------------------------| ------------
|
||||||
|
| Stack | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| Heap | Normal
|
||||||
|
0x80400000 |--------------------------| ------------
|
||||||
|
| ZI Data | Normal
|
||||||
|
0x80300000 |--------------------------| ------------
|
||||||
|
| RW Data | Normal
|
||||||
|
0x80200000 |--------------------------| ------------
|
||||||
|
| RO Data | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| RO Code | USH Normal
|
||||||
|
0x80000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| HSB AXI buses |
|
||||||
|
0x40000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x2c002000 |--------------------------| ------------
|
||||||
|
| Private Address | Device Memory
|
||||||
|
0x2c000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x20000000 |--------------------------| ------------
|
||||||
|
| Peripherals | Device Memory RW/RO
|
||||||
|
| | & Fault
|
||||||
|
0x00000000 |--------------------------|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// L1 Cache info and restrictions about architecture of the caches (CCSIR register):
|
||||||
|
// Write-Through support *not* available
|
||||||
|
// Write-Back support available.
|
||||||
|
// Read allocation support available.
|
||||||
|
// Write allocation support available.
|
||||||
|
|
||||||
|
//Note: You should use the Shareable attribute carefully.
|
||||||
|
//For cores without coherency logic (such as SCU) marking a region as shareable forces the processor to not cache that region regardless of the inner cache settings.
|
||||||
|
//Cortex-A versions of RTX use LDREX/STREX instructions relying on Local monitors. Local monitors will be used only when the region gets cached, regions that are not cached will use the Global Monitor.
|
||||||
|
//Some Cortex-A implementations do not include Global Monitors, so wrongly setting the attribute Shareable may cause STREX to fail.
|
||||||
|
|
||||||
|
//Recall: When the Shareable attribute is applied to a memory region that is not Write-Back, Normal memory, data held in this region is treated as Non-cacheable.
|
||||||
|
//When SMP bit = 0, Inner WB/WA Cacheable Shareable attributes are treated as Non-cacheable.
|
||||||
|
//When SMP bit = 1, Inner WB/WA Cacheable Shareable attributes are treated as Cacheable.
|
||||||
|
|
||||||
|
|
||||||
|
//Following MMU configuration is expected
|
||||||
|
//SCTLR.AFE == 1 (Simplified access permissions model - AP[2:1] define access permissions, AP[0] is an access flag)
|
||||||
|
//SCTLR.TRE == 0 (TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor)
|
||||||
|
//Domain 0 is always the Client domain
|
||||||
|
//Descriptors should place all memory in domain 0
|
||||||
|
|
||||||
|
#include "ARMCA5.h"
|
||||||
|
#include "mem_ARMCA5.h"
|
||||||
|
|
||||||
|
// TTB base address
|
||||||
|
#define TTB_BASE ((uint32_t*)__TTB_BASE)
|
||||||
|
|
||||||
|
// L2 table pointers
|
||||||
|
//----------------------------------------
|
||||||
|
#define TTB_L1_SIZE (0x00004000) // The L1 translation table divides the full 4GB address space of a 32-bit core
|
||||||
|
// into 4096 equally sized sections, each of which describes 1MB of virtual memory space.
|
||||||
|
// The L1 translation table therefore contains 4096 32-bit (word-sized) entries.
|
||||||
|
|
||||||
|
#define PRIVATE_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE) // Map 4k Private Address space
|
||||||
|
#define PERIPHERAL_A_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x400) // Map 64k Peripheral #1 0x1C000000 - 0x1C00FFFFF
|
||||||
|
#define PERIPHERAL_B_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x800) // Map 64k Peripheral #2 0x1C100000 - 0x1C1FFFFFF
|
||||||
|
#define SYNC_FLAGS_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE + 0xC00) // Map 4k Flag synchronization
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
#define PERIPHERAL_A_FAULT (0x00000000 + 0x1c000000) //0x1C000000-0x1C00FFFF (1M)
|
||||||
|
#define PERIPHERAL_B_FAULT (0x00100000 + 0x1c000000) //0x1C100000-0x1C10FFFF (1M)
|
||||||
|
|
||||||
|
//--------------------- SYNC FLAGS --------------------
|
||||||
|
#define FLAG_SYNC 0xFFFFF000
|
||||||
|
#define F_SYNC_BASE 0xFFF00000 //1M aligned
|
||||||
|
|
||||||
|
static uint32_t Sect_Normal; //outer & inner wb/wa, non-shareable, executable, rw, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_Cod; //outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_RO; //as Sect_Normal_Cod, but not executable
|
||||||
|
static uint32_t Sect_Normal_RW; //as Sect_Normal_Cod, but writeable and not executable
|
||||||
|
static uint32_t Sect_Device_RO; //device, non-shareable, non-executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Device_RW; //as Sect_Device_RO, but writeable
|
||||||
|
|
||||||
|
/* Define global descriptors */
|
||||||
|
static uint32_t Page_L1_4k = 0x0; //generic
|
||||||
|
static uint32_t Page_L1_64k = 0x0; //generic
|
||||||
|
static uint32_t Page_4k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
static uint32_t Page_64k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
|
||||||
|
void MMU_CreateTranslationTable(void)
|
||||||
|
{
|
||||||
|
mmu_region_attributes_Type region;
|
||||||
|
|
||||||
|
//Create 4GB of faulting entries
|
||||||
|
MMU_TTSection (TTB_BASE, 0, 4096, DESCRIPTOR_FAULT);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generate descriptors. Refer to core_ca.h to get information about attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Create descriptors for Vectors, RO, RW, ZI sections
|
||||||
|
section_normal(Sect_Normal, region);
|
||||||
|
section_normal_cod(Sect_Normal_Cod, region);
|
||||||
|
section_normal_ro(Sect_Normal_RO, region);
|
||||||
|
section_normal_rw(Sect_Normal_RW, region);
|
||||||
|
//Create descriptors for peripherals
|
||||||
|
section_device_ro(Sect_Device_RO, region);
|
||||||
|
section_device_rw(Sect_Device_RW, region);
|
||||||
|
//Create descriptors for 64k pages
|
||||||
|
page64k_device_rw(Page_L1_64k, Page_64k_Device_RW, region);
|
||||||
|
//Create descriptors for 4k pages
|
||||||
|
page4k_device_rw(Page_L1_4k, Page_4k_Device_RW, region);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define MMU flat-map regions and attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Define Image
|
||||||
|
MMU_TTSection (TTB_BASE, __ROM_BASE, __ROM_SIZE/0x100000, Sect_Normal_Cod); // multiple of 1MB sections
|
||||||
|
MMU_TTSection (TTB_BASE, __RAM_BASE, __RAM_SIZE/0x100000, Sect_Normal_RW); // multiple of 1MB sections
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_FLASH_BASE0 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_FLASH_BASE1 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_SRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_VRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_ETHERNET_BASE , 16, Sect_Device_RW);
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A5_MP_USB_BASE , 16, Sect_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_A_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_DAP_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_SYSTEM_REG_BASE, 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_SERIAL_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_AACI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_MMCI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_KMI0_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_UART_BASE , 4, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_WDT_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_B_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_TIMER_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_DVI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_RTC_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_UART4_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A5_MP_CLCD_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to cover private address space. Needs to be marked as Device memory
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() ,256, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define private address space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() , 3, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
// Define L2CC entry. Uncomment if PL310 is present
|
||||||
|
// MMU_TTPage4k (TTB_BASE, VE_A5_MP_PL310_BASE , 1, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to synchronization space (Useful if some non-cacheable DMA agent is present in the SoC)
|
||||||
|
MMU_TTPage4k (TTB_BASE, F_SYNC_BASE , 256, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define synchronization space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, FLAG_SYNC , 1, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
/* Set location of level 1 page table
|
||||||
|
; 31:14 - Translation table base addr (31:14-TTBCR.N, TTBCR.N is 0 out of reset)
|
||||||
|
; 13:7 - 0x0
|
||||||
|
; 6 - IRGN[0] 0x1 (Inner WB WA)
|
||||||
|
; 5 - NOS 0x0 (Non-shared)
|
||||||
|
; 4:3 - RGN 0x01 (Outer WB WA)
|
||||||
|
; 2 - IMP 0x0 (Implementation Defined)
|
||||||
|
; 1 - S 0x0 (Non-shared)
|
||||||
|
; 0 - IRGN[1] 0x0 (Inner WB WA) */
|
||||||
|
__set_TTBR0(__TTB_BASE | 0x48);
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
/* Set up domain access control register
|
||||||
|
; We set domain 0 to Client and all other domains to No Access.
|
||||||
|
; All translation table entries specify domain 0 */
|
||||||
|
__set_DACR(1);
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
93
云台/云台/.cmsis/device/ARM/ARMCA5/Source/system_ARMCA5.c
Normal file
93
云台/云台/.cmsis/device/ARM/ARMCA5/Source/system_ARMCA5.c
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA5.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A5 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 13. February 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "RTE_Components.h"
|
||||||
|
#include CMSIS_device_header
|
||||||
|
#include "irq_ctrl.h"
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK 12000000U
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Initialization
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
/* do not use global variables because this function is called before
|
||||||
|
reaching pre-main. RW section may be overwritten afterwards. */
|
||||||
|
|
||||||
|
// Invalidate entire Unified TLB
|
||||||
|
__set_TLBIALL(0);
|
||||||
|
|
||||||
|
// Invalidate entire branch predictor array
|
||||||
|
__set_BPIALL(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate instruction cache and flush branch target cache
|
||||||
|
__set_ICIALLU(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate data cache
|
||||||
|
L1C_InvalidateDCacheAll();
|
||||||
|
|
||||||
|
#if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
|
||||||
|
// Enable FPU
|
||||||
|
__FPU_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Create Translation Table
|
||||||
|
MMU_CreateTranslationTable();
|
||||||
|
|
||||||
|
// Enable MMU
|
||||||
|
MMU_Enable();
|
||||||
|
|
||||||
|
// Enable Caches
|
||||||
|
L1C_EnableCaches();
|
||||||
|
L1C_EnableBTAC();
|
||||||
|
|
||||||
|
#if (__L2C_PRESENT == 1)
|
||||||
|
// Enable GIC
|
||||||
|
L2C_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// IRQ Initialize
|
||||||
|
IRQ_Initialize();
|
||||||
|
}
|
||||||
100
云台/云台/.cmsis/device/ARM/ARMCA7/Config/mem_ARMCA7.h
Normal file
100
云台/云台/.cmsis/device/ARM/ARMCA7/Config/mem_ARMCA7.h
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mem_ARMCA7.h
|
||||||
|
* @brief Memory base and size definitions (used in scatter file)
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MEM_ARMCA7_H
|
||||||
|
#define __MEM_ARMCA7_H
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/*
|
||||||
|
//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- ROM Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> ROM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> ROM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x80000000
|
||||||
|
#define __ROM_SIZE 0x00200000
|
||||||
|
|
||||||
|
/*--------------------- RAM Configuration -----------------------------------
|
||||||
|
// <h> RAM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> RAM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> RAM Total Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <h> Data Sections
|
||||||
|
// <o2> RW_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o3> ZI_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// <h> Stack / Heap Configuration
|
||||||
|
// <o4> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o5> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <h> Exceptional Modes
|
||||||
|
// <o6> UND Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o7> ABT Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o8> SVC Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o9> IRQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o10> FIQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x80200000
|
||||||
|
#define __RAM_SIZE 0x00200000
|
||||||
|
|
||||||
|
#define __RW_DATA_SIZE 0x00100000
|
||||||
|
#define __ZI_DATA_SIZE 0x000F0000
|
||||||
|
|
||||||
|
#define __STACK_SIZE 0x00001000
|
||||||
|
#define __HEAP_SIZE 0x00008000
|
||||||
|
|
||||||
|
#define __UND_STACK_SIZE 0x00000100
|
||||||
|
#define __ABT_STACK_SIZE 0x00000100
|
||||||
|
#define __SVC_STACK_SIZE 0x00000100
|
||||||
|
#define __IRQ_STACK_SIZE 0x00000100
|
||||||
|
#define __FIQ_STACK_SIZE 0x00000100
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*--------------------- TTB Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> TTB Configuration
|
||||||
|
// <i> The TLB L1 contains 4096 32-bit entries and must be 16kB aligned
|
||||||
|
// <i> The TLB L2 entries are placed after the L1 in the MMU config
|
||||||
|
// <o0> TTB Base Address <0x0-0xFFFFFFFF:0x4000>
|
||||||
|
// <o1> TTB Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __TTB_BASE 0x80500000
|
||||||
|
#define __TTB_SIZE 0x00005000
|
||||||
|
|
||||||
|
#endif /* __MEM_ARMCA7_H */
|
||||||
65
云台/云台/.cmsis/device/ARM/ARMCA7/Config/system_ARMCA7.h
Normal file
65
云台/云台/.cmsis/device/ARM/ARMCA7/Config/system_ARMCA7.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA7.h
|
||||||
|
* @brief CMSIS Device System Header File for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSTEM_ARMCA7_H
|
||||||
|
#define __SYSTEM_ARMCA7_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Create Translation Table.
|
||||||
|
|
||||||
|
Creates Memory Management Unit Translation Table.
|
||||||
|
*/
|
||||||
|
extern void MMU_CreateTranslationTable(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SYSTEM_ARMCA7_H */
|
||||||
135
云台/云台/.cmsis/device/ARM/ARMCA7/Include/ARMCA7.h
Normal file
135
云台/云台/.cmsis/device/ARM/ARMCA7/Include/ARMCA7.h
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file ARMCA7.h
|
||||||
|
* @brief CMSIS Cortex-A7 Core Peripheral Access Layer Header File
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ARMCA7_H__
|
||||||
|
#define __ARMCA7_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
/** Device specific Interrupt IDs */
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/****** SGI Interrupts Numbers ****************************************/
|
||||||
|
SGI0_IRQn = 0, /*!< Software Generated Interrupt 0 */
|
||||||
|
SGI1_IRQn = 1, /*!< Software Generated Interrupt 1 */
|
||||||
|
SGI2_IRQn = 2, /*!< Software Generated Interrupt 2 */
|
||||||
|
SGI3_IRQn = 3, /*!< Software Generated Interrupt 3 */
|
||||||
|
SGI4_IRQn = 4, /*!< Software Generated Interrupt 4 */
|
||||||
|
SGI5_IRQn = 5, /*!< Software Generated Interrupt 5 */
|
||||||
|
SGI6_IRQn = 6, /*!< Software Generated Interrupt 6 */
|
||||||
|
SGI7_IRQn = 7, /*!< Software Generated Interrupt 7 */
|
||||||
|
SGI8_IRQn = 8, /*!< Software Generated Interrupt 8 */
|
||||||
|
SGI9_IRQn = 9, /*!< Software Generated Interrupt 9 */
|
||||||
|
SGI10_IRQn = 10, /*!< Software Generated Interrupt 10 */
|
||||||
|
SGI11_IRQn = 11, /*!< Software Generated Interrupt 11 */
|
||||||
|
SGI12_IRQn = 12, /*!< Software Generated Interrupt 12 */
|
||||||
|
SGI13_IRQn = 13, /*!< Software Generated Interrupt 13 */
|
||||||
|
SGI14_IRQn = 14, /*!< Software Generated Interrupt 14 */
|
||||||
|
SGI15_IRQn = 15, /*!< Software Generated Interrupt 15 */
|
||||||
|
|
||||||
|
/****** Cortex-A7 Processor Exceptions Numbers ****************************************/
|
||||||
|
SecurePhyTimer_IRQn = 29, /*!< Physical Timer Interrupt */
|
||||||
|
|
||||||
|
/****** Platform Exceptions Numbers ***************************************************/
|
||||||
|
Watchdog_IRQn = 32, /*!< SP805 Interrupt */
|
||||||
|
Timer0_IRQn = 34, /*!< SP804 Interrupt */
|
||||||
|
Timer1_IRQn = 35, /*!< SP804 Interrupt */
|
||||||
|
RTClock_IRQn = 36, /*!< PL031 Interrupt */
|
||||||
|
UART0_IRQn = 37, /*!< PL011 Interrupt */
|
||||||
|
UART1_IRQn = 38, /*!< PL011 Interrupt */
|
||||||
|
UART2_IRQn = 39, /*!< PL011 Interrupt */
|
||||||
|
UART3_IRQn = 40, /*!< PL011 Interrupt */
|
||||||
|
MCI0_IRQn = 41, /*!< PL180 Interrupt (1st) */
|
||||||
|
MCI1_IRQn = 42, /*!< PL180 Interrupt (2nd) */
|
||||||
|
AACI_IRQn = 43, /*!< PL041 Interrupt */
|
||||||
|
Keyboard_IRQn = 44, /*!< PL050 Interrupt */
|
||||||
|
Mouse_IRQn = 45, /*!< PL050 Interrupt */
|
||||||
|
CLCD_IRQn = 46, /*!< PL111 Interrupt */
|
||||||
|
Ethernet_IRQn = 47, /*!< SMSC_91C111 Interrupt */
|
||||||
|
VFS2_IRQn = 73, /*!< VFS2 Interrupt */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Peripheral memory map */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Peripheral and RAM base address */
|
||||||
|
#define VE_A7_MP_FLASH_BASE0 (0x00000000UL) /*!< (FLASH0 ) Base Address */
|
||||||
|
#define VE_A7_MP_FLASH_BASE1 (0x0C000000UL) /*!< (FLASH1 ) Base Address */
|
||||||
|
#define VE_A7_MP_SRAM_BASE (0x14000000UL) /*!< (SRAM ) Base Address */
|
||||||
|
#define VE_A7_MP_PERIPH_BASE_CS2 (0x18000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A7_MP_VRAM_BASE (0x00000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (VRAM ) Base Address */
|
||||||
|
#define VE_A7_MP_ETHERNET_BASE (0x02000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (ETHERNET ) Base Address */
|
||||||
|
#define VE_A7_MP_USB_BASE (0x03000000UL + VE_A7_MP_PERIPH_BASE_CS2) /*!< (USB ) Base Address */
|
||||||
|
#define VE_A7_MP_PERIPH_BASE_CS3 (0x1C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A7_MP_DAP_BASE (0x00000000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (LOCAL DAP ) Base Address */
|
||||||
|
#define VE_A7_MP_SYSTEM_REG_BASE (0x00010000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (SYSTEM REG ) Base Address */
|
||||||
|
#define VE_A7_MP_SERIAL_BASE (0x00030000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (SERIAL ) Base Address */
|
||||||
|
#define VE_A7_MP_AACI_BASE (0x00040000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (AACI ) Base Address */
|
||||||
|
#define VE_A7_MP_MMCI_BASE (0x00050000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (MMCI ) Base Address */
|
||||||
|
#define VE_A7_MP_KMI0_BASE (0x00060000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (KMI0 ) Base Address */
|
||||||
|
#define VE_A7_MP_UART_BASE (0x00090000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (UART ) Base Address */
|
||||||
|
#define VE_A7_MP_WDT_BASE (0x000F0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (WDT ) Base Address */
|
||||||
|
#define VE_A7_MP_TIMER_BASE (0x00110000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (TIMER ) Base Address */
|
||||||
|
#define VE_A7_MP_DVI_BASE (0x00160000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (DVI ) Base Address */
|
||||||
|
#define VE_A7_MP_RTC_BASE (0x00170000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (RTC ) Base Address */
|
||||||
|
#define VE_A7_MP_UART4_BASE (0x001B0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (UART4 ) Base Address */
|
||||||
|
#define VE_A7_MP_CLCD_BASE (0x001F0000UL + VE_A7_MP_PERIPH_BASE_CS3) /*!< (CLCD ) Base Address */
|
||||||
|
#define VE_A7_MP_PRIVATE_PERIPH_BASE (0x2C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A7_MP_GIC_DISTRIBUTOR_BASE (0x00001000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (GIC DIST ) Base Address */
|
||||||
|
#define VE_A7_MP_GIC_INTERFACE_BASE (0x00002000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (GIC CPU IF ) Base Address */
|
||||||
|
#define VE_A7_MP_PL310_BASE (0x000F0000UL + VE_A7_MP_PRIVATE_PERIPH_BASE) /*!< (L2C-310 ) Base Address */
|
||||||
|
#define VE_A7_MP_SSRAM_BASE (0x2E000000UL) /*!< (System SRAM) Base Address */
|
||||||
|
#define VE_A7_MP_DRAM_BASE (0x80000000UL) /*!< (DRAM ) Base Address */
|
||||||
|
#define GIC_DISTRIBUTOR_BASE VE_A7_MP_GIC_DISTRIBUTOR_BASE
|
||||||
|
#define GIC_INTERFACE_BASE VE_A7_MP_GIC_INTERFACE_BASE
|
||||||
|
|
||||||
|
//The VE-A7 model implements L1 cache as architecturally defined, but does not implement L2 cache.
|
||||||
|
//Do not enable the L2 cache if you are running RTX on a VE-A7 model as it may cause a data abort.
|
||||||
|
#define L2C_310_BASE VE_A7_MP_PL310_BASE
|
||||||
|
|
||||||
|
/* -------- Configuration of the Cortex-A7 Processor and Core Peripherals ------- */
|
||||||
|
#define __CA_REV 0x0000U /* Core revision r0p0 */
|
||||||
|
#define __CORTEX_A 7U /* Cortex-A7 Core */
|
||||||
|
#define __FPU_PRESENT 1U /* FPU present */
|
||||||
|
#define __GIC_PRESENT 1U /* GIC present */
|
||||||
|
#define __TIM_PRESENT 1U /* TIM present */
|
||||||
|
#define __L2C_PRESENT 0U /* L2C present */
|
||||||
|
|
||||||
|
#include "core_ca.h"
|
||||||
|
#include <system_ARMCA7.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __ARMCA7_H__
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC5/ARMCA7.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC5/ARMCA7.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armcc -E
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA7.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
151
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC5/startup_ARMCA7.c
Normal file
151
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC5/startup_ARMCA7.c
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA7.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA7.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((section("RESET")));
|
||||||
|
void Reset_Handler (void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Vectors(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
IMPORT Undef_Handler
|
||||||
|
IMPORT SVC_Handler
|
||||||
|
IMPORT PAbt_Handler
|
||||||
|
IMPORT DAbt_Handler
|
||||||
|
IMPORT IRQ_Handler
|
||||||
|
IMPORT FIQ_Handler
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Reset_Handler(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5 // Read MPIDR
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
IMPORT |Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =|Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =|Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =|Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =|Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =|Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =|Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
IMPORT SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
IMPORT __main
|
||||||
|
BL __main
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC6/ARMCA7.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC6/ARMCA7.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-a7 -xc
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA7.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC6/startup_ARMCA7.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA7/Source/AC6/startup_ARMCA7.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA7.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA7.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void) __attribute__ ((noreturn));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$ARM_LIB_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL __main \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
181
云台/云台/.cmsis/device/ARM/ARMCA7/Source/GCC/ARMCA7.ld
Normal file
181
云台/云台/.cmsis/device/ARM/ARMCA7/Source/GCC/ARMCA7.ld
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
#include "mem_ARMCA7.h"
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
ROM (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
L_TTB (rw) : ORIGIN = __TTB_BASE, LENGTH = __TTB_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
|
||||||
|
Image$$VECTORS$$Base = .;
|
||||||
|
* (RESET)
|
||||||
|
KEEP(*(.isr_vector))
|
||||||
|
Image$$VECTORS$$Limit = .;
|
||||||
|
|
||||||
|
*(SVC_TABLE)
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
Image$$RO_DATA$$Base = .;
|
||||||
|
*(.rodata*)
|
||||||
|
Image$$RO_DATA$$Limit = .;
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > ROM
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG (__data_end__ - __data_start__)
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
LONG (__bss_start__)
|
||||||
|
LONG (__bss_end__ - __bss_start__)
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__etext = .;
|
||||||
|
|
||||||
|
.ttb :
|
||||||
|
{
|
||||||
|
Image$$TTB$$ZI$$Base = .;
|
||||||
|
. += __TTB_SIZE;
|
||||||
|
Image$$TTB$$ZI$$Limit = .;
|
||||||
|
} > L_TTB
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
Image$$RW_DATA$$Base = .;
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data*)
|
||||||
|
Image$$RW_DATA$$Limit = .;
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
|
||||||
|
.bss ALIGN(0x400):
|
||||||
|
{
|
||||||
|
Image$$ZI_DATA$$Base = .;
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
__bss_end__ = .;
|
||||||
|
Image$$ZI_DATA$$Limit = .;
|
||||||
|
__end__ = .;
|
||||||
|
end = __end__;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
#if defined(__HEAP_SIZE) && (__HEAP_SIZE > 0)
|
||||||
|
.heap (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
Image$$HEAP$$ZI$$Base = .;
|
||||||
|
. += __HEAP_SIZE;
|
||||||
|
Image$$HEAP$$ZI$$Limit = .;
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.stack (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE - __FIQ_STACK_SIZE - __IRQ_STACK_SIZE - __SVC_STACK_SIZE - __ABT_STACK_SIZE - __UND_STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
|
||||||
|
__StackTop = .;
|
||||||
|
Image$$SYS_STACK$$ZI$$Base = .;
|
||||||
|
. += __STACK_SIZE;
|
||||||
|
Image$$SYS_STACK$$ZI$$Limit = .;
|
||||||
|
__stack = .;
|
||||||
|
|
||||||
|
Image$$FIQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __FIQ_STACK_SIZE;
|
||||||
|
Image$$FIQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$IRQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __IRQ_STACK_SIZE;
|
||||||
|
Image$$IRQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$SVC_STACK$$ZI$$Base = .;
|
||||||
|
. += __SVC_STACK_SIZE;
|
||||||
|
Image$$SVC_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$ABT_STACK$$ZI$$Base = .;
|
||||||
|
. += __ABT_STACK_SIZE;
|
||||||
|
Image$$ABT_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$UND_STACK$$ZI$$Base = .;
|
||||||
|
. += __UND_STACK_SIZE;
|
||||||
|
Image$$UND_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA7/Source/GCC/startup_ARMCA7.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA7/Source/GCC/startup_ARMCA7.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA7.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA7.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$SYS_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL _start \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
67
云台/云台/.cmsis/device/ARM/ARMCA7/Source/IAR/ARMCA7.icf
Normal file
67
云台/云台/.cmsis/device/ARM/ARMCA7/Source/IAR/ARMCA7.icf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
/*-Memory Regions-*/
|
||||||
|
define symbol __ICFEDIT_region_IROM1_start__ = 0x80000000;
|
||||||
|
define symbol __ICFEDIT_region_IROM1_end__ = 0x801FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_start__ = 0x80200000;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_end__ = 0x803FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_TTB_start__ = 0x80500000;
|
||||||
|
define symbol __ICFEDIT_region_TTB_end__ = 0x805FFFFF;
|
||||||
|
|
||||||
|
/*-Sizes-*/
|
||||||
|
define symbol __ICFEDIT_size_cstack__ = 0x1000;
|
||||||
|
define symbol __ICFEDIT_size_irqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_svcstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_abtstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_undstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_heap__ = 0x8000;
|
||||||
|
define symbol __ICFEDIT_size_ttb__ = 0x4000;
|
||||||
|
|
||||||
|
define memory mem with size = 4G;
|
||||||
|
define region IROM_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__];
|
||||||
|
define region IRAM_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__];
|
||||||
|
define region ERAM_region = mem:[from __ICFEDIT_region_ERAM1_start__ to __ICFEDIT_region_ERAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM2_start__ to __ICFEDIT_region_ERAM2_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM3_start__ to __ICFEDIT_region_ERAM3_end__];
|
||||||
|
define region TTB_region = mem:[from __ICFEDIT_region_TTB_start__ to __ICFEDIT_region_TTB_end__ ];
|
||||||
|
|
||||||
|
define block USR_STACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||||
|
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
|
||||||
|
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
|
||||||
|
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
|
||||||
|
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
|
||||||
|
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
|
||||||
|
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||||
|
define block TTB with alignment = 8, size = __ICFEDIT_size_ttb__ { section TTB };
|
||||||
|
|
||||||
|
do not initialize { section .noinit };
|
||||||
|
|
||||||
|
initialize by copy { readwrite };
|
||||||
|
if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
|
||||||
|
{
|
||||||
|
// Required in a multi-threaded application
|
||||||
|
initialize by copy with packing = none { section __DLIB_PERTHREAD };
|
||||||
|
}
|
||||||
|
|
||||||
|
place at address mem:__ICFEDIT_region_IROM1_start__ { readonly section RESET };
|
||||||
|
place in IROM_region { readonly };
|
||||||
|
place in IRAM_region { readwrite, block HEAP, block USR_STACK, block IRQ_STACK, block FIQ_STACK, block SVC_STACK, block ABT_STACK, block UND_STACK };
|
||||||
|
place in TTB_region { block TTB };
|
||||||
140
云台/云台/.cmsis/device/ARM/ARMCA7/Source/IAR/startup_ARMCA7.s
Normal file
140
云台/云台/.cmsis/device/ARM/ARMCA7/Source/IAR/startup_ARMCA7.s
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA7.s
|
||||||
|
* @brief CMSIS Device System Source File for ARM Cortex-A9 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 01 Nov 2017
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MODULE ?startup_ARMCA7
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
PUBLIC Reset_Handler
|
||||||
|
PUBWEAK Undef_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PAbt_Handler
|
||||||
|
PUBWEAK DAbt_Handler
|
||||||
|
PUBWEAK IRQ_Handler
|
||||||
|
PUBWEAK FIQ_Handler
|
||||||
|
|
||||||
|
SECTION SVC_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION IRQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION FIQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION ABT_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION UND_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION USR_STACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
section RESET:CODE:NOROOT(2)
|
||||||
|
PUBLIC Vectors
|
||||||
|
|
||||||
|
Vectors:
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
|
||||||
|
|
||||||
|
section .text:CODE:NOROOT(4)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
EXTERN SystemInit
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
|
||||||
|
Reset_Handler:
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep:
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exception mode
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =SFE(FIQ_STACK)
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =SFE(IRQ_STACK)
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =SFE(SVC_STACK)
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =SFE(ABT_STACK)
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =SFE(UND_STACK)
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =SFE(USR_STACK)
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __iar_program_start
|
||||||
|
BL __iar_program_start
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
Undef_Handler:
|
||||||
|
SVC_Handler:
|
||||||
|
PAbt_Handler:
|
||||||
|
DAbt_Handler:
|
||||||
|
IRQ_Handler:
|
||||||
|
FIQ_Handler:
|
||||||
|
Default_Handler:
|
||||||
|
B .
|
||||||
|
|
||||||
|
END
|
||||||
232
云台/云台/.cmsis/device/ARM/ARMCA7/Source/mmu_ARMCA7.c
Normal file
232
云台/云台/.cmsis/device/ARM/ARMCA7/Source/mmu_ARMCA7.c
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mmu_ARMCA7.c
|
||||||
|
* @brief MMU Configuration for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.2.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Memory map description from: DUI0447G_v2m_p1_trm.pdf 4.2.2 Arm Cortex-A Series memory map
|
||||||
|
|
||||||
|
Memory Type
|
||||||
|
0xffffffff |--------------------------| ------------
|
||||||
|
| FLAG SYNC | Device Memory
|
||||||
|
0xfffff000 |--------------------------| ------------
|
||||||
|
| Fault | Fault
|
||||||
|
0xfff00000 |--------------------------| ------------
|
||||||
|
| | Normal
|
||||||
|
| |
|
||||||
|
| Daughterboard |
|
||||||
|
| memory |
|
||||||
|
| |
|
||||||
|
0x80505000 |--------------------------| ------------
|
||||||
|
|TTB (L2 Sync Flags ) 4k | Normal
|
||||||
|
0x80504C00 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-B) 16k| Normal
|
||||||
|
0x80504800 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-A) 16k| Normal
|
||||||
|
0x80504400 |--------------------------| ------------
|
||||||
|
|TTB (L2 Priv Periphs) 4k | Normal
|
||||||
|
0x80504000 |--------------------------| ------------
|
||||||
|
| TTB (L1 Descriptors) | Normal
|
||||||
|
0x80500000 |--------------------------| ------------
|
||||||
|
| Stack | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| Heap | Normal
|
||||||
|
0x80400000 |--------------------------| ------------
|
||||||
|
| ZI Data | Normal
|
||||||
|
0x80300000 |--------------------------| ------------
|
||||||
|
| RW Data | Normal
|
||||||
|
0x80200000 |--------------------------| ------------
|
||||||
|
| RO Data | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| RO Code | USH Normal
|
||||||
|
0x80000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| HSB AXI buses |
|
||||||
|
0x40000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x2c002000 |--------------------------| ------------
|
||||||
|
| Private Address | Device Memory
|
||||||
|
0x2c000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x20000000 |--------------------------| ------------
|
||||||
|
| Peripherals | Device Memory RW/RO
|
||||||
|
| | & Fault
|
||||||
|
0x00000000 |--------------------------|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// L1 Cache info and restrictions about architecture of the caches (CCSIR register):
|
||||||
|
// Write-Through support *not* available
|
||||||
|
// Write-Back support available.
|
||||||
|
// Read allocation support available.
|
||||||
|
// Write allocation support available.
|
||||||
|
|
||||||
|
//Note: You should use the Shareable attribute carefully.
|
||||||
|
//For cores without coherency logic (such as SCU) marking a region as shareable forces the processor to not cache that region regardless of the inner cache settings.
|
||||||
|
//Cortex-A versions of RTX use LDREX/STREX instructions relying on Local monitors. Local monitors will be used only when the region gets cached, regions that are not cached will use the Global Monitor.
|
||||||
|
//Some Cortex-A implementations do not include Global Monitors, so wrongly setting the attribute Shareable may cause STREX to fail.
|
||||||
|
|
||||||
|
//Recall: When the Shareable attribute is applied to a memory region that is not Write-Back, Normal memory, data held in this region is treated as Non-cacheable.
|
||||||
|
//When SMP bit = 0, Inner WB/WA Cacheable Shareable attributes are treated as Non-cacheable.
|
||||||
|
//When SMP bit = 1, Inner WB/WA Cacheable Shareable attributes are treated as Cacheable.
|
||||||
|
|
||||||
|
|
||||||
|
//Following MMU configuration is expected
|
||||||
|
//SCTLR.AFE == 1 (Simplified access permissions model - AP[2:1] define access permissions, AP[0] is an access flag)
|
||||||
|
//SCTLR.TRE == 0 (TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor)
|
||||||
|
//Domain 0 is always the Client domain
|
||||||
|
//Descriptors should place all memory in domain 0
|
||||||
|
|
||||||
|
#include "ARMCA7.h"
|
||||||
|
#include "mem_ARMCA7.h"
|
||||||
|
|
||||||
|
// TTB base address
|
||||||
|
#define TTB_BASE ((uint32_t*)__TTB_BASE)
|
||||||
|
|
||||||
|
// L2 table pointers
|
||||||
|
//----------------------------------------
|
||||||
|
#define TTB_L1_SIZE (0x00004000) // The L1 translation table divides the full 4GB address space of a 32-bit core
|
||||||
|
// into 4096 equally sized sections, each of which describes 1MB of virtual memory space.
|
||||||
|
// The L1 translation table therefore contains 4096 32-bit (word-sized) entries.
|
||||||
|
|
||||||
|
#define PRIVATE_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE) // Map 4k Private Address space
|
||||||
|
#define PERIPHERAL_A_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x400) // Map 64k Peripheral #1 0x1C000000 - 0x1C00FFFFF
|
||||||
|
#define PERIPHERAL_B_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x800) // Map 64k Peripheral #2 0x1C100000 - 0x1C1FFFFFF
|
||||||
|
#define SYNC_FLAGS_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE + 0xC00) // Map 4k Flag synchronization
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
#define PERIPHERAL_A_FAULT (0x00000000 + 0x1c000000) //0x1C000000-0x1C00FFFF (1M)
|
||||||
|
#define PERIPHERAL_B_FAULT (0x00100000 + 0x1c000000) //0x1C100000-0x1C10FFFF (1M)
|
||||||
|
|
||||||
|
//--------------------- SYNC FLAGS --------------------
|
||||||
|
#define FLAG_SYNC 0xFFFFF000
|
||||||
|
#define F_SYNC_BASE 0xFFF00000 //1M aligned
|
||||||
|
|
||||||
|
static uint32_t Sect_Normal; //outer & inner wb/wa, non-shareable, executable, rw, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_Cod; //outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_RO; //as Sect_Normal_Cod, but not executable
|
||||||
|
static uint32_t Sect_Normal_RW; //as Sect_Normal_Cod, but writeable and not executable
|
||||||
|
static uint32_t Sect_Device_RO; //device, non-shareable, non-executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Device_RW; //as Sect_Device_RO, but writeable
|
||||||
|
|
||||||
|
/* Define global descriptors */
|
||||||
|
static uint32_t Page_L1_4k = 0x0; //generic
|
||||||
|
static uint32_t Page_L1_64k = 0x0; //generic
|
||||||
|
static uint32_t Page_4k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
static uint32_t Page_64k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
|
||||||
|
void MMU_CreateTranslationTable(void)
|
||||||
|
{
|
||||||
|
mmu_region_attributes_Type region;
|
||||||
|
|
||||||
|
//Create 4GB of faulting entries
|
||||||
|
MMU_TTSection (TTB_BASE, 0, 4096, DESCRIPTOR_FAULT);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generate descriptors. Refer to core_ca.h to get information about attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Create descriptors for Vectors, RO, RW, ZI sections
|
||||||
|
section_normal(Sect_Normal, region);
|
||||||
|
section_normal_cod(Sect_Normal_Cod, region);
|
||||||
|
section_normal_ro(Sect_Normal_RO, region);
|
||||||
|
section_normal_rw(Sect_Normal_RW, region);
|
||||||
|
//Create descriptors for peripherals
|
||||||
|
section_device_ro(Sect_Device_RO, region);
|
||||||
|
section_device_rw(Sect_Device_RW, region);
|
||||||
|
//Create descriptors for 64k pages
|
||||||
|
page64k_device_rw(Page_L1_64k, Page_64k_Device_RW, region);
|
||||||
|
//Create descriptors for 4k pages
|
||||||
|
page4k_device_rw(Page_L1_4k, Page_4k_Device_RW, region);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define MMU flat-map regions and attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Define Image
|
||||||
|
MMU_TTSection (TTB_BASE, __ROM_BASE, __ROM_SIZE/0x100000, Sect_Normal_Cod); // multiple of 1MB sections
|
||||||
|
MMU_TTSection (TTB_BASE, __RAM_BASE, __RAM_SIZE/0x100000, Sect_Normal_RW); // multiple of 1MB sections
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_FLASH_BASE0 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_FLASH_BASE1 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_SRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_VRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_ETHERNET_BASE , 16, Sect_Device_RW);
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A7_MP_USB_BASE , 16, Sect_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_A_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_DAP_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_SYSTEM_REG_BASE, 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_SERIAL_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_AACI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_MMCI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_KMI0_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_UART_BASE , 4, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_WDT_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_B_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_TIMER_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_DVI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_RTC_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_UART4_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A7_MP_CLCD_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to cover private address space. Needs to be marked as Device memory
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() ,256, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define private address space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() , 3, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
// Define L2CC entry. Uncomment if PL310 is present
|
||||||
|
// MMU_TTPage4k (TTB_BASE, VE_A5_MP_PL310_BASE , 1, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to synchronization space (Useful if some non-cacheable DMA agent is present in the SoC)
|
||||||
|
MMU_TTPage4k (TTB_BASE, F_SYNC_BASE , 256, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define synchronization space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, FLAG_SYNC , 1, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
/* Set location of level 1 page table
|
||||||
|
; 31:14 - Translation table base addr (31:14-TTBCR.N, TTBCR.N is 0 out of reset)
|
||||||
|
; 13:7 - 0x0
|
||||||
|
; 6 - IRGN[0] 0x1 (Inner WB WA)
|
||||||
|
; 5 - NOS 0x0 (Non-shared)
|
||||||
|
; 4:3 - RGN 0x01 (Outer WB WA)
|
||||||
|
; 2 - IMP 0x0 (Implementation Defined)
|
||||||
|
; 1 - S 0x0 (Non-shared)
|
||||||
|
; 0 - IRGN[1] 0x0 (Inner WB WA) */
|
||||||
|
__set_TTBR0(__TTB_BASE | 0x48);
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
/* Set up domain access control register
|
||||||
|
; We set domain 0 to Client and all other domains to No Access.
|
||||||
|
; All translation table entries specify domain 0 */
|
||||||
|
__set_DACR(1);
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
93
云台/云台/.cmsis/device/ARM/ARMCA7/Source/system_ARMCA7.c
Normal file
93
云台/云台/.cmsis/device/ARM/ARMCA7/Source/system_ARMCA7.c
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA7.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A7 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 13. February 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "RTE_Components.h"
|
||||||
|
#include CMSIS_device_header
|
||||||
|
#include "irq_ctrl.h"
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK 12000000U
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Initialization
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
/* do not use global variables because this function is called before
|
||||||
|
reaching pre-main. RW section may be overwritten afterwards. */
|
||||||
|
|
||||||
|
// Invalidate entire Unified TLB
|
||||||
|
__set_TLBIALL(0);
|
||||||
|
|
||||||
|
// Invalidate entire branch predictor array
|
||||||
|
__set_BPIALL(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate instruction cache and flush branch target cache
|
||||||
|
__set_ICIALLU(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate data cache
|
||||||
|
L1C_InvalidateDCacheAll();
|
||||||
|
|
||||||
|
#if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
|
||||||
|
// Enable FPU
|
||||||
|
__FPU_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Create Translation Table
|
||||||
|
MMU_CreateTranslationTable();
|
||||||
|
|
||||||
|
// Enable MMU
|
||||||
|
MMU_Enable();
|
||||||
|
|
||||||
|
// Enable Caches
|
||||||
|
L1C_EnableCaches();
|
||||||
|
L1C_EnableBTAC();
|
||||||
|
|
||||||
|
#if (__L2C_PRESENT == 1)
|
||||||
|
// Enable GIC
|
||||||
|
L2C_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// IRQ Initialize
|
||||||
|
IRQ_Initialize();
|
||||||
|
}
|
||||||
100
云台/云台/.cmsis/device/ARM/ARMCA9/Config/mem_ARMCA9.h
Normal file
100
云台/云台/.cmsis/device/ARM/ARMCA9/Config/mem_ARMCA9.h
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mem_ARMCA9.h
|
||||||
|
* @brief Memory base and size definitions (used in scatter file)
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __MEM_ARMCA9_H
|
||||||
|
#define __MEM_ARMCA9_H
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/*
|
||||||
|
//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- ROM Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> ROM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> ROM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x80000000
|
||||||
|
#define __ROM_SIZE 0x00200000
|
||||||
|
|
||||||
|
/*--------------------- RAM Configuration -----------------------------------
|
||||||
|
// <h> RAM Configuration
|
||||||
|
// <i> For compatibility with MMU config the sections must be multiple of 1MB
|
||||||
|
// <o0> RAM Base Address <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <o1> RAM Total Size (in Bytes) <0x0-0xFFFFFFFF:0x100000>
|
||||||
|
// <h> Data Sections
|
||||||
|
// <o2> RW_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o3> ZI_DATA Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// <h> Stack / Heap Configuration
|
||||||
|
// <o4> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o5> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <h> Exceptional Modes
|
||||||
|
// <o6> UND Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o7> ABT Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o8> SVC Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o9> IRQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// <o10> FIQ Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x80200000
|
||||||
|
#define __RAM_SIZE 0x00200000
|
||||||
|
|
||||||
|
#define __RW_DATA_SIZE 0x00100000
|
||||||
|
#define __ZI_DATA_SIZE 0x000F0000
|
||||||
|
|
||||||
|
#define __STACK_SIZE 0x00001000
|
||||||
|
#define __HEAP_SIZE 0x00008000
|
||||||
|
|
||||||
|
#define __UND_STACK_SIZE 0x00000100
|
||||||
|
#define __ABT_STACK_SIZE 0x00000100
|
||||||
|
#define __SVC_STACK_SIZE 0x00000100
|
||||||
|
#define __IRQ_STACK_SIZE 0x00000100
|
||||||
|
#define __FIQ_STACK_SIZE 0x00000100
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*--------------------- TTB Configuration ------------------------------------
|
||||||
|
//
|
||||||
|
// <h> TTB Configuration
|
||||||
|
// <i> The TLB L1 contains 4096 32-bit entries and must be 16kB aligned
|
||||||
|
// <i> The TLB L2 entries are placed after the L1 in the MMU config
|
||||||
|
// <o0> TTB Base Address <0x0-0xFFFFFFFF:0x4000>
|
||||||
|
// <o1> TTB Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
// </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __TTB_BASE 0x80500000
|
||||||
|
#define __TTB_SIZE 0x00005000
|
||||||
|
|
||||||
|
#endif /* __MEM_ARMCA9_H */
|
||||||
65
云台/云台/.cmsis/device/ARM/ARMCA9/Config/system_ARMCA9.h
Normal file
65
云台/云台/.cmsis/device/ARM/ARMCA9/Config/system_ARMCA9.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA9.h
|
||||||
|
* @brief CMSIS Device System Header File for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSTEM_ARMCA9_H
|
||||||
|
#define __SYSTEM_ARMCA9_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Create Translation Table.
|
||||||
|
|
||||||
|
Creates Memory Management Unit Translation Table.
|
||||||
|
*/
|
||||||
|
extern void MMU_CreateTranslationTable(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __SYSTEM_ARMCA9_H */
|
||||||
139
云台/云台/.cmsis/device/ARM/ARMCA9/Include/ARMCA9.h
Normal file
139
云台/云台/.cmsis/device/ARM/ARMCA9/Include/ARMCA9.h
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file ARMCA9.h
|
||||||
|
* @brief CMSIS Cortex-A9 Core Peripheral Access Layer Header File
|
||||||
|
* @version V1.1.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ARMCA9_H__
|
||||||
|
#define __ARMCA9_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
/** Device specific Interrupt IDs */
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/****** SGI Interrupts Numbers ****************************************/
|
||||||
|
SGI0_IRQn = 0, /*!< Software Generated Interrupt 0 */
|
||||||
|
SGI1_IRQn = 1, /*!< Software Generated Interrupt 1 */
|
||||||
|
SGI2_IRQn = 2, /*!< Software Generated Interrupt 2 */
|
||||||
|
SGI3_IRQn = 3, /*!< Software Generated Interrupt 3 */
|
||||||
|
SGI4_IRQn = 4, /*!< Software Generated Interrupt 4 */
|
||||||
|
SGI5_IRQn = 5, /*!< Software Generated Interrupt 5 */
|
||||||
|
SGI6_IRQn = 6, /*!< Software Generated Interrupt 6 */
|
||||||
|
SGI7_IRQn = 7, /*!< Software Generated Interrupt 7 */
|
||||||
|
SGI8_IRQn = 8, /*!< Software Generated Interrupt 8 */
|
||||||
|
SGI9_IRQn = 9, /*!< Software Generated Interrupt 9 */
|
||||||
|
SGI10_IRQn = 10, /*!< Software Generated Interrupt 10 */
|
||||||
|
SGI11_IRQn = 11, /*!< Software Generated Interrupt 11 */
|
||||||
|
SGI12_IRQn = 12, /*!< Software Generated Interrupt 12 */
|
||||||
|
SGI13_IRQn = 13, /*!< Software Generated Interrupt 13 */
|
||||||
|
SGI14_IRQn = 14, /*!< Software Generated Interrupt 14 */
|
||||||
|
SGI15_IRQn = 15, /*!< Software Generated Interrupt 15 */
|
||||||
|
|
||||||
|
/****** Cortex-A9 Processor Exceptions Numbers ****************************************/
|
||||||
|
GlobalTimer_IRQn = 27, /*!< Global Timer Interrupt */
|
||||||
|
PrivTimer_IRQn = 29, /*!< Private Timer Interrupt */
|
||||||
|
PrivWatchdog_IRQn = 30, /*!< Private Watchdog Interrupt */
|
||||||
|
|
||||||
|
/****** Platform Exceptions Numbers ***************************************************/
|
||||||
|
Watchdog_IRQn = 32, /*!< SP805 Interrupt */
|
||||||
|
Timer0_IRQn = 34, /*!< SP804 Interrupt */
|
||||||
|
Timer1_IRQn = 35, /*!< SP804 Interrupt */
|
||||||
|
RTClock_IRQn = 36, /*!< PL031 Interrupt */
|
||||||
|
UART0_IRQn = 37, /*!< PL011 Interrupt */
|
||||||
|
UART1_IRQn = 38, /*!< PL011 Interrupt */
|
||||||
|
UART2_IRQn = 39, /*!< PL011 Interrupt */
|
||||||
|
UART3_IRQn = 40, /*!< PL011 Interrupt */
|
||||||
|
MCI0_IRQn = 41, /*!< PL180 Interrupt (1st) */
|
||||||
|
MCI1_IRQn = 42, /*!< PL180 Interrupt (2nd) */
|
||||||
|
AACI_IRQn = 43, /*!< PL041 Interrupt */
|
||||||
|
Keyboard_IRQn = 44, /*!< PL050 Interrupt */
|
||||||
|
Mouse_IRQn = 45, /*!< PL050 Interrupt */
|
||||||
|
CLCD_IRQn = 46, /*!< PL111 Interrupt */
|
||||||
|
Ethernet_IRQn = 47, /*!< SMSC_91C111 Interrupt */
|
||||||
|
VFS2_IRQn = 73, /*!< VFS2 Interrupt */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Peripheral memory map */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/* Peripheral and RAM base address */
|
||||||
|
#define VE_A9_MP_FLASH_BASE0 (0x00000000UL) /*!< (FLASH0 ) Base Address */
|
||||||
|
#define VE_A9_MP_FLASH_BASE1 (0x0C000000UL) /*!< (FLASH1 ) Base Address */
|
||||||
|
#define VE_A9_MP_SRAM_BASE (0x14000000UL) /*!< (SRAM ) Base Address */
|
||||||
|
#define VE_A9_MP_PERIPH_BASE_CS2 (0x18000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A9_MP_VRAM_BASE (0x00000000UL + VE_A9_MP_PERIPH_BASE_CS2) /*!< (VRAM ) Base Address */
|
||||||
|
#define VE_A9_MP_ETHERNET_BASE (0x02000000UL + VE_A9_MP_PERIPH_BASE_CS2) /*!< (ETHERNET ) Base Address */
|
||||||
|
#define VE_A9_MP_USB_BASE (0x03000000UL + VE_A9_MP_PERIPH_BASE_CS2) /*!< (USB ) Base Address */
|
||||||
|
#define VE_A9_MP_PERIPH_BASE_CS3 (0x1C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A9_MP_DAP_BASE (0x00000000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (LOCAL DAP ) Base Address */
|
||||||
|
#define VE_A9_MP_SYSTEM_REG_BASE (0x00010000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (SYSTEM REG ) Base Address */
|
||||||
|
#define VE_A9_MP_SERIAL_BASE (0x00030000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (SERIAL ) Base Address */
|
||||||
|
#define VE_A9_MP_AACI_BASE (0x00040000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (AACI ) Base Address */
|
||||||
|
#define VE_A9_MP_MMCI_BASE (0x00050000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (MMCI ) Base Address */
|
||||||
|
#define VE_A9_MP_KMI0_BASE (0x00060000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (KMI0 ) Base Address */
|
||||||
|
#define VE_A9_MP_UART_BASE (0x00090000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (UART ) Base Address */
|
||||||
|
#define VE_A9_MP_WDT_BASE (0x000F0000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (WDT ) Base Address */
|
||||||
|
#define VE_A9_MP_TIMER_BASE (0x00110000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (TIMER ) Base Address */
|
||||||
|
#define VE_A9_MP_DVI_BASE (0x00160000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (DVI ) Base Address */
|
||||||
|
#define VE_A9_MP_RTC_BASE (0x00170000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (RTC ) Base Address */
|
||||||
|
#define VE_A9_MP_UART4_BASE (0x001B0000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (UART4 ) Base Address */
|
||||||
|
#define VE_A9_MP_CLCD_BASE (0x001F0000UL + VE_A9_MP_PERIPH_BASE_CS3) /*!< (CLCD ) Base Address */
|
||||||
|
#define VE_A9_MP_PL310_BASE (0x1E00A000UL) /*!< (L2C-310 ) Base Address */
|
||||||
|
#define VE_A9_MP_PRIVATE_PERIPH_BASE (0x2C000000UL) /*!< (Peripheral ) Base Address */
|
||||||
|
#define VE_A9_MP_GIC_DISTRIBUTOR_BASE (0x00001000UL + VE_A9_MP_PRIVATE_PERIPH_BASE) /*!< (GIC DIST ) Base Address */
|
||||||
|
#define VE_A9_MP_GIC_INTERFACE_BASE (0x00000100UL + VE_A9_MP_PRIVATE_PERIPH_BASE) /*!< (GIC CPU IF ) Base Address */
|
||||||
|
#define VE_A9_MP_PRIVATE_TIMER (0x00000600UL + VE_A9_MP_PRIVATE_PERIPH_BASE) /*!< (PTIM ) Base Address */
|
||||||
|
#define VE_A9_MP_SSRAM_BASE (0x2E000000UL) /*!< (System SRAM) Base Address */
|
||||||
|
#define VE_A9_MP_DRAM_BASE (0x80000000UL) /*!< (DRAM ) Base Address */
|
||||||
|
#define GIC_DISTRIBUTOR_BASE VE_A9_MP_GIC_DISTRIBUTOR_BASE
|
||||||
|
#define GIC_INTERFACE_BASE VE_A9_MP_GIC_INTERFACE_BASE
|
||||||
|
#define TIMER_BASE VE_A9_MP_PRIVATE_TIMER
|
||||||
|
|
||||||
|
//The VE-A9 model implements L1 cache as architecturally defined, but does not implement L2 cache.
|
||||||
|
//Do not enable the L2 cache if you are running RTX on a VE-A9 model as it may cause a data abort.
|
||||||
|
#define L2C_310_BASE VE_A9_MP_PL310_BASE
|
||||||
|
|
||||||
|
/* -------- Configuration of the Cortex-A9 Processor and Core Peripherals ------- */
|
||||||
|
#define __CA_REV 0x0000U /*!< Core revision r0p0 */
|
||||||
|
#define __CORTEX_A 9U /*!< Cortex-A9 Core */
|
||||||
|
#define __FPU_PRESENT 1U /* FPU present */
|
||||||
|
#define __GIC_PRESENT 1U /* GIC present */
|
||||||
|
#define __TIM_PRESENT 1U /* TIM present */
|
||||||
|
#define __L2C_PRESENT 0U /* L2C present */
|
||||||
|
|
||||||
|
#include "core_ca.h"
|
||||||
|
#include <system_ARMCA9.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __ARMCA9_H__
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC5/ARMCA9.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC5/ARMCA9.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armcc -E
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA9.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
151
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC5/startup_ARMCA9.c
Normal file
151
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC5/startup_ARMCA9.c
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA9.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 10. January 2018
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA9.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((section("RESET")));
|
||||||
|
void Reset_Handler (void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Vectors(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
IMPORT Undef_Handler
|
||||||
|
IMPORT SVC_Handler
|
||||||
|
IMPORT PAbt_Handler
|
||||||
|
IMPORT DAbt_Handler
|
||||||
|
IMPORT IRQ_Handler
|
||||||
|
IMPORT FIQ_Handler
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__ASM void Reset_Handler(void) {
|
||||||
|
PRESERVE8
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5 // Read MPIDR
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
IMPORT |Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =|Image$$FIQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =|Image$$IRQ_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =|Image$$SVC_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =|Image$$ABT_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =|Image$$UND_STACK$$ZI$$Limit|
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =|Image$$ARM_LIB_STACK$$ZI$$Limit|
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
IMPORT SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
IMPORT __main
|
||||||
|
BL __main
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
77
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC6/ARMCA9.sct
Normal file
77
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC6/ARMCA9.sct
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-a9 -xc
|
||||||
|
;**************************************************
|
||||||
|
; Copyright (c) 2017 ARM Ltd. All rights reserved.
|
||||||
|
;**************************************************
|
||||||
|
|
||||||
|
; Scatter-file for RTX Example on Versatile Express
|
||||||
|
|
||||||
|
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
|
||||||
|
|
||||||
|
; This platform has 2GB SDRAM starting at 0x80000000.
|
||||||
|
|
||||||
|
#include "mem_ARMCA9.h"
|
||||||
|
|
||||||
|
SDRAM __ROM_BASE __ROM_SIZE ; load region size_region
|
||||||
|
{
|
||||||
|
VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
|
||||||
|
{
|
||||||
|
* (RESET, +FIRST) ; Vector table and other startup code
|
||||||
|
* (InRoot$$Sections) ; All (library) code that must be in a root region
|
||||||
|
* (+RO-CODE) ; Application RO code (.text)
|
||||||
|
* (+RO-DATA) ; Application RO data (.constdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_DATA __RAM_BASE __RW_DATA_SIZE
|
||||||
|
{ * (+RW) } ; Application RW data (.data)
|
||||||
|
|
||||||
|
ZI_DATA (__RAM_BASE+
|
||||||
|
__RW_DATA_SIZE) __ZI_DATA_SIZE
|
||||||
|
{ * (+ZI) } ; Application ZI data (.bss)
|
||||||
|
|
||||||
|
ARM_LIB_HEAP (__RAM_BASE
|
||||||
|
+__RW_DATA_SIZE
|
||||||
|
+__ZI_DATA_SIZE) EMPTY __HEAP_SIZE ; Heap region growing up
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ARM_LIB_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE
|
||||||
|
-__UND_STACK_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
|
||||||
|
{ }
|
||||||
|
|
||||||
|
UND_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE
|
||||||
|
-__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE ; UND mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
ABT_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE
|
||||||
|
-__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE ; ABT mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
SVC_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE
|
||||||
|
-__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE ; SVC mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
IRQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE
|
||||||
|
-__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE ; IRQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
FIQ_STACK (__RAM_BASE
|
||||||
|
+__RAM_SIZE) EMPTY -__FIQ_STACK_SIZE ; FIQ mode stack
|
||||||
|
{ }
|
||||||
|
|
||||||
|
TTB __TTB_BASE EMPTY __TTB_SIZE ; Level-1 Translation Table for MMU
|
||||||
|
{ }
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC6/startup_ARMCA9.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA9/Source/AC6/startup_ARMCA9.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA9.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA9.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void) __attribute__ ((noreturn));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$ARM_LIB_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL __main \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
181
云台/云台/.cmsis/device/ARM/ARMCA9/Source/GCC/ARMCA9.ld
Normal file
181
云台/云台/.cmsis/device/ARM/ARMCA9/Source/GCC/ARMCA9.ld
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
#include "mem_ARMCA9.h"
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
ROM (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
L_TTB (rw) : ORIGIN = __TTB_BASE, LENGTH = __TTB_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
|
||||||
|
Image$$VECTORS$$Base = .;
|
||||||
|
* (RESET)
|
||||||
|
KEEP(*(.isr_vector))
|
||||||
|
Image$$VECTORS$$Limit = .;
|
||||||
|
|
||||||
|
*(SVC_TABLE)
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
Image$$RO_DATA$$Base = .;
|
||||||
|
*(.rodata*)
|
||||||
|
Image$$RO_DATA$$Limit = .;
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > ROM
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG (__data_end__ - __data_start__)
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
LONG (__bss_start__)
|
||||||
|
LONG (__bss_end__ - __bss_start__)
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
__etext = .;
|
||||||
|
|
||||||
|
.ttb :
|
||||||
|
{
|
||||||
|
Image$$TTB$$ZI$$Base = .;
|
||||||
|
. += __TTB_SIZE;
|
||||||
|
Image$$TTB$$ZI$$Limit = .;
|
||||||
|
} > L_TTB
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
Image$$RW_DATA$$Base = .;
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data*)
|
||||||
|
Image$$RW_DATA$$Limit = .;
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
|
||||||
|
.bss ALIGN(0x400):
|
||||||
|
{
|
||||||
|
Image$$ZI_DATA$$Base = .;
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
__bss_end__ = .;
|
||||||
|
Image$$ZI_DATA$$Limit = .;
|
||||||
|
__end__ = .;
|
||||||
|
end = __end__;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
#if defined(__HEAP_SIZE) && (__HEAP_SIZE > 0)
|
||||||
|
.heap (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
Image$$HEAP$$ZI$$Base = .;
|
||||||
|
. += __HEAP_SIZE;
|
||||||
|
Image$$HEAP$$ZI$$Limit = .;
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.stack (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE - __FIQ_STACK_SIZE - __IRQ_STACK_SIZE - __SVC_STACK_SIZE - __ABT_STACK_SIZE - __UND_STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
|
||||||
|
__StackTop = .;
|
||||||
|
Image$$SYS_STACK$$ZI$$Base = .;
|
||||||
|
. += __STACK_SIZE;
|
||||||
|
Image$$SYS_STACK$$ZI$$Limit = .;
|
||||||
|
__stack = .;
|
||||||
|
|
||||||
|
Image$$FIQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __FIQ_STACK_SIZE;
|
||||||
|
Image$$FIQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$IRQ_STACK$$ZI$$Base = .;
|
||||||
|
. += __IRQ_STACK_SIZE;
|
||||||
|
Image$$IRQ_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$SVC_STACK$$ZI$$Base = .;
|
||||||
|
. += __SVC_STACK_SIZE;
|
||||||
|
Image$$SVC_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$ABT_STACK$$ZI$$Base = .;
|
||||||
|
. += __ABT_STACK_SIZE;
|
||||||
|
Image$$ABT_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
Image$$UND_STACK$$ZI$$Base = .;
|
||||||
|
. += __UND_STACK_SIZE;
|
||||||
|
Image$$UND_STACK$$ZI$$Limit = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
}
|
||||||
136
云台/云台/.cmsis/device/ARM/ARMCA9/Source/GCC/startup_ARMCA9.c
Normal file
136
云台/云台/.cmsis/device/ARM/ARMCA9/Source/GCC/startup_ARMCA9.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA9.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 10. January 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ARMCA9.h>
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Definitions
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define USR_MODE 0x10 // User mode
|
||||||
|
#define FIQ_MODE 0x11 // Fast Interrupt Request mode
|
||||||
|
#define IRQ_MODE 0x12 // Interrupt Request mode
|
||||||
|
#define SVC_MODE 0x13 // Supervisor mode
|
||||||
|
#define ABT_MODE 0x17 // Abort mode
|
||||||
|
#define UND_MODE 0x1B // Undefined Instruction mode
|
||||||
|
#define SYS_MODE 0x1F // System mode
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors (void) __attribute__ ((naked, section("RESET")));
|
||||||
|
void Reset_Handler (void) __attribute__ ((naked));
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Undef_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DAbt_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void IRQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void FIQ_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Vectors(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
"LDR PC, =Reset_Handler \n"
|
||||||
|
"LDR PC, =Undef_Handler \n"
|
||||||
|
"LDR PC, =SVC_Handler \n"
|
||||||
|
"LDR PC, =PAbt_Handler \n"
|
||||||
|
"LDR PC, =DAbt_Handler \n"
|
||||||
|
"NOP \n"
|
||||||
|
"LDR PC, =IRQ_Handler \n"
|
||||||
|
"LDR PC, =FIQ_Handler \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Reset_Handler(void) {
|
||||||
|
__ASM volatile(
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
"CPSID if \n"
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
"MRC p15, 0, R0, c0, c0, 5 \n" // Read MPIDR
|
||||||
|
"ANDS R0, R0, #3 \n"
|
||||||
|
"goToSleep: \n"
|
||||||
|
"WFINE \n"
|
||||||
|
"BNE goToSleep \n"
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
"MRC p15, 0, R0, c1, c0, 0 \n" // Read CP15 System Control register
|
||||||
|
"BIC R0, R0, #(0x1 << 12) \n" // Clear I bit 12 to disable I Cache
|
||||||
|
"BIC R0, R0, #(0x1 << 2) \n" // Clear C bit 2 to disable D Cache
|
||||||
|
"BIC R0, R0, #0x1 \n" // Clear M bit 0 to disable MMU
|
||||||
|
"BIC R0, R0, #(0x1 << 11) \n" // Clear Z bit 11 to disable branch prediction
|
||||||
|
"BIC R0, R0, #(0x1 << 13) \n" // Clear V bit 13 to disable hivecs
|
||||||
|
"MCR p15, 0, R0, c1, c0, 0 \n" // Write value back to CP15 System Control register
|
||||||
|
"ISB \n"
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
"MRC p15, 0, r0, c1, c0, 1 \n" // Read CP15 Auxiliary Control Register
|
||||||
|
"ORR r0, r0, #(1 << 1) \n" // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
"MCR p15, 0, r0, c1, c0, 1 \n" // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
"LDR R0, =Vectors \n"
|
||||||
|
"MCR p15, 0, R0, c12, c0, 0 \n"
|
||||||
|
|
||||||
|
// Setup Stack for each exceptional mode
|
||||||
|
"CPS #0x11 \n"
|
||||||
|
"LDR SP, =Image$$FIQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x12 \n"
|
||||||
|
"LDR SP, =Image$$IRQ_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x13 \n"
|
||||||
|
"LDR SP, =Image$$SVC_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x17 \n"
|
||||||
|
"LDR SP, =Image$$ABT_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1B \n"
|
||||||
|
"LDR SP, =Image$$UND_STACK$$ZI$$Limit \n"
|
||||||
|
"CPS #0x1F \n"
|
||||||
|
"LDR SP, =Image$$SYS_STACK$$ZI$$Limit \n"
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
"BL SystemInit \n"
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
"CPSIE if \n"
|
||||||
|
|
||||||
|
// Call __main
|
||||||
|
"BL _start \n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void) {
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
67
云台/云台/.cmsis/device/ARM/ARMCA9/Source/IAR/ARMCA9.icf
Normal file
67
云台/云台/.cmsis/device/ARM/ARMCA9/Source/IAR/ARMCA9.icf
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
/*-Memory Regions-*/
|
||||||
|
define symbol __ICFEDIT_region_IROM1_start__ = 0x80000000;
|
||||||
|
define symbol __ICFEDIT_region_IROM1_end__ = 0x801FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_start__ = 0x80200000;
|
||||||
|
define symbol __ICFEDIT_region_IRAM1_end__ = 0x803FFFFF;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
||||||
|
define symbol __ICFEDIT_region_TTB_start__ = 0x80500000;
|
||||||
|
define symbol __ICFEDIT_region_TTB_end__ = 0x805FFFFF;
|
||||||
|
|
||||||
|
/*-Sizes-*/
|
||||||
|
define symbol __ICFEDIT_size_cstack__ = 0x1000;
|
||||||
|
define symbol __ICFEDIT_size_irqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_svcstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_abtstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_undstack__ = 0x100;
|
||||||
|
define symbol __ICFEDIT_size_heap__ = 0x8000;
|
||||||
|
define symbol __ICFEDIT_size_ttb__ = 0x4000;
|
||||||
|
|
||||||
|
define memory mem with size = 4G;
|
||||||
|
define region IROM_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__];
|
||||||
|
define region IRAM_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__];
|
||||||
|
define region ERAM_region = mem:[from __ICFEDIT_region_ERAM1_start__ to __ICFEDIT_region_ERAM1_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM2_start__ to __ICFEDIT_region_ERAM2_end__]
|
||||||
|
| mem:[from __ICFEDIT_region_ERAM3_start__ to __ICFEDIT_region_ERAM3_end__];
|
||||||
|
define region TTB_region = mem:[from __ICFEDIT_region_TTB_start__ to __ICFEDIT_region_TTB_end__ ];
|
||||||
|
|
||||||
|
define block USR_STACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||||
|
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
|
||||||
|
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
|
||||||
|
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
|
||||||
|
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
|
||||||
|
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
|
||||||
|
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||||
|
define block TTB with alignment = 8, size = __ICFEDIT_size_ttb__ { section TTB };
|
||||||
|
|
||||||
|
do not initialize { section .noinit };
|
||||||
|
|
||||||
|
initialize by copy { readwrite };
|
||||||
|
if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
|
||||||
|
{
|
||||||
|
// Required in a multi-threaded application
|
||||||
|
initialize by copy with packing = none { section __DLIB_PERTHREAD };
|
||||||
|
}
|
||||||
|
|
||||||
|
place at address mem:__ICFEDIT_region_IROM1_start__ { readonly section RESET };
|
||||||
|
place in IROM_region { readonly };
|
||||||
|
place in IRAM_region { readwrite, block HEAP, block USR_STACK, block IRQ_STACK, block FIQ_STACK, block SVC_STACK, block ABT_STACK, block UND_STACK };
|
||||||
|
place in TTB_region { block TTB };
|
||||||
140
云台/云台/.cmsis/device/ARM/ARMCA9/Source/IAR/startup_ARMCA9.s
Normal file
140
云台/云台/.cmsis/device/ARM/ARMCA9/Source/IAR/startup_ARMCA9.s
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCA9.s
|
||||||
|
* @brief CMSIS Device System Source File for ARM Cortex-A9 Device Series
|
||||||
|
* @version V1.00
|
||||||
|
* @date 01 Nov 2017
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MODULE ?startup_ARMCA9
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
PUBLIC Reset_Handler
|
||||||
|
PUBWEAK Undef_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PAbt_Handler
|
||||||
|
PUBWEAK DAbt_Handler
|
||||||
|
PUBWEAK IRQ_Handler
|
||||||
|
PUBWEAK FIQ_Handler
|
||||||
|
|
||||||
|
SECTION SVC_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION IRQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION FIQ_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION ABT_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION UND_STACK:DATA:NOROOT(3)
|
||||||
|
SECTION USR_STACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector Table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
section RESET:CODE:NOROOT(2)
|
||||||
|
PUBLIC Vectors
|
||||||
|
|
||||||
|
Vectors:
|
||||||
|
LDR PC, =Reset_Handler
|
||||||
|
LDR PC, =Undef_Handler
|
||||||
|
LDR PC, =SVC_Handler
|
||||||
|
LDR PC, =PAbt_Handler
|
||||||
|
LDR PC, =DAbt_Handler
|
||||||
|
NOP
|
||||||
|
LDR PC, =IRQ_Handler
|
||||||
|
LDR PC, =FIQ_Handler
|
||||||
|
|
||||||
|
|
||||||
|
section .text:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
EXTERN SystemInit
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
|
||||||
|
Reset_Handler:
|
||||||
|
|
||||||
|
// Mask interrupts
|
||||||
|
CPSID if
|
||||||
|
|
||||||
|
// Put any cores other than 0 to sleep
|
||||||
|
MRC p15, 0, R0, c0, c0, 5
|
||||||
|
ANDS R0, R0, #3
|
||||||
|
goToSleep:
|
||||||
|
WFINE
|
||||||
|
BNE goToSleep
|
||||||
|
|
||||||
|
// Reset SCTLR Settings
|
||||||
|
MRC p15, 0, R0, c1, c0, 0 // Read CP15 System Control register
|
||||||
|
BIC R0, R0, #(0x1 << 12) // Clear I bit 12 to disable I Cache
|
||||||
|
BIC R0, R0, #(0x1 << 2) // Clear C bit 2 to disable D Cache
|
||||||
|
BIC R0, R0, #0x1 // Clear M bit 0 to disable MMU
|
||||||
|
BIC R0, R0, #(0x1 << 11) // Clear Z bit 11 to disable branch prediction
|
||||||
|
BIC R0, R0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
|
||||||
|
MCR p15, 0, R0, c1, c0, 0 // Write value back to CP15 System Control register
|
||||||
|
ISB
|
||||||
|
|
||||||
|
// Configure ACTLR
|
||||||
|
MRC p15, 0, r0, c1, c0, 1 // Read CP15 Auxiliary Control Register
|
||||||
|
ORR r0, r0, #(1 << 1) // Enable L2 prefetch hint (UNK/WI since r4p1)
|
||||||
|
MCR p15, 0, r0, c1, c0, 1 // Write CP15 Auxiliary Control Register
|
||||||
|
|
||||||
|
// Set Vector Base Address Register (VBAR) to point to this application's vector table
|
||||||
|
LDR R0, =Vectors
|
||||||
|
MCR p15, 0, R0, c12, c0, 0
|
||||||
|
|
||||||
|
// Setup Stack for each exception mode
|
||||||
|
CPS #0x11
|
||||||
|
LDR SP, =SFE(FIQ_STACK)
|
||||||
|
CPS #0x12
|
||||||
|
LDR SP, =SFE(IRQ_STACK)
|
||||||
|
CPS #0x13
|
||||||
|
LDR SP, =SFE(SVC_STACK)
|
||||||
|
CPS #0x17
|
||||||
|
LDR SP, =SFE(ABT_STACK)
|
||||||
|
CPS #0x1B
|
||||||
|
LDR SP, =SFE(UND_STACK)
|
||||||
|
CPS #0x1F
|
||||||
|
LDR SP, =SFE(USR_STACK)
|
||||||
|
|
||||||
|
// Call SystemInit
|
||||||
|
BL SystemInit
|
||||||
|
|
||||||
|
// Unmask interrupts
|
||||||
|
CPSIE if
|
||||||
|
|
||||||
|
// Call __iar_program_start
|
||||||
|
BL __iar_program_start
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
Undef_Handler:
|
||||||
|
SVC_Handler:
|
||||||
|
PAbt_Handler:
|
||||||
|
DAbt_Handler:
|
||||||
|
IRQ_Handler:
|
||||||
|
FIQ_Handler:
|
||||||
|
Default_Handler:
|
||||||
|
B .
|
||||||
|
|
||||||
|
END
|
||||||
232
云台/云台/.cmsis/device/ARM/ARMCA9/Source/mmu_ARMCA9.c
Normal file
232
云台/云台/.cmsis/device/ARM/ARMCA9/Source/mmu_ARMCA9.c
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file mmu_ARMCA9.c
|
||||||
|
* @brief MMU Configuration for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.2.0
|
||||||
|
* @date 15. May 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Memory map description from: DUI0447G_v2m_p1_trm.pdf 4.2.2 Arm Cortex-A Series memory map
|
||||||
|
|
||||||
|
Memory Type
|
||||||
|
0xffffffff |--------------------------| ------------
|
||||||
|
| FLAG SYNC | Device Memory
|
||||||
|
0xfffff000 |--------------------------| ------------
|
||||||
|
| Fault | Fault
|
||||||
|
0xfff00000 |--------------------------| ------------
|
||||||
|
| | Normal
|
||||||
|
| |
|
||||||
|
| Daughterboard |
|
||||||
|
| memory |
|
||||||
|
| |
|
||||||
|
0x80505000 |--------------------------| ------------
|
||||||
|
|TTB (L2 Sync Flags ) 4k | Normal
|
||||||
|
0x80504C00 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-B) 16k| Normal
|
||||||
|
0x80504800 |--------------------------| ------------
|
||||||
|
|TTB (L2 Peripherals-A) 16k| Normal
|
||||||
|
0x80504400 |--------------------------| ------------
|
||||||
|
|TTB (L2 Priv Periphs) 4k | Normal
|
||||||
|
0x80504000 |--------------------------| ------------
|
||||||
|
| TTB (L1 Descriptors) | Normal
|
||||||
|
0x80500000 |--------------------------| ------------
|
||||||
|
| Stack | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| Heap | Normal
|
||||||
|
0x80400000 |--------------------------| ------------
|
||||||
|
| ZI Data | Normal
|
||||||
|
0x80300000 |--------------------------| ------------
|
||||||
|
| RW Data | Normal
|
||||||
|
0x80200000 |--------------------------| ------------
|
||||||
|
| RO Data | Normal
|
||||||
|
|--------------------------| ------------
|
||||||
|
| RO Code | USH Normal
|
||||||
|
0x80000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| HSB AXI buses |
|
||||||
|
0x40000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x2c002000 |--------------------------| ------------
|
||||||
|
| Private Address | Device Memory
|
||||||
|
0x2c000000 |--------------------------| ------------
|
||||||
|
| Daughterboard | Fault
|
||||||
|
| test chips peripherals |
|
||||||
|
0x20000000 |--------------------------| ------------
|
||||||
|
| Peripherals | Device Memory RW/RO
|
||||||
|
| | & Fault
|
||||||
|
0x00000000 |--------------------------|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// L1 Cache info and restrictions about architecture of the caches (CCSIR register):
|
||||||
|
// Write-Through support *not* available
|
||||||
|
// Write-Back support available.
|
||||||
|
// Read allocation support available.
|
||||||
|
// Write allocation support available.
|
||||||
|
|
||||||
|
//Note: You should use the Shareable attribute carefully.
|
||||||
|
//For cores without coherency logic (such as SCU) marking a region as shareable forces the processor to not cache that region regardless of the inner cache settings.
|
||||||
|
//Cortex-A versions of RTX use LDREX/STREX instructions relying on Local monitors. Local monitors will be used only when the region gets cached, regions that are not cached will use the Global Monitor.
|
||||||
|
//Some Cortex-A implementations do not include Global Monitors, so wrongly setting the attribute Shareable may cause STREX to fail.
|
||||||
|
|
||||||
|
//Recall: When the Shareable attribute is applied to a memory region that is not Write-Back, Normal memory, data held in this region is treated as Non-cacheable.
|
||||||
|
//When SMP bit = 0, Inner WB/WA Cacheable Shareable attributes are treated as Non-cacheable.
|
||||||
|
//When SMP bit = 1, Inner WB/WA Cacheable Shareable attributes are treated as Cacheable.
|
||||||
|
|
||||||
|
|
||||||
|
//Following MMU configuration is expected
|
||||||
|
//SCTLR.AFE == 1 (Simplified access permissions model - AP[2:1] define access permissions, AP[0] is an access flag)
|
||||||
|
//SCTLR.TRE == 0 (TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor)
|
||||||
|
//Domain 0 is always the Client domain
|
||||||
|
//Descriptors should place all memory in domain 0
|
||||||
|
|
||||||
|
#include "ARMCA9.h"
|
||||||
|
#include "mem_ARMCA9.h"
|
||||||
|
|
||||||
|
// TTB base address
|
||||||
|
#define TTB_BASE ((uint32_t*)__TTB_BASE)
|
||||||
|
|
||||||
|
// L2 table pointers
|
||||||
|
//----------------------------------------
|
||||||
|
#define TTB_L1_SIZE (0x00004000) // The L1 translation table divides the full 4GB address space of a 32-bit core
|
||||||
|
// into 4096 equally sized sections, each of which describes 1MB of virtual memory space.
|
||||||
|
// The L1 translation table therefore contains 4096 32-bit (word-sized) entries.
|
||||||
|
|
||||||
|
#define PRIVATE_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE) // Map 4k Private Address space
|
||||||
|
#define PERIPHERAL_A_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x400) // Map 64k Peripheral #1 0x1C000000 - 0x1C00FFFFF
|
||||||
|
#define PERIPHERAL_B_TABLE_L2_BASE_64k (__TTB_BASE + TTB_L1_SIZE + 0x800) // Map 64k Peripheral #2 0x1C100000 - 0x1C1FFFFFF
|
||||||
|
#define SYNC_FLAGS_TABLE_L2_BASE_4k (__TTB_BASE + TTB_L1_SIZE + 0xC00) // Map 4k Flag synchronization
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
#define PERIPHERAL_A_FAULT (0x00000000 + 0x1c000000) //0x1C000000-0x1C00FFFF (1M)
|
||||||
|
#define PERIPHERAL_B_FAULT (0x00100000 + 0x1c000000) //0x1C100000-0x1C10FFFF (1M)
|
||||||
|
|
||||||
|
//--------------------- SYNC FLAGS --------------------
|
||||||
|
#define FLAG_SYNC 0xFFFFF000
|
||||||
|
#define F_SYNC_BASE 0xFFF00000 //1M aligned
|
||||||
|
|
||||||
|
static uint32_t Sect_Normal; //outer & inner wb/wa, non-shareable, executable, rw, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_Cod; //outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Normal_RO; //as Sect_Normal_Cod, but not executable
|
||||||
|
static uint32_t Sect_Normal_RW; //as Sect_Normal_Cod, but writeable and not executable
|
||||||
|
static uint32_t Sect_Device_RO; //device, non-shareable, non-executable, ro, domain 0, base addr 0
|
||||||
|
static uint32_t Sect_Device_RW; //as Sect_Device_RO, but writeable
|
||||||
|
|
||||||
|
/* Define global descriptors */
|
||||||
|
static uint32_t Page_L1_4k = 0x0; //generic
|
||||||
|
static uint32_t Page_L1_64k = 0x0; //generic
|
||||||
|
static uint32_t Page_4k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
static uint32_t Page_64k_Device_RW; //Shared device, not executable, rw, domain 0
|
||||||
|
|
||||||
|
void MMU_CreateTranslationTable(void)
|
||||||
|
{
|
||||||
|
mmu_region_attributes_Type region;
|
||||||
|
|
||||||
|
//Create 4GB of faulting entries
|
||||||
|
MMU_TTSection (TTB_BASE, 0, 4096, DESCRIPTOR_FAULT);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generate descriptors. Refer to core_ca.h to get information about attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Create descriptors for Vectors, RO, RW, ZI sections
|
||||||
|
section_normal(Sect_Normal, region);
|
||||||
|
section_normal_cod(Sect_Normal_Cod, region);
|
||||||
|
section_normal_ro(Sect_Normal_RO, region);
|
||||||
|
section_normal_rw(Sect_Normal_RW, region);
|
||||||
|
//Create descriptors for peripherals
|
||||||
|
section_device_ro(Sect_Device_RO, region);
|
||||||
|
section_device_rw(Sect_Device_RW, region);
|
||||||
|
//Create descriptors for 64k pages
|
||||||
|
page64k_device_rw(Page_L1_64k, Page_64k_Device_RW, region);
|
||||||
|
//Create descriptors for 4k pages
|
||||||
|
page4k_device_rw(Page_L1_4k, Page_4k_Device_RW, region);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define MMU flat-map regions and attributes
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Define Image
|
||||||
|
MMU_TTSection (TTB_BASE, __ROM_BASE, __ROM_SIZE/0x100000, Sect_Normal_Cod); // multiple of 1MB sections
|
||||||
|
MMU_TTSection (TTB_BASE, __RAM_BASE, __RAM_SIZE/0x100000, Sect_Normal_RW); // multiple of 1MB sections
|
||||||
|
|
||||||
|
//--------------------- PERIPHERALS -------------------
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_FLASH_BASE0 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_FLASH_BASE1 , 64, Sect_Device_RO); // 64MB NOR
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_SRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_VRAM_BASE , 32, Sect_Device_RW); // 32MB RAM
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_ETHERNET_BASE , 16, Sect_Device_RW);
|
||||||
|
MMU_TTSection (TTB_BASE, VE_A9_MP_USB_BASE , 16, Sect_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_A_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C000000-0x1C00FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_DAP_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_SYSTEM_REG_BASE, 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_SERIAL_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_AACI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_MMCI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_KMI0_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_UART_BASE , 4, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_WDT_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_A_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (16 * 64k)=1MB faulting entries to cover peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, PERIPHERAL_B_FAULT , 16, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, DESCRIPTOR_FAULT);
|
||||||
|
// Define peripheral range 0x1C100000-0x1C10FFFF
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_TIMER_BASE , 2, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_DVI_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_RTC_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_UART4_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
MMU_TTPage64k(TTB_BASE, VE_A9_MP_CLCD_BASE , 1, Page_L1_64k, (uint32_t *)PERIPHERAL_B_TABLE_L2_BASE_64k, Page_64k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to cover private address space. Needs to be marked as Device memory
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() ,256, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define private address space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, __get_CBAR() , 2, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
// Define L2CC entry. Uncomment if PL310 is present
|
||||||
|
// MMU_TTPage4k (TTB_BASE, VE_A5_MP_PL310_BASE , 1, Page_L1_4k, (uint32_t *)PRIVATE_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
// Create (256 * 4k)=1MB faulting entries to synchronization space (Useful if some non-cacheable DMA agent is present in the SoC)
|
||||||
|
MMU_TTPage4k (TTB_BASE, F_SYNC_BASE , 256, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, DESCRIPTOR_FAULT);
|
||||||
|
// Define synchronization space entry.
|
||||||
|
MMU_TTPage4k (TTB_BASE, FLAG_SYNC , 1, Page_L1_4k, (uint32_t *)SYNC_FLAGS_TABLE_L2_BASE_4k, Page_4k_Device_RW);
|
||||||
|
|
||||||
|
/* Set location of level 1 page table
|
||||||
|
; 31:14 - Translation table base addr (31:14-TTBCR.N, TTBCR.N is 0 out of reset)
|
||||||
|
; 13:7 - 0x0
|
||||||
|
; 6 - IRGN[0] 0x1 (Inner WB WA)
|
||||||
|
; 5 - NOS 0x0 (Non-shared)
|
||||||
|
; 4:3 - RGN 0x01 (Outer WB WA)
|
||||||
|
; 2 - IMP 0x0 (Implementation Defined)
|
||||||
|
; 1 - S 0x0 (Non-shared)
|
||||||
|
; 0 - IRGN[1] 0x0 (Inner WB WA) */
|
||||||
|
__set_TTBR0(__TTB_BASE | 0x48);
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
/* Set up domain access control register
|
||||||
|
; We set domain 0 to Client and all other domains to No Access.
|
||||||
|
; All translation table entries specify domain 0 */
|
||||||
|
__set_DACR(1);
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
93
云台/云台/.cmsis/device/ARM/ARMCA9/Source/system_ARMCA9.c
Normal file
93
云台/云台/.cmsis/device/ARM/ARMCA9/Source/system_ARMCA9.c
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file system_ARMCA9.c
|
||||||
|
* @brief CMSIS Device System Source File for Arm Cortex-A9 Device Series
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 13. February 2019
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "RTE_Components.h"
|
||||||
|
#include CMSIS_device_header
|
||||||
|
#include "irq_ctrl.h"
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK 12000000U
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Initialization
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
/* do not use global variables because this function is called before
|
||||||
|
reaching pre-main. RW section may be overwritten afterwards. */
|
||||||
|
|
||||||
|
// Invalidate entire Unified TLB
|
||||||
|
__set_TLBIALL(0);
|
||||||
|
|
||||||
|
// Invalidate entire branch predictor array
|
||||||
|
__set_BPIALL(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate instruction cache and flush branch target cache
|
||||||
|
__set_ICIALLU(0);
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Invalidate data cache
|
||||||
|
L1C_InvalidateDCacheAll();
|
||||||
|
|
||||||
|
#if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
|
||||||
|
// Enable FPU
|
||||||
|
__FPU_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Create Translation Table
|
||||||
|
MMU_CreateTranslationTable();
|
||||||
|
|
||||||
|
// Enable MMU
|
||||||
|
MMU_Enable();
|
||||||
|
|
||||||
|
// Enable Caches
|
||||||
|
L1C_EnableCaches();
|
||||||
|
L1C_EnableBTAC();
|
||||||
|
|
||||||
|
#if (__L2C_PRESENT == 1)
|
||||||
|
// Enable GIC
|
||||||
|
L2C_Enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// IRQ Initialize
|
||||||
|
IRQ_Initialize();
|
||||||
|
}
|
||||||
126
云台/云台/.cmsis/device/ARM/ARMCM0/Include/ARMCM0.h
Normal file
126
云台/云台/.cmsis/device/ARM/ARMCM0/Include/ARMCM0.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM0.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM0 Device
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM0_H
|
||||||
|
#define ARMCM0_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 31 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM0_REV 0x0000U /* Core revision r0p0 */
|
||||||
|
#define __MPU_PRESENT 0U /* no MPU present */
|
||||||
|
#define __VTOR_PRESENT 0U /* no VTOR present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm0.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM0.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM0_H */
|
||||||
62
云台/云台/.cmsis/device/ARM/ARMCM0/Include/system_ARMCM0.h
Normal file
62
云台/云台/.cmsis/device/ARM/ARMCM0/Include/system_ARMCM0.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM0.h
|
||||||
|
* @brief CMSIS Device System Header File for
|
||||||
|
* ARMCM0 Device
|
||||||
|
* @version V5.3.2
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SYSTEM_ARMCM0_H
|
||||||
|
#define SYSTEM_ARMCM0_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception / Interrupt Handler Function Prototype
|
||||||
|
*/
|
||||||
|
typedef void(*VECTOR_TABLE_Type)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief System Clock Frequency (Core Clock)
|
||||||
|
*/
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SYSTEM_ARMCM0_H */
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/ARMCM0_ac5.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/ARMCM0_ac5.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armcc -E
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/ARMCM0_ac6.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/ARMCM0_ac6.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m0 -xc
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
168
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/startup_ARMCM0.s
Normal file
168
云台/云台/.cmsis/device/ARM/ARMCM0/Source/ARM/startup_ARMCM0.s
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM0.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM0 Device
|
||||||
|
; * @version V1.0.1
|
||||||
|
; * @date 23. July 2019
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x00000400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__stack_limit
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x00000C00
|
||||||
|
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
SPACE ( 22 * 4) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT SystemInit
|
||||||
|
IMPORT __main
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; The default macro is not used for HardFault_Handler
|
||||||
|
; because this results in a poor debug illusion.
|
||||||
|
HardFault_Handler PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Macro to define default exception/interrupt handlers.
|
||||||
|
; Default handler are weak symbols with an endless loop.
|
||||||
|
; They can be overwritten by real handlers.
|
||||||
|
MACRO
|
||||||
|
Set_Default_Handler $Handler_Name
|
||||||
|
$Handler_Name PROC
|
||||||
|
EXPORT $Handler_Name [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MEND
|
||||||
|
|
||||||
|
|
||||||
|
; Default exception/interrupt handler
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
|
||||||
|
; User setup Stack & Heap
|
||||||
|
|
||||||
|
IF :LNOT::DEF:__MICROLIB
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
EXPORT __stack_limit
|
||||||
|
EXPORT __initial_sp
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
296
云台/云台/.cmsis/device/ARM/ARMCM0/Source/GCC/gcc_arm.ld
Normal file
296
云台/云台/.cmsis/device/ARM/ARMCM0/Source/GCC/gcc_arm.ld
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file gcc_arm.ld
|
||||||
|
* @brief GNU Linker Script for Cortex-M based device
|
||||||
|
* @version V2.1.0
|
||||||
|
* @date 04. August 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*---------------------- Flash Configuration ----------------------------------
|
||||||
|
<h> Flash Configuration
|
||||||
|
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__ROM_BASE = 0x00000000;
|
||||||
|
__ROM_SIZE = 0x00040000;
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||||
|
<h> RAM Configuration
|
||||||
|
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__RAM_BASE = 0x20000000;
|
||||||
|
__RAM_SIZE = 0x00020000;
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||||
|
<h> Stack / Heap Configuration
|
||||||
|
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__STACK_SIZE = 0x00000400;
|
||||||
|
__HEAP_SIZE = 0x00000C00;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------------------- <<< end of configuration section >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
|
* It references following symbols, which must be defined in code:
|
||||||
|
* Reset_Handler : Entry of reset handler
|
||||||
|
*
|
||||||
|
* It defines following symbols, which code can use without definition:
|
||||||
|
* __exidx_start
|
||||||
|
* __exidx_end
|
||||||
|
* __copy_table_start__
|
||||||
|
* __copy_table_end__
|
||||||
|
* __zero_table_start__
|
||||||
|
* __zero_table_end__
|
||||||
|
* __etext
|
||||||
|
* __data_start__
|
||||||
|
* __preinit_array_start
|
||||||
|
* __preinit_array_end
|
||||||
|
* __init_array_start
|
||||||
|
* __init_array_end
|
||||||
|
* __fini_array_start
|
||||||
|
* __fini_array_end
|
||||||
|
* __data_end__
|
||||||
|
* __bss_start__
|
||||||
|
* __bss_end__
|
||||||
|
* __end__
|
||||||
|
* end
|
||||||
|
* __HeapLimit
|
||||||
|
* __StackLimit
|
||||||
|
* __StackTop
|
||||||
|
* __stack
|
||||||
|
*/
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
*(.rodata*)
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SG veneers:
|
||||||
|
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||||
|
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||||
|
* to indicate where to place these veneers in memory.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.gnu.sgstubs :
|
||||||
|
{
|
||||||
|
. = ALIGN(32);
|
||||||
|
} > FLASH
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > FLASH
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG ((__data_end__ - __data_start__) / 4)
|
||||||
|
|
||||||
|
/* Add each additional data section here */
|
||||||
|
/*
|
||||||
|
LONG (__etext2)
|
||||||
|
LONG (__data2_start__)
|
||||||
|
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
/* Add each additional bss section here */
|
||||||
|
/*
|
||||||
|
LONG (__bss2_start__)
|
||||||
|
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||||
|
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||||
|
* which must be 4byte aligned
|
||||||
|
*/
|
||||||
|
__etext = ALIGN (4);
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary data section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional data section
|
||||||
|
* to the .copy.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
__etext2 = ALIGN (4);
|
||||||
|
|
||||||
|
.data2 : AT (__etext2)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_start__ = .;
|
||||||
|
*(.data2)
|
||||||
|
*(.data2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_end__ = .;
|
||||||
|
|
||||||
|
} > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_end__ = .;
|
||||||
|
} > RAM AT > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary bss section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional bss section
|
||||||
|
* to the .zero.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.bss2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_start__ = .;
|
||||||
|
*(.bss2)
|
||||||
|
*(.bss2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_end__ = .;
|
||||||
|
} > RAM2 AT > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heap (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
. = . + __HEAP_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackLimit = .;
|
||||||
|
. = . + __STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackTop = .;
|
||||||
|
} > RAM
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
|
}
|
||||||
181
云台/云台/.cmsis/device/ARM/ARMCM0/Source/GCC/startup_ARMCM0.S
Normal file
181
云台/云台/.cmsis/device/ARM/ARMCM0/Source/GCC/startup_ARMCM0.S
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file startup_ARMCM0.S
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for Cortex-M0 Device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv6-m
|
||||||
|
|
||||||
|
.section .vectors
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __StackTop /* Top of Stack */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVCall Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space ( 22 * 4) /* Interrupts 10 .. 31 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
ldr r4, =__copy_table_start__
|
||||||
|
ldr r5, =__copy_table_end__
|
||||||
|
|
||||||
|
.L_loop0:
|
||||||
|
cmp r4, r5
|
||||||
|
bge .L_loop0_done
|
||||||
|
ldr r1, [r4] /* source address */
|
||||||
|
ldr r2, [r4, #4] /* destination address */
|
||||||
|
ldr r3, [r4, #8] /* word count */
|
||||||
|
lsls r3, r3, #2 /* byte count */
|
||||||
|
|
||||||
|
.L_loop0_0:
|
||||||
|
subs r3, #4 /* decrement byte count */
|
||||||
|
blt .L_loop0_0_done
|
||||||
|
ldr r0, [r1, r3]
|
||||||
|
str r0, [r2, r3]
|
||||||
|
b .L_loop0_0
|
||||||
|
|
||||||
|
.L_loop0_0_done:
|
||||||
|
adds r4, #12
|
||||||
|
b .L_loop0
|
||||||
|
|
||||||
|
.L_loop0_done:
|
||||||
|
|
||||||
|
ldr r3, =__zero_table_start__
|
||||||
|
ldr r4, =__zero_table_end__
|
||||||
|
|
||||||
|
.L_loop2:
|
||||||
|
cmp r3, r4
|
||||||
|
bge .L_loop2_done
|
||||||
|
ldr r1, [r3] /* destination address */
|
||||||
|
ldr r2, [r3, #4] /* word count */
|
||||||
|
lsls r2, r2, #2 /* byte count */
|
||||||
|
movs r0, 0
|
||||||
|
|
||||||
|
.L_loop2_0:
|
||||||
|
subs r2, #4 /* decrement byte count */
|
||||||
|
blt .L_loop2_0_done
|
||||||
|
str r0, [r1, r2]
|
||||||
|
b .L_loop2_0
|
||||||
|
.L_loop2_0_done:
|
||||||
|
|
||||||
|
adds r3, #8
|
||||||
|
b .L_loop2
|
||||||
|
.L_loop2_done:
|
||||||
|
|
||||||
|
bl _start
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
|
||||||
|
.end
|
||||||
147
云台/云台/.cmsis/device/ARM/ARMCM0/Source/IAR/startup_ARMCM0.s
Normal file
147
云台/云台/.cmsis/device/ARM/ARMCM0/Source/IAR/startup_ARMCM0.s
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM0.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM0 Device
|
||||||
|
; * @version V1.0.0
|
||||||
|
; * @date 09. July 2018
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;
|
||||||
|
; The modules in this file are included in the libraries, and may be replaced
|
||||||
|
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||||
|
; a user defined start symbol.
|
||||||
|
; To override the cstartup defined in the library, simply add your modified
|
||||||
|
; version to the workbench project.
|
||||||
|
;
|
||||||
|
; The vector table is normally located at address 0.
|
||||||
|
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||||
|
; The name "__vector_table" has special meaning for C-SPY:
|
||||||
|
; it is where the SP start value is found, and the NVIC vector
|
||||||
|
; table register (VTOR) is initialized to this address if != 0.
|
||||||
|
;
|
||||||
|
; Cortex-M version
|
||||||
|
;
|
||||||
|
|
||||||
|
MODULE ?cstartup
|
||||||
|
|
||||||
|
;; Forward declaration of sections.
|
||||||
|
SECTION CSTACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
SECTION .intvec:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
EXTERN SystemInit
|
||||||
|
PUBLIC __vector_table
|
||||||
|
PUBLIC __vector_table_0x1c
|
||||||
|
PUBLIC __Vectors
|
||||||
|
PUBLIC __Vectors_End
|
||||||
|
PUBLIC __Vectors_Size
|
||||||
|
|
||||||
|
DATA
|
||||||
|
|
||||||
|
__vector_table
|
||||||
|
DCD sfe(CSTACK) ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
__vector_table_0x1c
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
DS32 ( 22) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors EQU __vector_table
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
PUBWEAK Reset_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||||
|
Reset_Handler
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__iar_program_start
|
||||||
|
BX R0
|
||||||
|
|
||||||
|
|
||||||
|
PUBWEAK NMI_Handler
|
||||||
|
PUBWEAK HardFault_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PendSV_Handler
|
||||||
|
PUBWEAK SysTick_Handler
|
||||||
|
|
||||||
|
PUBWEAK Interrupt0_Handler
|
||||||
|
PUBWEAK Interrupt1_Handler
|
||||||
|
PUBWEAK Interrupt2_Handler
|
||||||
|
PUBWEAK Interrupt3_Handler
|
||||||
|
PUBWEAK Interrupt4_Handler
|
||||||
|
PUBWEAK Interrupt5_Handler
|
||||||
|
PUBWEAK Interrupt6_Handler
|
||||||
|
PUBWEAK Interrupt7_Handler
|
||||||
|
PUBWEAK Interrupt8_Handler
|
||||||
|
PUBWEAK Interrupt9_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||||
|
NMI_Handler
|
||||||
|
HardFault_Handler
|
||||||
|
SVC_Handler
|
||||||
|
PendSV_Handler
|
||||||
|
SysTick_Handler
|
||||||
|
|
||||||
|
Interrupt0_Handler
|
||||||
|
Interrupt1_Handler
|
||||||
|
Interrupt2_Handler
|
||||||
|
Interrupt3_Handler
|
||||||
|
Interrupt4_Handler
|
||||||
|
Interrupt5_Handler
|
||||||
|
Interrupt6_Handler
|
||||||
|
Interrupt7_Handler
|
||||||
|
Interrupt8_Handler
|
||||||
|
Interrupt9_Handler
|
||||||
|
Default_Handler
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
146
云台/云台/.cmsis/device/ARM/ARMCM0/Source/startup_ARMCM0.c
Normal file
146
云台/云台/.cmsis/device/ARM/ARMCM0/Source/startup_ARMCM0.c
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM0.c
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for a Cortex-M0 Device
|
||||||
|
* @version V2.0.3
|
||||||
|
* @date 31. March 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM0)
|
||||||
|
#include "ARMCM0.h"
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
External References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern uint32_t __INITIAL_SP;
|
||||||
|
|
||||||
|
extern __NO_RETURN void __PROGRAM_START(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler (void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/* Exceptions */
|
||||||
|
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void HardFault_Handler (void) __attribute__ ((weak));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[48];
|
||||||
|
const VECTOR_TABLE_Type __VECTOR_TABLE[48] __VECTOR_TABLE_ATTRIBUTE = {
|
||||||
|
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||||
|
Reset_Handler, /* Reset Handler */
|
||||||
|
NMI_Handler, /* -14 NMI Handler */
|
||||||
|
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
SVC_Handler, /* -5 SVCall Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
PendSV_Handler, /* -2 PendSV Handler */
|
||||||
|
SysTick_Handler, /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||||
|
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||||
|
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||||
|
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||||
|
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||||
|
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||||
|
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||||
|
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||||
|
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||||
|
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
/* Interrupts 10..31 are left out */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler(void)
|
||||||
|
{
|
||||||
|
SystemInit(); /* CMSIS System Initialization */
|
||||||
|
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Hard Fault Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
56
云台/云台/.cmsis/device/ARM/ARMCM0/Source/system_ARMCM0.c
Normal file
56
云台/云台/.cmsis/device/ARM/ARMCM0/Source/system_ARMCM0.c
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM0.c
|
||||||
|
* @brief CMSIS Device System Source File for
|
||||||
|
* ARMCM0 Device
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ARMCM0.h"
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Define clocks
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define XTAL (50000000UL) /* Oscillator frequency */
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK (XTAL / 2U)
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Core Clock Frequency */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System initialization function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
126
云台/云台/.cmsis/device/ARM/ARMCM0plus/Include/ARMCM0plus.h
Normal file
126
云台/云台/.cmsis/device/ARM/ARMCM0plus/Include/ARMCM0plus.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM0plus.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM0plus Device
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM0plus_H
|
||||||
|
#define ARMCM0plus_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 31 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM0PLUS_REV 0x0001U /* Core revision r0p1 */
|
||||||
|
#define __MPU_PRESENT 0U /* no MPU present */
|
||||||
|
#define __VTOR_PRESENT 0U /* no VTOR present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm0plus.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM0plus.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM0plus_H */
|
||||||
126
云台/云台/.cmsis/device/ARM/ARMCM0plus/Include/ARMCM0plus_MPU.h
Normal file
126
云台/云台/.cmsis/device/ARM/ARMCM0plus/Include/ARMCM0plus_MPU.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM0plus_MPU.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM0plus Device (configured for CM0+ with MPU)
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM0plus_MPU_H
|
||||||
|
#define ARMCM0plus_MPU_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 31 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM0PLUS_REV 0x0001U /* Core revision r0p1 */
|
||||||
|
#define __MPU_PRESENT 1U /* MPU present */
|
||||||
|
#define __VTOR_PRESENT 0U /* no VTOR present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm0plus.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM0plus.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM0plus_MPU_H */
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM0plus.h
|
||||||
|
* @brief CMSIS Device System Header File for
|
||||||
|
* ARMCM0 Device
|
||||||
|
* @version V5.3.2
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SYSTEM_ARMCM0plus_H
|
||||||
|
#define SYSTEM_ARMCM0plus_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception / Interrupt Handler Function Prototype
|
||||||
|
*/
|
||||||
|
typedef void(*VECTOR_TABLE_Type)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief System Clock Frequency (Core Clock)
|
||||||
|
*/
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SYSTEM_ARMCM0plus_H */
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#! armcc -E
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m0+ -xc
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM0plus.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM0plus Device
|
||||||
|
; * @version V1.0.1
|
||||||
|
; * @date 23. July 2019
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x00000400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__stack_limit
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x00000C00
|
||||||
|
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
SPACE ( 22 * 4) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT SystemInit
|
||||||
|
IMPORT __main
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; The default macro is not used for HardFault_Handler
|
||||||
|
; because this results in a poor debug illusion.
|
||||||
|
HardFault_Handler PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Macro to define default exception/interrupt handlers.
|
||||||
|
; Default handler are weak symbols with an endless loop.
|
||||||
|
; They can be overwritten by real handlers.
|
||||||
|
MACRO
|
||||||
|
Set_Default_Handler $Handler_Name
|
||||||
|
$Handler_Name PROC
|
||||||
|
EXPORT $Handler_Name [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MEND
|
||||||
|
|
||||||
|
|
||||||
|
; Default exception/interrupt handler
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
|
||||||
|
; User setup Stack & Heap
|
||||||
|
|
||||||
|
IF :LNOT::DEF:__MICROLIB
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
EXPORT __stack_limit
|
||||||
|
EXPORT __initial_sp
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
296
云台/云台/.cmsis/device/ARM/ARMCM0plus/Source/GCC/gcc_arm.ld
Normal file
296
云台/云台/.cmsis/device/ARM/ARMCM0plus/Source/GCC/gcc_arm.ld
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file gcc_arm.ld
|
||||||
|
* @brief GNU Linker Script for Cortex-M based device
|
||||||
|
* @version V2.1.0
|
||||||
|
* @date 04. August 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*---------------------- Flash Configuration ----------------------------------
|
||||||
|
<h> Flash Configuration
|
||||||
|
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__ROM_BASE = 0x00000000;
|
||||||
|
__ROM_SIZE = 0x00040000;
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||||
|
<h> RAM Configuration
|
||||||
|
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__RAM_BASE = 0x20000000;
|
||||||
|
__RAM_SIZE = 0x00020000;
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||||
|
<h> Stack / Heap Configuration
|
||||||
|
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__STACK_SIZE = 0x00000400;
|
||||||
|
__HEAP_SIZE = 0x00000C00;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------------------- <<< end of configuration section >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
|
* It references following symbols, which must be defined in code:
|
||||||
|
* Reset_Handler : Entry of reset handler
|
||||||
|
*
|
||||||
|
* It defines following symbols, which code can use without definition:
|
||||||
|
* __exidx_start
|
||||||
|
* __exidx_end
|
||||||
|
* __copy_table_start__
|
||||||
|
* __copy_table_end__
|
||||||
|
* __zero_table_start__
|
||||||
|
* __zero_table_end__
|
||||||
|
* __etext
|
||||||
|
* __data_start__
|
||||||
|
* __preinit_array_start
|
||||||
|
* __preinit_array_end
|
||||||
|
* __init_array_start
|
||||||
|
* __init_array_end
|
||||||
|
* __fini_array_start
|
||||||
|
* __fini_array_end
|
||||||
|
* __data_end__
|
||||||
|
* __bss_start__
|
||||||
|
* __bss_end__
|
||||||
|
* __end__
|
||||||
|
* end
|
||||||
|
* __HeapLimit
|
||||||
|
* __StackLimit
|
||||||
|
* __StackTop
|
||||||
|
* __stack
|
||||||
|
*/
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
*(.rodata*)
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SG veneers:
|
||||||
|
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||||
|
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||||
|
* to indicate where to place these veneers in memory.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.gnu.sgstubs :
|
||||||
|
{
|
||||||
|
. = ALIGN(32);
|
||||||
|
} > FLASH
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > FLASH
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG ((__data_end__ - __data_start__) / 4)
|
||||||
|
|
||||||
|
/* Add each additional data section here */
|
||||||
|
/*
|
||||||
|
LONG (__etext2)
|
||||||
|
LONG (__data2_start__)
|
||||||
|
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
/* Add each additional bss section here */
|
||||||
|
/*
|
||||||
|
LONG (__bss2_start__)
|
||||||
|
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||||
|
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||||
|
* which must be 4byte aligned
|
||||||
|
*/
|
||||||
|
__etext = ALIGN (4);
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary data section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional data section
|
||||||
|
* to the .copy.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
__etext2 = ALIGN (4);
|
||||||
|
|
||||||
|
.data2 : AT (__etext2)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_start__ = .;
|
||||||
|
*(.data2)
|
||||||
|
*(.data2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_end__ = .;
|
||||||
|
|
||||||
|
} > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_end__ = .;
|
||||||
|
} > RAM AT > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary bss section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional bss section
|
||||||
|
* to the .zero.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.bss2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_start__ = .;
|
||||||
|
*(.bss2)
|
||||||
|
*(.bss2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_end__ = .;
|
||||||
|
} > RAM2 AT > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heap (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
. = . + __HEAP_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackLimit = .;
|
||||||
|
. = . + __STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackTop = .;
|
||||||
|
} > RAM
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
|
}
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file startup_ARMCM0plus.S
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for Cortex-M0plus Device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv6-m
|
||||||
|
|
||||||
|
.section .vectors
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __StackTop /* Top of Stack */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVCall Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space ( 22 * 4) /* Interrupts 10 .. 31 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
ldr r4, =__copy_table_start__
|
||||||
|
ldr r5, =__copy_table_end__
|
||||||
|
|
||||||
|
.L_loop0:
|
||||||
|
cmp r4, r5
|
||||||
|
bge .L_loop0_done
|
||||||
|
ldr r1, [r4] /* source address */
|
||||||
|
ldr r2, [r4, #4] /* destination address */
|
||||||
|
ldr r3, [r4, #8] /* word count */
|
||||||
|
lsls r3, r3, #2 /* byte count */
|
||||||
|
|
||||||
|
.L_loop0_0:
|
||||||
|
subs r3, #4 /* decrement byte count */
|
||||||
|
blt .L_loop0_0_done
|
||||||
|
ldr r0, [r1, r3]
|
||||||
|
str r0, [r2, r3]
|
||||||
|
b .L_loop0_0
|
||||||
|
|
||||||
|
.L_loop0_0_done:
|
||||||
|
adds r4, #12
|
||||||
|
b .L_loop0
|
||||||
|
|
||||||
|
.L_loop0_done:
|
||||||
|
|
||||||
|
ldr r3, =__zero_table_start__
|
||||||
|
ldr r4, =__zero_table_end__
|
||||||
|
|
||||||
|
.L_loop2:
|
||||||
|
cmp r3, r4
|
||||||
|
bge .L_loop2_done
|
||||||
|
ldr r1, [r3] /* destination address */
|
||||||
|
ldr r2, [r3, #4] /* word count */
|
||||||
|
lsls r2, r2, #2 /* byte count */
|
||||||
|
movs r0, 0
|
||||||
|
|
||||||
|
.L_loop2_0:
|
||||||
|
subs r2, #4 /* decrement byte count */
|
||||||
|
blt .L_loop2_0_done
|
||||||
|
str r0, [r1, r2]
|
||||||
|
b .L_loop2_0
|
||||||
|
.L_loop2_0_done:
|
||||||
|
|
||||||
|
adds r3, #8
|
||||||
|
b .L_loop2
|
||||||
|
.L_loop2_done:
|
||||||
|
|
||||||
|
bl _start
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
|
||||||
|
.end
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM0plus.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM0plus Device
|
||||||
|
; * @version V1.0.0
|
||||||
|
; * @date 09. July 2018
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;
|
||||||
|
; The modules in this file are included in the libraries, and may be replaced
|
||||||
|
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||||
|
; a user defined start symbol.
|
||||||
|
; To override the cstartup defined in the library, simply add your modified
|
||||||
|
; version to the workbench project.
|
||||||
|
;
|
||||||
|
; The vector table is normally located at address 0.
|
||||||
|
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||||
|
; The name "__vector_table" has special meaning for C-SPY:
|
||||||
|
; it is where the SP start value is found, and the NVIC vector
|
||||||
|
; table register (VTOR) is initialized to this address if != 0.
|
||||||
|
;
|
||||||
|
; Cortex-M version
|
||||||
|
;
|
||||||
|
|
||||||
|
MODULE ?cstartup
|
||||||
|
|
||||||
|
;; Forward declaration of sections.
|
||||||
|
SECTION CSTACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
SECTION .intvec:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
EXTERN SystemInit
|
||||||
|
PUBLIC __vector_table
|
||||||
|
PUBLIC __vector_table_0x1c
|
||||||
|
PUBLIC __Vectors
|
||||||
|
PUBLIC __Vectors_End
|
||||||
|
PUBLIC __Vectors_Size
|
||||||
|
|
||||||
|
DATA
|
||||||
|
|
||||||
|
__vector_table
|
||||||
|
DCD sfe(CSTACK) ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
__vector_table_0x1c
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
DS32 ( 22) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors EQU __vector_table
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
PUBWEAK Reset_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||||
|
Reset_Handler
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__iar_program_start
|
||||||
|
BX R0
|
||||||
|
|
||||||
|
|
||||||
|
PUBWEAK NMI_Handler
|
||||||
|
PUBWEAK HardFault_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PendSV_Handler
|
||||||
|
PUBWEAK SysTick_Handler
|
||||||
|
|
||||||
|
PUBWEAK Interrupt0_Handler
|
||||||
|
PUBWEAK Interrupt1_Handler
|
||||||
|
PUBWEAK Interrupt2_Handler
|
||||||
|
PUBWEAK Interrupt3_Handler
|
||||||
|
PUBWEAK Interrupt4_Handler
|
||||||
|
PUBWEAK Interrupt5_Handler
|
||||||
|
PUBWEAK Interrupt6_Handler
|
||||||
|
PUBWEAK Interrupt7_Handler
|
||||||
|
PUBWEAK Interrupt8_Handler
|
||||||
|
PUBWEAK Interrupt9_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||||
|
NMI_Handler
|
||||||
|
HardFault_Handler
|
||||||
|
SVC_Handler
|
||||||
|
PendSV_Handler
|
||||||
|
SysTick_Handler
|
||||||
|
|
||||||
|
Interrupt0_Handler
|
||||||
|
Interrupt1_Handler
|
||||||
|
Interrupt2_Handler
|
||||||
|
Interrupt3_Handler
|
||||||
|
Interrupt4_Handler
|
||||||
|
Interrupt5_Handler
|
||||||
|
Interrupt6_Handler
|
||||||
|
Interrupt7_Handler
|
||||||
|
Interrupt8_Handler
|
||||||
|
Interrupt9_Handler
|
||||||
|
Default_Handler
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
148
云台/云台/.cmsis/device/ARM/ARMCM0plus/Source/startup_ARMCM0plus.c
Normal file
148
云台/云台/.cmsis/device/ARM/ARMCM0plus/Source/startup_ARMCM0plus.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM0plus.c
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for a Cortex-M0+ Device
|
||||||
|
* @version V2.0.3
|
||||||
|
* @date 31. March 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM0P)
|
||||||
|
#include "ARMCM0plus.h"
|
||||||
|
#elif defined (ARMCM0P_MPU)
|
||||||
|
#include "ARMCM0plus_MPU.h"
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
External References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern uint32_t __INITIAL_SP;
|
||||||
|
|
||||||
|
extern __NO_RETURN void __PROGRAM_START(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler (void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/* Exceptions */
|
||||||
|
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void HardFault_Handler (void) __attribute__ ((weak));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[48];
|
||||||
|
const VECTOR_TABLE_Type __VECTOR_TABLE[48] __VECTOR_TABLE_ATTRIBUTE = {
|
||||||
|
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||||
|
Reset_Handler, /* Reset Handler */
|
||||||
|
NMI_Handler, /* -14 NMI Handler */
|
||||||
|
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
SVC_Handler, /* -5 SVCall Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
PendSV_Handler, /* -2 PendSV Handler */
|
||||||
|
SysTick_Handler, /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||||
|
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||||
|
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||||
|
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||||
|
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||||
|
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||||
|
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||||
|
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||||
|
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||||
|
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
/* Interrupts 10..31 are left out */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler(void)
|
||||||
|
{
|
||||||
|
SystemInit(); /* CMSIS System Initialization */
|
||||||
|
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Hard Fault Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM0plus.c
|
||||||
|
* @brief CMSIS Device System Source File for
|
||||||
|
* ARMCM0plus Device
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ARMCM0plus.h"
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Define clocks
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define XTAL (50000000UL) /* Oscillator frequency */
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK (XTAL / 2U)
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Core Clock Frequency */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System initialization function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
|
SCB->VTOR = (uint32_t) &(__VECTOR_TABLE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
126
云台/云台/.cmsis/device/ARM/ARMCM1/Include/ARMCM1.h
Normal file
126
云台/云台/.cmsis/device/ARM/ARMCM1/Include/ARMCM1.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM1.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM1 Device
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 20. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM1_H
|
||||||
|
#define ARMCM1_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 31 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM1_REV 0x0100U /* Core revision r1p0 */
|
||||||
|
#define __MPU_PRESENT 0U /* no MPU present */
|
||||||
|
#define __VTOR_PRESENT 0U /* no VTOR present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm1.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM1.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM1_H */
|
||||||
62
云台/云台/.cmsis/device/ARM/ARMCM1/Include/system_ARMCM1.h
Normal file
62
云台/云台/.cmsis/device/ARM/ARMCM1/Include/system_ARMCM1.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM1.h
|
||||||
|
* @brief CMSIS Device System Header File for
|
||||||
|
* ARMCM1 Device
|
||||||
|
* @version V5.3.2
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SYSTEM_ARMCM1_H
|
||||||
|
#define SYSTEM_ARMCM1_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception / Interrupt Handler Function Prototype
|
||||||
|
*/
|
||||||
|
typedef void(*VECTOR_TABLE_Type)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief System Clock Frequency (Core Clock)
|
||||||
|
*/
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SYSTEM_ARMCM1_H */
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/ARMCM1_ac5.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/ARMCM1_ac5.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armcc -E
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/ARMCM1_ac6.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/ARMCM1_ac6.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m1 -xc
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
168
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/startup_ARMCM1.s
Normal file
168
云台/云台/.cmsis/device/ARM/ARMCM1/Source/ARM/startup_ARMCM1.s
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM1.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM1 Device
|
||||||
|
; * @version V1.0.1
|
||||||
|
; * @date 23. July 2019
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x00000400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__stack_limit
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x00000C00
|
||||||
|
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
SPACE ( 22 * 4) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT SystemInit
|
||||||
|
IMPORT __main
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; The default macro is not used for HardFault_Handler
|
||||||
|
; because this results in a poor debug illusion.
|
||||||
|
HardFault_Handler PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Macro to define default exception/interrupt handlers.
|
||||||
|
; Default handler are weak symbols with an endless loop.
|
||||||
|
; They can be overwritten by real handlers.
|
||||||
|
MACRO
|
||||||
|
Set_Default_Handler $Handler_Name
|
||||||
|
$Handler_Name PROC
|
||||||
|
EXPORT $Handler_Name [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MEND
|
||||||
|
|
||||||
|
|
||||||
|
; Default exception/interrupt handler
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
|
||||||
|
; User setup Stack & Heap
|
||||||
|
|
||||||
|
IF :LNOT::DEF:__MICROLIB
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
EXPORT __stack_limit
|
||||||
|
EXPORT __initial_sp
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
296
云台/云台/.cmsis/device/ARM/ARMCM1/Source/GCC/gcc_arm.ld
Normal file
296
云台/云台/.cmsis/device/ARM/ARMCM1/Source/GCC/gcc_arm.ld
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file gcc_arm.ld
|
||||||
|
* @brief GNU Linker Script for Cortex-M based device
|
||||||
|
* @version V2.1.0
|
||||||
|
* @date 04. August 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*---------------------- Flash Configuration ----------------------------------
|
||||||
|
<h> Flash Configuration
|
||||||
|
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__ROM_BASE = 0x00000000;
|
||||||
|
__ROM_SIZE = 0x00040000;
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||||
|
<h> RAM Configuration
|
||||||
|
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__RAM_BASE = 0x20000000;
|
||||||
|
__RAM_SIZE = 0x00020000;
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||||
|
<h> Stack / Heap Configuration
|
||||||
|
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__STACK_SIZE = 0x00000400;
|
||||||
|
__HEAP_SIZE = 0x00000C00;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------------------- <<< end of configuration section >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
|
* It references following symbols, which must be defined in code:
|
||||||
|
* Reset_Handler : Entry of reset handler
|
||||||
|
*
|
||||||
|
* It defines following symbols, which code can use without definition:
|
||||||
|
* __exidx_start
|
||||||
|
* __exidx_end
|
||||||
|
* __copy_table_start__
|
||||||
|
* __copy_table_end__
|
||||||
|
* __zero_table_start__
|
||||||
|
* __zero_table_end__
|
||||||
|
* __etext
|
||||||
|
* __data_start__
|
||||||
|
* __preinit_array_start
|
||||||
|
* __preinit_array_end
|
||||||
|
* __init_array_start
|
||||||
|
* __init_array_end
|
||||||
|
* __fini_array_start
|
||||||
|
* __fini_array_end
|
||||||
|
* __data_end__
|
||||||
|
* __bss_start__
|
||||||
|
* __bss_end__
|
||||||
|
* __end__
|
||||||
|
* end
|
||||||
|
* __HeapLimit
|
||||||
|
* __StackLimit
|
||||||
|
* __StackTop
|
||||||
|
* __stack
|
||||||
|
*/
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
*(.rodata*)
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SG veneers:
|
||||||
|
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||||
|
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||||
|
* to indicate where to place these veneers in memory.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.gnu.sgstubs :
|
||||||
|
{
|
||||||
|
. = ALIGN(32);
|
||||||
|
} > FLASH
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > FLASH
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG ((__data_end__ - __data_start__) / 4)
|
||||||
|
|
||||||
|
/* Add each additional data section here */
|
||||||
|
/*
|
||||||
|
LONG (__etext2)
|
||||||
|
LONG (__data2_start__)
|
||||||
|
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
/* Add each additional bss section here */
|
||||||
|
/*
|
||||||
|
LONG (__bss2_start__)
|
||||||
|
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||||
|
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||||
|
* which must be 4byte aligned
|
||||||
|
*/
|
||||||
|
__etext = ALIGN (4);
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary data section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional data section
|
||||||
|
* to the .copy.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
__etext2 = ALIGN (4);
|
||||||
|
|
||||||
|
.data2 : AT (__etext2)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_start__ = .;
|
||||||
|
*(.data2)
|
||||||
|
*(.data2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_end__ = .;
|
||||||
|
|
||||||
|
} > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_end__ = .;
|
||||||
|
} > RAM AT > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary bss section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional bss section
|
||||||
|
* to the .zero.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.bss2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_start__ = .;
|
||||||
|
*(.bss2)
|
||||||
|
*(.bss2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_end__ = .;
|
||||||
|
} > RAM2 AT > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heap (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
. = . + __HEAP_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackLimit = .;
|
||||||
|
. = . + __STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackTop = .;
|
||||||
|
} > RAM
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
|
}
|
||||||
181
云台/云台/.cmsis/device/ARM/ARMCM1/Source/GCC/startup_ARMCM1.S
Normal file
181
云台/云台/.cmsis/device/ARM/ARMCM1/Source/GCC/startup_ARMCM1.S
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file startup_ARMCM1.S
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for Cortex-M1 Device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv6-m
|
||||||
|
|
||||||
|
.section .vectors
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __StackTop /* Top of Stack */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVCall Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space ( 22 * 4) /* Interrupts 10 .. 31 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
ldr r4, =__copy_table_start__
|
||||||
|
ldr r5, =__copy_table_end__
|
||||||
|
|
||||||
|
.L_loop0:
|
||||||
|
cmp r4, r5
|
||||||
|
bge .L_loop0_done
|
||||||
|
ldr r1, [r4] /* source address */
|
||||||
|
ldr r2, [r4, #4] /* destination address */
|
||||||
|
ldr r3, [r4, #8] /* word count */
|
||||||
|
lsls r3, r3, #2 /* byte count */
|
||||||
|
|
||||||
|
.L_loop0_0:
|
||||||
|
subs r3, #4 /* decrement byte count */
|
||||||
|
blt .L_loop0_0_done
|
||||||
|
ldr r0, [r1, r3]
|
||||||
|
str r0, [r2, r3]
|
||||||
|
b .L_loop0_0
|
||||||
|
|
||||||
|
.L_loop0_0_done:
|
||||||
|
adds r4, #12
|
||||||
|
b .L_loop0
|
||||||
|
|
||||||
|
.L_loop0_done:
|
||||||
|
|
||||||
|
ldr r3, =__zero_table_start__
|
||||||
|
ldr r4, =__zero_table_end__
|
||||||
|
|
||||||
|
.L_loop2:
|
||||||
|
cmp r3, r4
|
||||||
|
bge .L_loop2_done
|
||||||
|
ldr r1, [r3] /* destination address */
|
||||||
|
ldr r2, [r3, #4] /* word count */
|
||||||
|
lsls r2, r2, #2 /* byte count */
|
||||||
|
movs r0, 0
|
||||||
|
|
||||||
|
.L_loop2_0:
|
||||||
|
subs r2, #4 /* decrement byte count */
|
||||||
|
blt .L_loop2_0_done
|
||||||
|
str r0, [r1, r2]
|
||||||
|
b .L_loop2_0
|
||||||
|
.L_loop2_0_done:
|
||||||
|
|
||||||
|
adds r3, #8
|
||||||
|
b .L_loop2
|
||||||
|
.L_loop2_done:
|
||||||
|
|
||||||
|
bl _start
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
|
||||||
|
.end
|
||||||
147
云台/云台/.cmsis/device/ARM/ARMCM1/Source/IAR/startup_ARMCM1.s
Normal file
147
云台/云台/.cmsis/device/ARM/ARMCM1/Source/IAR/startup_ARMCM1.s
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM1.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM1 Device
|
||||||
|
; * @version V1.0.0
|
||||||
|
; * @date 20. July 2018
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;
|
||||||
|
; The modules in this file are included in the libraries, and may be replaced
|
||||||
|
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||||
|
; a user defined start symbol.
|
||||||
|
; To override the cstartup defined in the library, simply add your modified
|
||||||
|
; version to the workbench project.
|
||||||
|
;
|
||||||
|
; The vector table is normally located at address 0.
|
||||||
|
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||||
|
; The name "__vector_table" has special meaning for C-SPY:
|
||||||
|
; it is where the SP start value is found, and the NVIC vector
|
||||||
|
; table register (VTOR) is initialized to this address if != 0.
|
||||||
|
;
|
||||||
|
; Cortex-M version
|
||||||
|
;
|
||||||
|
|
||||||
|
MODULE ?cstartup
|
||||||
|
|
||||||
|
;; Forward declaration of sections.
|
||||||
|
SECTION CSTACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
SECTION .intvec:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
EXTERN SystemInit
|
||||||
|
PUBLIC __vector_table
|
||||||
|
PUBLIC __vector_table_0x1c
|
||||||
|
PUBLIC __Vectors
|
||||||
|
PUBLIC __Vectors_End
|
||||||
|
PUBLIC __Vectors_Size
|
||||||
|
|
||||||
|
DATA
|
||||||
|
|
||||||
|
__vector_table
|
||||||
|
DCD sfe(CSTACK) ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
__vector_table_0x1c
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
DS32 ( 22) ; Interrupts 10 .. 31 are left out
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors EQU __vector_table
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
PUBWEAK Reset_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||||
|
Reset_Handler
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__iar_program_start
|
||||||
|
BX R0
|
||||||
|
|
||||||
|
|
||||||
|
PUBWEAK NMI_Handler
|
||||||
|
PUBWEAK HardFault_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PendSV_Handler
|
||||||
|
PUBWEAK SysTick_Handler
|
||||||
|
|
||||||
|
PUBWEAK Interrupt0_Handler
|
||||||
|
PUBWEAK Interrupt1_Handler
|
||||||
|
PUBWEAK Interrupt2_Handler
|
||||||
|
PUBWEAK Interrupt3_Handler
|
||||||
|
PUBWEAK Interrupt4_Handler
|
||||||
|
PUBWEAK Interrupt5_Handler
|
||||||
|
PUBWEAK Interrupt6_Handler
|
||||||
|
PUBWEAK Interrupt7_Handler
|
||||||
|
PUBWEAK Interrupt8_Handler
|
||||||
|
PUBWEAK Interrupt9_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||||
|
NMI_Handler
|
||||||
|
HardFault_Handler
|
||||||
|
SVC_Handler
|
||||||
|
PendSV_Handler
|
||||||
|
SysTick_Handler
|
||||||
|
|
||||||
|
Interrupt0_Handler
|
||||||
|
Interrupt1_Handler
|
||||||
|
Interrupt2_Handler
|
||||||
|
Interrupt3_Handler
|
||||||
|
Interrupt4_Handler
|
||||||
|
Interrupt5_Handler
|
||||||
|
Interrupt6_Handler
|
||||||
|
Interrupt7_Handler
|
||||||
|
Interrupt8_Handler
|
||||||
|
Interrupt9_Handler
|
||||||
|
Default_Handler
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
146
云台/云台/.cmsis/device/ARM/ARMCM1/Source/startup_ARMCM1.c
Normal file
146
云台/云台/.cmsis/device/ARM/ARMCM1/Source/startup_ARMCM1.c
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM1.c
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for a Cortex-M1 Device
|
||||||
|
* @version V2.0.3
|
||||||
|
* @date 31. March 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM1)
|
||||||
|
#include "ARMCM1.h"
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
External References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern uint32_t __INITIAL_SP;
|
||||||
|
|
||||||
|
extern __NO_RETURN void __PROGRAM_START(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler (void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/* Exceptions */
|
||||||
|
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void HardFault_Handler (void) __attribute__ ((weak));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[48];
|
||||||
|
const VECTOR_TABLE_Type __VECTOR_TABLE[48] __VECTOR_TABLE_ATTRIBUTE = {
|
||||||
|
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||||
|
Reset_Handler, /* Reset Handler */
|
||||||
|
NMI_Handler, /* -14 NMI Handler */
|
||||||
|
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
SVC_Handler, /* -5 SVCall Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
PendSV_Handler, /* -2 PendSV Handler */
|
||||||
|
SysTick_Handler, /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||||
|
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||||
|
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||||
|
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||||
|
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||||
|
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||||
|
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||||
|
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||||
|
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||||
|
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
/* Interrupts 10..31 are left out */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler(void)
|
||||||
|
{
|
||||||
|
SystemInit(); /* CMSIS System Initialization */
|
||||||
|
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Hard Fault Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
56
云台/云台/.cmsis/device/ARM/ARMCM1/Source/system_ARMCM1.c
Normal file
56
云台/云台/.cmsis/device/ARM/ARMCM1/Source/system_ARMCM1.c
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM1.c
|
||||||
|
* @brief CMSIS Device System Source File for
|
||||||
|
* ARMCM1 Device
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 20. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ARMCM1.h"
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Define clocks
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define XTAL (50000000UL) /* Oscillator frequency */
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK (XTAL / 2U)
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Core Clock Frequency */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System initialization function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
13
云台/云台/.cmsis/device/ARM/ARMCM23/Debug/ARMv8MBL.dbgconf
Normal file
13
云台/云台/.cmsis/device/ARM/ARMCM23/Debug/ARMv8MBL.dbgconf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// <<< Use Configuration Wizard in Context Menu >>>
|
||||||
|
|
||||||
|
// <e> Fixed Debug Authentication
|
||||||
|
// <i> Use a fixed value for Debug Authentication. Only secure debug authentication configurable.
|
||||||
|
DAuthFixed = 0x1;
|
||||||
|
|
||||||
|
// <q.2> Secure Invasive Debug
|
||||||
|
// <q.3> Secure Non-Invasive Debug
|
||||||
|
DAuthConfig = 0xF;
|
||||||
|
|
||||||
|
// </e>
|
||||||
|
|
||||||
|
// <<< end of configuration section >>>
|
||||||
127
云台/云台/.cmsis/device/ARM/ARMCM23/Include/ARMCM23.h
Normal file
127
云台/云台/.cmsis/device/ARM/ARMCM23/Include/ARMCM23.h
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM23.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM23 Device
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM23_H
|
||||||
|
#define ARMCM23_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 224 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM23_REV 0x0100U /* Core revision r1p0 */
|
||||||
|
#define __SAUREGION_PRESENT 0U /* SAU regions are not present */
|
||||||
|
#define __MPU_PRESENT 1U /* MPU is present */
|
||||||
|
#define __VTOR_PRESENT 1U /* VTOR is present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm23.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM23.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM23_H */
|
||||||
127
云台/云台/.cmsis/device/ARM/ARMCM23/Include/ARMCM23_TZ.h
Normal file
127
云台/云台/.cmsis/device/ARM/ARMCM23/Include/ARMCM23_TZ.h
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM23_TZ.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM23 Device (configured for TrustZone)
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM23_TZ_H
|
||||||
|
#define ARMCM23_TZ_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 224 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM23_REV 0x0100U /* Core revision r1p0 */
|
||||||
|
#define __SAUREGION_PRESENT 1U /* SAU regions are present */
|
||||||
|
#define __MPU_PRESENT 1U /* MPU is present */
|
||||||
|
#define __VTOR_PRESENT 1U /* VTOR is present */
|
||||||
|
#define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm23.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM23.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM23_TZ_H */
|
||||||
@@ -0,0 +1,832 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file partition_ARMCM23.h
|
||||||
|
* @brief CMSIS-CORE Initial Setup for Secure / Non-Secure Zones for ARMCM23
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PARTITION_ARMCM23_H
|
||||||
|
#define PARTITION_ARMCM23_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize Security Attribution Unit (SAU) CTRL register
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_CTRL 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <q> Enable SAU
|
||||||
|
// <i> Value for SAU->CTRL register bit ENABLE
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_CTRL_ENABLE 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o> When SAU is disabled
|
||||||
|
// <0=> All Memory is Secure
|
||||||
|
// <1=> All Memory is Non-Secure
|
||||||
|
// <i> Value for SAU->CTRL register bit ALLNS
|
||||||
|
// <i> When all Memory is Non-Secure (ALLNS is 1), IDAU can override memory map configuration.
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_CTRL_ALLNS 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <h>Initialize Security Attribution Unit (SAU) Address Regions
|
||||||
|
// <i>SAU configuration specifies regions to be one of:
|
||||||
|
// <i> - Secure and Non-Secure Callable
|
||||||
|
// <i> - Non-Secure
|
||||||
|
// <i>Note: All memory regions not configured by SAU are Secure
|
||||||
|
*/
|
||||||
|
#define SAU_REGIONS_MAX 8 /* Max. number of SAU regions */
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 0
|
||||||
|
// <i> Setup SAU Region 0 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION0 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START0 0x00000000 /* start address of SAU region 0 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END0 0x001FFFFF /* end address of SAU region 0 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC0 1
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 1
|
||||||
|
// <i> Setup SAU Region 1 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION1 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START1 0x00200000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END1 0x003FFFFF
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC1 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 2
|
||||||
|
// <i> Setup SAU Region 2 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION2 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START2 0x20200000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END2 0x203FFFFF
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC2 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 3
|
||||||
|
// <i> Setup SAU Region 3 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION3 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START3 0x40000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END3 0x40040000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC3 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 4
|
||||||
|
// <i> Setup SAU Region 4 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION4 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START4 0x00000000 /* start address of SAU region 4 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END4 0x00000000 /* end address of SAU region 4 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC4 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 5
|
||||||
|
// <i> Setup SAU Region 5 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION5 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START5 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END5 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC5 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 6
|
||||||
|
// <i> Setup SAU Region 6 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION6 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START6 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END6 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC6 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize SAU Region 7
|
||||||
|
// <i> Setup SAU Region 7 memory attributes
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_REGION7 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Start Address <0-0xFFFFFFE0>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_START7 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>End Address <0x1F-0xFFFFFFFF>
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_END7 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Region is
|
||||||
|
// <0=>Non-Secure
|
||||||
|
// <1=>Secure, Non-Secure Callable
|
||||||
|
*/
|
||||||
|
#define SAU_INIT_NSC7 0
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </h>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Setup behaviour of Sleep and Exception Handling
|
||||||
|
*/
|
||||||
|
#define SCB_CSR_AIRCR_INIT 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o> Deep Sleep can be enabled by
|
||||||
|
// <0=>Secure and Non-Secure state
|
||||||
|
// <1=>Secure state only
|
||||||
|
// <i> Value for SCB->CSR register bit DEEPSLEEPS
|
||||||
|
*/
|
||||||
|
#define SCB_CSR_DEEPSLEEPS_VAL 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>System reset request accessible from
|
||||||
|
// <0=> Secure and Non-Secure state
|
||||||
|
// <1=> Secure state only
|
||||||
|
// <i> Value for SCB->AIRCR register bit SYSRESETREQS
|
||||||
|
*/
|
||||||
|
#define SCB_AIRCR_SYSRESETREQS_VAL 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>Priority of Non-Secure exceptions is
|
||||||
|
// <0=> Not altered
|
||||||
|
// <1=> Lowered to 0x80-0xFF
|
||||||
|
// <i> Value for SCB->AIRCR register bit PRIS
|
||||||
|
*/
|
||||||
|
#define SCB_AIRCR_PRIS_VAL 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o>BusFault, HardFault, and NMI target
|
||||||
|
// <0=> Secure state
|
||||||
|
// <1=> Non-Secure state
|
||||||
|
// <i> Value for SCB->AIRCR register bit BFHFNMINS
|
||||||
|
*/
|
||||||
|
#define SCB_AIRCR_BFHFNMINS_VAL 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Setup behaviour of single SysTick
|
||||||
|
*/
|
||||||
|
#define SCB_ICSR_INIT 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <o> in a single SysTick implementation, SysTick is
|
||||||
|
// <0=>Secure
|
||||||
|
// <1=>Non-Secure
|
||||||
|
// <i> Value for SCB->ICSR register bit STTNS
|
||||||
|
// <i> only for single SysTick implementation
|
||||||
|
*/
|
||||||
|
#define SCB_ICSR_STTNS_VAL 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <h>Setup Interrupt Target
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 0 (Interrupts 0..31)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS0 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 0..31
|
||||||
|
// <o.0> Interrupt 0 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 1 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 2 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 3 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 4 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 5 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 6 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 7 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 8 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 9 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 10 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 11 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 12 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 13 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 14 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 15 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 16 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 17 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 18 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 19 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 20 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 21 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 22 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 23 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 24 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 25 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 26 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 27 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 28 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 29 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 30 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 31 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS0_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 1 (Interrupts 32..63)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS1 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 32..63
|
||||||
|
// <o.0> Interrupt 32 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 33 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 34 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 35 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 36 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 37 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 38 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 39 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 40 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 41 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 42 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 43 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 44 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 45 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 46 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 47 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 48 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 49 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 50 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 51 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 52 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 53 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 54 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 55 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 56 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 57 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 58 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 59 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 60 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 61 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 62 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 63 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS1_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 2 (Interrupts 64..95)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS2 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 64..95
|
||||||
|
// <o.0> Interrupt 64 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 65 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 66 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 67 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 68 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 69 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 70 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 71 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 72 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 73 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 74 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 75 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 76 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 77 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 78 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 79 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 80 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 81 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 82 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 83 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 84 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 85 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 86 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 87 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 88 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 89 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 90 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 91 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 92 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 93 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 94 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 95 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS2_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 3 (Interrupts 96..127)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS3 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 96..127
|
||||||
|
// <o.0> Interrupt 96 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 97 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 98 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 99 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 100 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 101 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 102 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 103 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 104 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 105 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 106 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 107 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 108 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 109 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 110 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 111 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 112 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 113 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 114 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 115 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 116 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 117 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 118 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 119 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 120 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 121 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 122 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 123 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 124 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 125 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 126 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 127 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS3_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 4 (Interrupts 128..159)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS4 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 128..159
|
||||||
|
// <o.0> Interrupt 128 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 129 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 130 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 131 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 132 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 133 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 134 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 135 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 136 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 137 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 138 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 139 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 140 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 141 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 142 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 143 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 144 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 145 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 146 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 147 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 148 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 149 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 150 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 151 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 152 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 153 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 154 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 155 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 156 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 157 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 158 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 159 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS4_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 5 (Interrupts 160..191)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS5 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 160..191
|
||||||
|
// <o.0> Interrupt 160 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 161 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 162 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 163 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 164 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 165 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 166 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 167 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 168 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 169 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 170 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 171 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 172 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 173 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 174 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 175 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 176 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 177 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 178 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 179 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 180 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 181 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 182 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 183 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 184 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 185 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 186 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 187 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 188 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 189 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 190 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 191 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS5_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 6 (Interrupts 192..223)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS6 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 192..223
|
||||||
|
// <o.0> Interrupt 192 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 193 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 194 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 195 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 196 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 197 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 198 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 199 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 200 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 201 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 202 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 203 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 204 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 205 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 206 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 207 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 208 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 209 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 210 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 211 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 212 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 213 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 214 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 215 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 216 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 217 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 218 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 219 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 220 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 221 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 222 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 223 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS6_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// <e>Initialize ITNS 7 (Interrupts 224..255)
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS7 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Interrupts 224..255
|
||||||
|
// <o.0> Interrupt 224 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.1> Interrupt 225 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.2> Interrupt 226 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.3> Interrupt 227 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.4> Interrupt 228 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.5> Interrupt 229 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.6> Interrupt 230 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.7> Interrupt 231 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.8> Interrupt 232 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.9> Interrupt 233 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.10> Interrupt 234 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.11> Interrupt 235 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.12> Interrupt 236 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.13> Interrupt 237 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.14> Interrupt 238 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.15> Interrupt 239 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.16> Interrupt 240 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.17> Interrupt 241 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.18> Interrupt 242 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.19> Interrupt 243 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.20> Interrupt 244 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.21> Interrupt 245 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.22> Interrupt 246 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.23> Interrupt 247 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.24> Interrupt 248 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.25> Interrupt 249 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.26> Interrupt 250 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.27> Interrupt 251 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.28> Interrupt 252 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.29> Interrupt 253 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.30> Interrupt 254 <0=> Secure state <1=> Non-Secure state
|
||||||
|
// <o.31> Interrupt 255 <0=> Secure state <1=> Non-Secure state
|
||||||
|
*/
|
||||||
|
#define NVIC_INIT_ITNS7_VAL 0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </e>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// </h>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
max 128 SAU regions.
|
||||||
|
SAU regions are defined in partition.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define SAU_INIT_REGION(n) \
|
||||||
|
SAU->RNR = (n & SAU_RNR_REGION_Msk); \
|
||||||
|
SAU->RBAR = (SAU_INIT_START##n & SAU_RBAR_BADDR_Msk); \
|
||||||
|
SAU->RLAR = (SAU_INIT_END##n & SAU_RLAR_LADDR_Msk) | \
|
||||||
|
((SAU_INIT_NSC##n << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1U
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup a SAU Region
|
||||||
|
\details Writes the region information contained in SAU_Region to the
|
||||||
|
registers SAU_RNR, SAU_RBAR, and SAU_RLAR
|
||||||
|
*/
|
||||||
|
__STATIC_INLINE void TZ_SAU_Setup (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U)
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
|
||||||
|
SAU_INIT_REGION(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
|
||||||
|
SAU_INIT_REGION(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
|
||||||
|
SAU_INIT_REGION(2);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
|
||||||
|
SAU_INIT_REGION(3);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
|
||||||
|
SAU_INIT_REGION(4);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
|
||||||
|
SAU_INIT_REGION(5);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
|
||||||
|
SAU_INIT_REGION(6);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
|
||||||
|
SAU_INIT_REGION(7);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* repeat this for all possible SAU regions */
|
||||||
|
|
||||||
|
#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
|
||||||
|
SAU->CTRL = ((SAU_INIT_CTRL_ENABLE << SAU_CTRL_ENABLE_Pos) & SAU_CTRL_ENABLE_Msk) |
|
||||||
|
((SAU_INIT_CTRL_ALLNS << SAU_CTRL_ALLNS_Pos) & SAU_CTRL_ALLNS_Msk) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
|
||||||
|
SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk )) |
|
||||||
|
((SCB_CSR_DEEPSLEEPS_VAL << SCB_SCR_SLEEPDEEPS_Pos) & SCB_SCR_SLEEPDEEPS_Msk);
|
||||||
|
|
||||||
|
SCB->AIRCR = (SCB->AIRCR & ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_SYSRESETREQS_Msk |
|
||||||
|
SCB_AIRCR_BFHFNMINS_Msk | SCB_AIRCR_PRIS_Msk) ) |
|
||||||
|
((0x05FAU << SCB_AIRCR_VECTKEY_Pos) & SCB_AIRCR_VECTKEY_Msk) |
|
||||||
|
((SCB_AIRCR_SYSRESETREQS_VAL << SCB_AIRCR_SYSRESETREQS_Pos) & SCB_AIRCR_SYSRESETREQS_Msk) |
|
||||||
|
((SCB_AIRCR_PRIS_VAL << SCB_AIRCR_PRIS_Pos) & SCB_AIRCR_PRIS_Msk) |
|
||||||
|
((SCB_AIRCR_BFHFNMINS_VAL << SCB_AIRCR_BFHFNMINS_Pos) & SCB_AIRCR_BFHFNMINS_Msk);
|
||||||
|
#endif /* defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U) */
|
||||||
|
|
||||||
|
#if defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U)
|
||||||
|
SCB->ICSR = (SCB->ICSR & ~(SCB_ICSR_STTNS_Msk )) |
|
||||||
|
((SCB_ICSR_STTNS_VAL << SCB_ICSR_STTNS_Pos) & SCB_ICSR_STTNS_Msk);
|
||||||
|
#endif /* defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U) */
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS0) && (NVIC_INIT_ITNS0 == 1U)
|
||||||
|
NVIC->ITNS[0] = NVIC_INIT_ITNS0_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS1) && (NVIC_INIT_ITNS1 == 1U)
|
||||||
|
NVIC->ITNS[1] = NVIC_INIT_ITNS1_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS2) && (NVIC_INIT_ITNS2 == 1U)
|
||||||
|
NVIC->ITNS[2] = NVIC_INIT_ITNS2_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS3) && (NVIC_INIT_ITNS3 == 1U)
|
||||||
|
NVIC->ITNS[3] = NVIC_INIT_ITNS3_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS4) && (NVIC_INIT_ITNS4 == 1U)
|
||||||
|
NVIC->ITNS[4] = NVIC_INIT_ITNS4_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS5) && (NVIC_INIT_ITNS5 == 1U)
|
||||||
|
NVIC->ITNS[5] = NVIC_INIT_ITNS5_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS6) && (NVIC_INIT_ITNS6 == 1U)
|
||||||
|
NVIC->ITNS[6] = NVIC_INIT_ITNS6_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (NVIC_INIT_ITNS7) && (NVIC_INIT_ITNS7 == 1U)
|
||||||
|
NVIC->ITNS[7] = NVIC_INIT_ITNS7_VAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* repeat this for all possible ITNS elements */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PARTITION_ARMCM23_H */
|
||||||
62
云台/云台/.cmsis/device/ARM/ARMCM23/Include/system_ARMCM23.h
Normal file
62
云台/云台/.cmsis/device/ARM/ARMCM23/Include/system_ARMCM23.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM23.h
|
||||||
|
* @brief CMSIS Device System Header File for
|
||||||
|
* ARMCM23 Device
|
||||||
|
* @version V5.3.2
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SYSTEM_ARMCM23_H
|
||||||
|
#define SYSTEM_ARMCM23_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception / Interrupt Handler Function Prototype
|
||||||
|
*/
|
||||||
|
typedef void(*VECTOR_TABLE_Type)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief System Clock Frequency (Core Clock)
|
||||||
|
*/
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SYSTEM_ARMCM23_H */
|
||||||
119
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/ARMCM23_ac6.sct
Normal file
119
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/ARMCM23_ac6.sct
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m23 -xc
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
;Note: Add '-mcmse' to first line if your software model is "Secure Mode".
|
||||||
|
; #! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m23 -xc -mcmse
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*--------------------- CMSE Veneer Configuration ---------------------------
|
||||||
|
; <h> CMSE Veneer Configuration
|
||||||
|
; <o0> CMSE Veneer Size (in Bytes) <0x0-0xFFFFFFFF:32>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __CMSEVENEER_SIZE 0x200
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE - __STACKSEAL_SIZE) /* starts at end of RAM - 8 byte stack seal */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------------
|
||||||
|
Stack seal size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __STACKSEAL_SIZE ( 8 )
|
||||||
|
#else
|
||||||
|
#define __STACKSEAL_SIZE ( 0 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Region base & size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
|
||||||
|
#define __CV_SIZE ( __CMSEVENEER_SIZE )
|
||||||
|
#else
|
||||||
|
#define __CV_SIZE ( 0 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __RO_BASE ( __ROM_BASE )
|
||||||
|
#define __RO_SIZE ( __ROM_SIZE - __CV_SIZE )
|
||||||
|
|
||||||
|
#define __RW_BASE ( __RAM_BASE )
|
||||||
|
#define __RW_SIZE ( __RAM_SIZE - __STACK_SIZE - __HEAP_SIZE )
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter Region definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
STACKSEAL +0 EMPTY __STACKSEAL_SIZE { ; Reserve empty region for stack seal immediately after stack
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
LR_CMSE_VENEER __CV_BASE ALIGN 32 __CV_SIZE { ; own load/execution region for CMSE Veneers
|
||||||
|
ER_CMSE_VENEER __CV_BASE __CV_SIZE {
|
||||||
|
*(Veneer$$CMSE)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
119
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/ARMCM23_ac6_s.sct
Normal file
119
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/ARMCM23_ac6_s.sct
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m23 -xc -mcmse
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
;Note: Add '-mcmse' to first line if your software model is "Secure Mode".
|
||||||
|
; #! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m23 -xc -mcmse
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*--------------------- CMSE Veneer Configuration ---------------------------
|
||||||
|
; <h> CMSE Veneer Configuration
|
||||||
|
; <o0> CMSE Veneer Size (in Bytes) <0x0-0xFFFFFFFF:32>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __CMSEVENEER_SIZE 0x200
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE - __STACKSEAL_SIZE) /* starts at end of RAM - 8 byte stack seal */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------------
|
||||||
|
Stack seal size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __STACKSEAL_SIZE ( 8 )
|
||||||
|
#else
|
||||||
|
#define __STACKSEAL_SIZE ( 0 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Region base & size definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __CV_BASE ( __ROM_BASE + __ROM_SIZE - __CMSEVENEER_SIZE )
|
||||||
|
#define __CV_SIZE ( __CMSEVENEER_SIZE )
|
||||||
|
#else
|
||||||
|
#define __CV_SIZE ( 0 )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __RO_BASE ( __ROM_BASE )
|
||||||
|
#define __RO_SIZE ( __ROM_SIZE - __CV_SIZE )
|
||||||
|
|
||||||
|
#define __RW_BASE ( __RAM_BASE )
|
||||||
|
#define __RW_SIZE ( __RAM_SIZE - __STACK_SIZE - __HEAP_SIZE )
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter Region definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
STACKSEAL +0 EMPTY __STACKSEAL_SIZE { ; Reserve empty region for stack seal immediately after stack
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
LR_CMSE_VENEER __CV_BASE ALIGN 32 __CV_SIZE { ; own load/execution region for CMSE Veneers
|
||||||
|
ER_CMSE_VENEER __CV_BASE __CV_SIZE {
|
||||||
|
*(Veneer$$CMSE)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
155
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/startup_ARMCM23.S
Normal file
155
云台/云台/.cmsis/device/ARM/ARMCM23/Source/ARM/startup_ARMCM23.S
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM23.S
|
||||||
|
* @brief CMSIS-Core Device Startup File for Cortex-M23 Device
|
||||||
|
* @version V2.0.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv8-m.base
|
||||||
|
|
||||||
|
#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit
|
||||||
|
#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __STACK_SEAL Image$$STACKSEAL$$ZI$$Base
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.section RESET
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __INITIAL_SP /* Initial Stack Pointer */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVCall Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space (214 * 4) /* Interrupts 10 .. 224 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
ldr r0, =__INITIAL_SP
|
||||||
|
msr psp, r0
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
ldr r0, =__STACK_LIMIT
|
||||||
|
msr msplim, r0
|
||||||
|
msr psplim, r0
|
||||||
|
|
||||||
|
ldr r0, =__STACK_SEAL
|
||||||
|
ldr r1, =0xFEF5EDA5U
|
||||||
|
str r1,[r0,#0]
|
||||||
|
str r1,[r0,#4]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
bl __main
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
.end
|
||||||
316
云台/云台/.cmsis/device/ARM/ARMCM23/Source/GCC/gcc_arm.ld
Normal file
316
云台/云台/.cmsis/device/ARM/ARMCM23/Source/GCC/gcc_arm.ld
Normal file
@@ -0,0 +1,316 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file gcc_arm.ld
|
||||||
|
* @brief GNU Linker Script for Cortex-M based device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 16. December 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*---------------------- Flash Configuration ----------------------------------
|
||||||
|
<h> Flash Configuration
|
||||||
|
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__ROM_BASE = 0x00000000;
|
||||||
|
__ROM_SIZE = 0x00040000;
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||||
|
<h> RAM Configuration
|
||||||
|
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__RAM_BASE = 0x20000000;
|
||||||
|
__RAM_SIZE = 0x00020000;
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||||
|
<h> Stack / Heap Configuration
|
||||||
|
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__STACK_SIZE = 0x00000400;
|
||||||
|
__HEAP_SIZE = 0x00000C00;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------------------- <<< end of configuration section >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ARMv8-M stack sealing:
|
||||||
|
to use ARMv8-M stack sealing set __STACKSEAL_SIZE to 8 otherwise keep 0
|
||||||
|
*/
|
||||||
|
__STACKSEAL_SIZE = 0;
|
||||||
|
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
|
* It references following symbols, which must be defined in code:
|
||||||
|
* Reset_Handler : Entry of reset handler
|
||||||
|
*
|
||||||
|
* It defines following symbols, which code can use without definition:
|
||||||
|
* __exidx_start
|
||||||
|
* __exidx_end
|
||||||
|
* __copy_table_start__
|
||||||
|
* __copy_table_end__
|
||||||
|
* __zero_table_start__
|
||||||
|
* __zero_table_end__
|
||||||
|
* __etext
|
||||||
|
* __data_start__
|
||||||
|
* __preinit_array_start
|
||||||
|
* __preinit_array_end
|
||||||
|
* __init_array_start
|
||||||
|
* __init_array_end
|
||||||
|
* __fini_array_start
|
||||||
|
* __fini_array_end
|
||||||
|
* __data_end__
|
||||||
|
* __bss_start__
|
||||||
|
* __bss_end__
|
||||||
|
* __end__
|
||||||
|
* end
|
||||||
|
* __HeapLimit
|
||||||
|
* __StackLimit
|
||||||
|
* __StackTop
|
||||||
|
* __stack
|
||||||
|
* __StackSeal (only if ARMv8-M stack sealing is used)
|
||||||
|
*/
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
*(.rodata*)
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SG veneers:
|
||||||
|
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||||
|
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||||
|
* to indicate where to place these veneers in memory.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.gnu.sgstubs :
|
||||||
|
{
|
||||||
|
. = ALIGN(32);
|
||||||
|
} > FLASH
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > FLASH
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG ((__data_end__ - __data_start__) / 4)
|
||||||
|
|
||||||
|
/* Add each additional data section here */
|
||||||
|
/*
|
||||||
|
LONG (__etext2)
|
||||||
|
LONG (__data2_start__)
|
||||||
|
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
/* Add each additional bss section here */
|
||||||
|
/*
|
||||||
|
LONG (__bss2_start__)
|
||||||
|
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||||
|
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||||
|
* which must be 4byte aligned
|
||||||
|
*/
|
||||||
|
__etext = ALIGN (4);
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary data section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional data section
|
||||||
|
* to the .copy.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
__etext2 = ALIGN (4);
|
||||||
|
|
||||||
|
.data2 : AT (__etext2)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_start__ = .;
|
||||||
|
*(.data2)
|
||||||
|
*(.data2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_end__ = .;
|
||||||
|
|
||||||
|
} > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_end__ = .;
|
||||||
|
} > RAM AT > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary bss section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional bss section
|
||||||
|
* to the .zero.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.bss2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_start__ = .;
|
||||||
|
*(.bss2)
|
||||||
|
*(.bss2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_end__ = .;
|
||||||
|
} > RAM2 AT > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heap (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
. = . + __HEAP_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE - __STACKSEAL_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackLimit = .;
|
||||||
|
. = . + __STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackTop = .;
|
||||||
|
} > RAM
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
/* ARMv8-M stack sealing:
|
||||||
|
to use ARMv8-M stack sealing uncomment '.stackseal' section
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.stackseal (ORIGIN(RAM) + LENGTH(RAM) - __STACKSEAL_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackSeal = .;
|
||||||
|
. = . + 8;
|
||||||
|
. = ALIGN(8);
|
||||||
|
} > RAM
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
|
}
|
||||||
200
云台/云台/.cmsis/device/ARM/ARMCM23/Source/GCC/startup_ARMCM23.S
Normal file
200
云台/云台/.cmsis/device/ARM/ARMCM23/Source/GCC/startup_ARMCM23.S
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM23.S
|
||||||
|
* @brief CMSIS-Core Device Startup File for Cortex-M23 Device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv8-m.base
|
||||||
|
|
||||||
|
#define __INITIAL_SP __StackTop
|
||||||
|
#define __STACK_LIMIT __StackLimit
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#define __STACK_SEAL __StackSeal
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.section .vectors
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __INITIAL_SP /* Initial Stack Pointer */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVCall Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space (214 * 4) /* Interrupts 10 .. 224 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
ldr r0, =__INITIAL_SP
|
||||||
|
msr psp, r0
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
ldr r0, =__STACK_LIMIT
|
||||||
|
msr msplim, r0
|
||||||
|
msr psplim, r0
|
||||||
|
|
||||||
|
ldr r0, =__STACK_SEAL
|
||||||
|
ldr r1, =0xFEF5EDA5U
|
||||||
|
str r1,[r0,#0]
|
||||||
|
str r1,[r0,#4]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
ldr r4, =__copy_table_start__
|
||||||
|
ldr r5, =__copy_table_end__
|
||||||
|
|
||||||
|
.L_loop0:
|
||||||
|
cmp r4, r5
|
||||||
|
bge .L_loop0_done
|
||||||
|
ldr r1, [r4] /* source address */
|
||||||
|
ldr r2, [r4, #4] /* destination address */
|
||||||
|
ldr r3, [r4, #8] /* word count */
|
||||||
|
lsls r3, r3, #2 /* byte count */
|
||||||
|
|
||||||
|
.L_loop0_0:
|
||||||
|
subs r3, #4 /* decrement byte count */
|
||||||
|
blt .L_loop0_0_done
|
||||||
|
ldr r0, [r1, r3]
|
||||||
|
str r0, [r2, r3]
|
||||||
|
b .L_loop0_0
|
||||||
|
|
||||||
|
.L_loop0_0_done:
|
||||||
|
adds r4, #12
|
||||||
|
b .L_loop0
|
||||||
|
.L_loop0_done:
|
||||||
|
|
||||||
|
ldr r3, =__zero_table_start__
|
||||||
|
ldr r4, =__zero_table_end__
|
||||||
|
|
||||||
|
.L_loop2:
|
||||||
|
cmp r3, r4
|
||||||
|
bge .L_loop2_done
|
||||||
|
ldr r1, [r3] /* destination address */
|
||||||
|
ldr r2, [r3, #4] /* word count */
|
||||||
|
lsls r2, r2, #2 /* byte count */
|
||||||
|
movs r0, 0
|
||||||
|
|
||||||
|
.L_loop2_0:
|
||||||
|
subs r2, #4 /* decrement byte count */
|
||||||
|
blt .L_loop2_0_done
|
||||||
|
str r0, [r1, r2]
|
||||||
|
b .L_loop2_0
|
||||||
|
.L_loop2_0_done:
|
||||||
|
|
||||||
|
adds r3, #8
|
||||||
|
b .L_loop2
|
||||||
|
.L_loop2_done:
|
||||||
|
|
||||||
|
bl _start
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
.end
|
||||||
168
云台/云台/.cmsis/device/ARM/ARMCM23/Source/IAR/startup_ARMCM23.s
Normal file
168
云台/云台/.cmsis/device/ARM/ARMCM23/Source/IAR/startup_ARMCM23.s
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM23.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM23 Device
|
||||||
|
; * @version V1.1.0
|
||||||
|
; * @date 08. April 2021
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;
|
||||||
|
; The modules in this file are included in the libraries, and may be replaced
|
||||||
|
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||||
|
; a user defined start symbol.
|
||||||
|
; To override the cstartup defined in the library, simply add your modified
|
||||||
|
; version to the workbench project.
|
||||||
|
;
|
||||||
|
; The vector table is normally located at address 0.
|
||||||
|
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||||
|
; The name "__vector_table" has special meaning for C-SPY:
|
||||||
|
; it is where the SP start value is found, and the NVIC vector
|
||||||
|
; table register (VTOR) is initialized to this address if != 0.
|
||||||
|
;
|
||||||
|
; Cortex-M version
|
||||||
|
;
|
||||||
|
|
||||||
|
MODULE ?cstartup
|
||||||
|
|
||||||
|
;; Forward declaration of sections.
|
||||||
|
SECTION CSTACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
SECTION .intvec:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
EXTERN SystemInit
|
||||||
|
PUBLIC __vector_table
|
||||||
|
PUBLIC __vector_table_0x1c
|
||||||
|
PUBLIC __Vectors
|
||||||
|
PUBLIC __Vectors_End
|
||||||
|
PUBLIC __Vectors_Size
|
||||||
|
|
||||||
|
#define __INITIAL_SP sfe(CSTACK)
|
||||||
|
#define __STACK_LIMIT sfb(CSTACK)
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
SECTION STACKSEAL:DATA:NOROOT(3)
|
||||||
|
#define __STACK_SEAL sfb(STACKSEAL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DATA
|
||||||
|
|
||||||
|
__vector_table
|
||||||
|
DCD __INITIAL_SP ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
__vector_table_0x1c
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVCall Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
DS32 (214) ; Interrupts 10 .. 224 are left out
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors EQU __vector_table
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
PUBWEAK Reset_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||||
|
Reset_Handler
|
||||||
|
ldr r0, =__INITIAL_SP
|
||||||
|
msr psp, r0
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
ldr r0, =__STACK_LIMIT
|
||||||
|
msr msplim, r0
|
||||||
|
msr psplim, r0
|
||||||
|
|
||||||
|
ldr r0, =__STACK_SEAL
|
||||||
|
ldr r1, =0xFEF5EDA5U
|
||||||
|
str r1,[r0,#0]
|
||||||
|
str r1,[r0,#4]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__iar_program_start
|
||||||
|
BX R0
|
||||||
|
|
||||||
|
|
||||||
|
PUBWEAK NMI_Handler
|
||||||
|
PUBWEAK HardFault_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK PendSV_Handler
|
||||||
|
PUBWEAK SysTick_Handler
|
||||||
|
|
||||||
|
PUBWEAK Interrupt0_Handler
|
||||||
|
PUBWEAK Interrupt1_Handler
|
||||||
|
PUBWEAK Interrupt2_Handler
|
||||||
|
PUBWEAK Interrupt3_Handler
|
||||||
|
PUBWEAK Interrupt4_Handler
|
||||||
|
PUBWEAK Interrupt5_Handler
|
||||||
|
PUBWEAK Interrupt6_Handler
|
||||||
|
PUBWEAK Interrupt7_Handler
|
||||||
|
PUBWEAK Interrupt8_Handler
|
||||||
|
PUBWEAK Interrupt9_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||||
|
NMI_Handler
|
||||||
|
HardFault_Handler
|
||||||
|
SVC_Handler
|
||||||
|
PendSV_Handler
|
||||||
|
SysTick_Handler
|
||||||
|
|
||||||
|
Interrupt0_Handler
|
||||||
|
Interrupt1_Handler
|
||||||
|
Interrupt2_Handler
|
||||||
|
Interrupt3_Handler
|
||||||
|
Interrupt4_Handler
|
||||||
|
Interrupt5_Handler
|
||||||
|
Interrupt6_Handler
|
||||||
|
Interrupt7_Handler
|
||||||
|
Interrupt8_Handler
|
||||||
|
Interrupt9_Handler
|
||||||
|
Default_Handler
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
161
云台/云台/.cmsis/device/ARM/ARMCM23/Source/startup_ARMCM23.c
Normal file
161
云台/云台/.cmsis/device/ARM/ARMCM23/Source/startup_ARMCM23.c
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM23.c
|
||||||
|
* @brief CMSIS-Core Device Startup File for a Cortex-M23 Device
|
||||||
|
* @version V2.1.0
|
||||||
|
* @date 16. December 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM23)
|
||||||
|
#include "ARMCM23.h"
|
||||||
|
#elif defined (ARMCM23_TZ)
|
||||||
|
#include "ARMCM23_TZ.h"
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
External References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern uint32_t __INITIAL_SP;
|
||||||
|
extern uint32_t __STACK_LIMIT;
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
extern uint32_t __STACK_SEAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern __NO_RETURN void __PROGRAM_START(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler (void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/* Exceptions */
|
||||||
|
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void HardFault_Handler (void) __attribute__ ((weak));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[240];
|
||||||
|
const VECTOR_TABLE_Type __VECTOR_TABLE[240] __VECTOR_TABLE_ATTRIBUTE = {
|
||||||
|
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||||
|
Reset_Handler, /* Reset Handler */
|
||||||
|
NMI_Handler, /* -14 NMI Handler */
|
||||||
|
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
SVC_Handler, /* -5 SVCall Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
PendSV_Handler, /* -2 PendSV Handler */
|
||||||
|
SysTick_Handler, /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||||
|
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||||
|
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||||
|
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||||
|
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||||
|
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||||
|
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||||
|
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||||
|
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||||
|
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
/* Interrupts 10 .. 223 are left out */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler(void)
|
||||||
|
{
|
||||||
|
__set_PSP((uint32_t)(&__INITIAL_SP));
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
__set_MSPLIM((uint32_t)(&__STACK_LIMIT));
|
||||||
|
__set_PSPLIM((uint32_t)(&__STACK_LIMIT));
|
||||||
|
|
||||||
|
__TZ_set_STACKSEAL_S((uint32_t *)(&__STACK_SEAL));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SystemInit(); /* CMSIS System Initialization */
|
||||||
|
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Hard Fault Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
80
云台/云台/.cmsis/device/ARM/ARMCM23/Source/system_ARMCM23.c
Normal file
80
云台/云台/.cmsis/device/ARM/ARMCM23/Source/system_ARMCM23.c
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM23.c
|
||||||
|
* @brief CMSIS Device System Source File for
|
||||||
|
* ARMCM23 Device
|
||||||
|
* @version V1.0.1
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM23)
|
||||||
|
#include "ARMCM23.h"
|
||||||
|
#elif defined (ARMCM23_TZ)
|
||||||
|
#include "ARMCM23_TZ.h"
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
#include "partition_ARMCM23.h"
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Define clocks
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define XTAL (50000000UL) /* Oscillator frequency */
|
||||||
|
|
||||||
|
#define SYSTEM_CLOCK (XTAL / 2U)
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[240];
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock Variable
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Core Clock Frequency */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System Core Clock update function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemCoreClockUpdate (void)
|
||||||
|
{
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
System initialization function
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void SystemInit (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
|
||||||
|
SCB->VTOR = (uint32_t) &(__VECTOR_TABLE[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
|
||||||
|
TZ_SAU_Setup();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SystemCoreClock = SYSTEM_CLOCK;
|
||||||
|
}
|
||||||
126
云台/云台/.cmsis/device/ARM/ARMCM3/Include/ARMCM3.h
Normal file
126
云台/云台/.cmsis/device/ARM/ARMCM3/Include/ARMCM3.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file ARMCM3.h
|
||||||
|
* @brief CMSIS Core Peripheral Access Layer Header File for
|
||||||
|
* ARMCM3 Device
|
||||||
|
* @version V5.3.1
|
||||||
|
* @date 09. July 2018
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARMCM3_H
|
||||||
|
#define ARMCM3_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- Interrupt Number Definition ------------------------ */
|
||||||
|
|
||||||
|
typedef enum IRQn
|
||||||
|
{
|
||||||
|
/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
||||||
|
NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
||||||
|
HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
||||||
|
MemoryManagement_IRQn = -12, /* 4 Memory Management Interrupt */
|
||||||
|
BusFault_IRQn = -11, /* 5 Bus Fault Interrupt */
|
||||||
|
UsageFault_IRQn = -10, /* 6 Usage Fault Interrupt */
|
||||||
|
SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
||||||
|
DebugMonitor_IRQn = -4, /* 12 Debug Monitor Interrupt */
|
||||||
|
PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
||||||
|
SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
||||||
|
|
||||||
|
/* ------------------- Processor Interrupt Numbers ------------------------------ */
|
||||||
|
Interrupt0_IRQn = 0,
|
||||||
|
Interrupt1_IRQn = 1,
|
||||||
|
Interrupt2_IRQn = 2,
|
||||||
|
Interrupt3_IRQn = 3,
|
||||||
|
Interrupt4_IRQn = 4,
|
||||||
|
Interrupt5_IRQn = 5,
|
||||||
|
Interrupt6_IRQn = 6,
|
||||||
|
Interrupt7_IRQn = 7,
|
||||||
|
Interrupt8_IRQn = 8,
|
||||||
|
Interrupt9_IRQn = 9
|
||||||
|
/* Interrupts 10 .. 224 are left out */
|
||||||
|
} IRQn_Type;
|
||||||
|
|
||||||
|
|
||||||
|
/* ================================================================================ */
|
||||||
|
/* ================ Processor and Core Peripheral Section ================ */
|
||||||
|
/* ================================================================================ */
|
||||||
|
|
||||||
|
/* ------- Start of section using anonymous unions and disabling warnings ------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma push
|
||||||
|
#pragma anon_unions
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
#pragma language=extended
|
||||||
|
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wc11-extensions"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning 586
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- Configuration of Core Peripherals ----------------------------------- */
|
||||||
|
#define __CM3_REV 0x0201U /* Core revision r2p1 */
|
||||||
|
#define __MPU_PRESENT 1U /* MPU present */
|
||||||
|
#define __VTOR_PRESENT 1U /* VTOR present */
|
||||||
|
#define __NVIC_PRIO_BITS 3U /* Number of Bits used for Priority Levels */
|
||||||
|
#define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
|
||||||
|
|
||||||
|
#include "core_cm3.h" /* Processor and core peripherals */
|
||||||
|
#include "system_ARMCM3.h" /* System Header */
|
||||||
|
|
||||||
|
|
||||||
|
/* -------- End of section using anonymous unions and disabling warnings -------- */
|
||||||
|
#if defined (__CC_ARM)
|
||||||
|
#pragma pop
|
||||||
|
#elif defined (__ICCARM__)
|
||||||
|
/* leave anonymous unions enabled */
|
||||||
|
#elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TMS470__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
#pragma warning restore
|
||||||
|
#elif defined (__CSMC__)
|
||||||
|
/* anonymous unions are enabled by default */
|
||||||
|
#else
|
||||||
|
#warning Not supported compiler type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ARMCM3_H */
|
||||||
62
云台/云台/.cmsis/device/ARM/ARMCM3/Include/system_ARMCM3.h
Normal file
62
云台/云台/.cmsis/device/ARM/ARMCM3/Include/system_ARMCM3.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file system_ARMCM3.h
|
||||||
|
* @brief CMSIS Device System Header File for
|
||||||
|
* ARMCM3 Device
|
||||||
|
* @version V5.3.2
|
||||||
|
* @date 15. November 2019
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SYSTEM_ARMCM3_H
|
||||||
|
#define SYSTEM_ARMCM3_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception / Interrupt Handler Function Prototype
|
||||||
|
*/
|
||||||
|
typedef void(*VECTOR_TABLE_Type)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief System Clock Frequency (Core Clock)
|
||||||
|
*/
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Setup the microcontroller system.
|
||||||
|
|
||||||
|
Initialize the System and update the SystemCoreClock variable.
|
||||||
|
*/
|
||||||
|
extern void SystemInit (void);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Update SystemCoreClock variable.
|
||||||
|
|
||||||
|
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
|
||||||
|
*/
|
||||||
|
extern void SystemCoreClockUpdate (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SYSTEM_ARMCM3_H */
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/ARMCM3_ac5.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/ARMCM3_ac5.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armcc -E
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
76
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/ARMCM3_ac6.sct
Normal file
76
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/ARMCM3_ac6.sct
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m3 -xc
|
||||||
|
; command above MUST be in first line (no comment above!)
|
||||||
|
|
||||||
|
/*
|
||||||
|
;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*--------------------- Flash Configuration ----------------------------------
|
||||||
|
; <h> Flash Configuration
|
||||||
|
; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __ROM_BASE 0x00000000
|
||||||
|
#define __ROM_SIZE 0x00080000
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ---------------------------
|
||||||
|
; <h> RAM Configuration
|
||||||
|
; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RAM_BASE 0x20000000
|
||||||
|
#define __RAM_SIZE 0x00040000
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ---------------------------
|
||||||
|
; <h> Stack / Heap Configuration
|
||||||
|
; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_SIZE 0x00000200
|
||||||
|
#define __HEAP_SIZE 0x00000C00
|
||||||
|
|
||||||
|
/*
|
||||||
|
;------------- <<< end of configuration section >>> ---------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
User Stack & Heap boundary definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __STACK_TOP (__RAM_BASE + __RAM_SIZE) /* starts at end of RAM */
|
||||||
|
#define __HEAP_BASE (AlignExpr(+0, 8)) /* starts after RW_RAM section, 8 byte aligned */
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Scatter File Definitions definition
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
#define __RO_BASE __ROM_BASE
|
||||||
|
#define __RO_SIZE __ROM_SIZE
|
||||||
|
|
||||||
|
#define __RW_BASE __RAM_BASE
|
||||||
|
#define __RW_SIZE (__RAM_SIZE - __STACK_SIZE - __HEAP_SIZE)
|
||||||
|
|
||||||
|
|
||||||
|
LR_ROM __RO_BASE __RO_SIZE { ; load region size_region
|
||||||
|
ER_ROM __RO_BASE __RO_SIZE { ; load address = execution address
|
||||||
|
*.o (RESET, +First)
|
||||||
|
*(InRoot$$Sections)
|
||||||
|
.ANY (+RO)
|
||||||
|
.ANY (+XO)
|
||||||
|
}
|
||||||
|
|
||||||
|
RW_RAM __RW_BASE __RW_SIZE { ; RW data
|
||||||
|
.ANY (+RW +ZI)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __HEAP_SIZE > 0
|
||||||
|
ARM_LIB_HEAP __HEAP_BASE EMPTY __HEAP_SIZE { ; Reserve empty region for heap
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE { ; Reserve empty region for stack
|
||||||
|
}
|
||||||
|
}
|
||||||
172
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/startup_ARMCM3.s
Normal file
172
云台/云台/.cmsis/device/ARM/ARMCM3/Source/ARM/startup_ARMCM3.s
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM3.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM3 Device
|
||||||
|
; * @version V1.0.1
|
||||||
|
; * @date 23. July 2019
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x00000400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__stack_limit
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
;<h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
;</h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x00000C00
|
||||||
|
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD MemManage_Handler ; -12 MPU Fault Handler
|
||||||
|
DCD BusFault_Handler ; -11 Bus Fault Handler
|
||||||
|
DCD UsageFault_Handler ; -10 Usage Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVC Handler
|
||||||
|
DCD DebugMon_Handler ; -4 Debug Monitor Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
SPACE (214 * 4) ; Interrupts 10 .. 224 are left out
|
||||||
|
__Vectors_End
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT SystemInit
|
||||||
|
IMPORT __main
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; The default macro is not used for HardFault_Handler
|
||||||
|
; because this results in a poor debug illusion.
|
||||||
|
HardFault_Handler PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Macro to define default exception/interrupt handlers.
|
||||||
|
; Default handler are weak symbols with an endless loop.
|
||||||
|
; They can be overwritten by real handlers.
|
||||||
|
MACRO
|
||||||
|
Set_Default_Handler $Handler_Name
|
||||||
|
$Handler_Name PROC
|
||||||
|
EXPORT $Handler_Name [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MEND
|
||||||
|
|
||||||
|
|
||||||
|
; Default exception/interrupt handler
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler MemManage_Handler
|
||||||
|
Set_Default_Handler BusFault_Handler
|
||||||
|
Set_Default_Handler UsageFault_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler DebugMon_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
|
||||||
|
; User setup Stack & Heap
|
||||||
|
|
||||||
|
IF :LNOT::DEF:__MICROLIB
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
EXPORT __stack_limit
|
||||||
|
EXPORT __initial_sp
|
||||||
|
IF Heap_Size != 0 ; Heap is provided
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
296
云台/云台/.cmsis/device/ARM/ARMCM3/Source/GCC/gcc_arm.ld
Normal file
296
云台/云台/.cmsis/device/ARM/ARMCM3/Source/GCC/gcc_arm.ld
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file gcc_arm.ld
|
||||||
|
* @brief GNU Linker Script for Cortex-M based device
|
||||||
|
* @version V2.1.0
|
||||||
|
* @date 04. August 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*---------------------- Flash Configuration ----------------------------------
|
||||||
|
<h> Flash Configuration
|
||||||
|
<o0> Flash Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__ROM_BASE = 0x00000000;
|
||||||
|
__ROM_SIZE = 0x00040000;
|
||||||
|
|
||||||
|
/*--------------------- Embedded RAM Configuration ----------------------------
|
||||||
|
<h> RAM Configuration
|
||||||
|
<o0> RAM Base Address <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__RAM_BASE = 0x20000000;
|
||||||
|
__RAM_SIZE = 0x00020000;
|
||||||
|
|
||||||
|
/*--------------------- Stack / Heap Configuration ----------------------------
|
||||||
|
<h> Stack / Heap Configuration
|
||||||
|
<o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
<o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
</h>
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
__STACK_SIZE = 0x00000400;
|
||||||
|
__HEAP_SIZE = 0x00000C00;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*-------------------- <<< end of configuration section >>> -------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = __ROM_BASE, LENGTH = __ROM_SIZE
|
||||||
|
RAM (rwx) : ORIGIN = __RAM_BASE, LENGTH = __RAM_SIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Linker script to place sections and symbol values. Should be used together
|
||||||
|
* with other linker script that defines memory regions FLASH and RAM.
|
||||||
|
* It references following symbols, which must be defined in code:
|
||||||
|
* Reset_Handler : Entry of reset handler
|
||||||
|
*
|
||||||
|
* It defines following symbols, which code can use without definition:
|
||||||
|
* __exidx_start
|
||||||
|
* __exidx_end
|
||||||
|
* __copy_table_start__
|
||||||
|
* __copy_table_end__
|
||||||
|
* __zero_table_start__
|
||||||
|
* __zero_table_end__
|
||||||
|
* __etext
|
||||||
|
* __data_start__
|
||||||
|
* __preinit_array_start
|
||||||
|
* __preinit_array_end
|
||||||
|
* __init_array_start
|
||||||
|
* __init_array_end
|
||||||
|
* __fini_array_start
|
||||||
|
* __fini_array_end
|
||||||
|
* __data_end__
|
||||||
|
* __bss_start__
|
||||||
|
* __bss_end__
|
||||||
|
* __end__
|
||||||
|
* end
|
||||||
|
* __HeapLimit
|
||||||
|
* __StackLimit
|
||||||
|
* __StackTop
|
||||||
|
* __stack
|
||||||
|
*/
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
*(.text*)
|
||||||
|
|
||||||
|
KEEP(*(.init))
|
||||||
|
KEEP(*(.fini))
|
||||||
|
|
||||||
|
/* .ctors */
|
||||||
|
*crtbegin.o(.ctors)
|
||||||
|
*crtbegin?.o(.ctors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||||
|
*(SORT(.ctors.*))
|
||||||
|
*(.ctors)
|
||||||
|
|
||||||
|
/* .dtors */
|
||||||
|
*crtbegin.o(.dtors)
|
||||||
|
*crtbegin?.o(.dtors)
|
||||||
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||||
|
*(SORT(.dtors.*))
|
||||||
|
*(.dtors)
|
||||||
|
|
||||||
|
*(.rodata*)
|
||||||
|
|
||||||
|
KEEP(*(.eh_frame*))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SG veneers:
|
||||||
|
* All SG veneers are placed in the special output section .gnu.sgstubs. Its start address
|
||||||
|
* must be set, either with the command line option <20>--section-start<72> or in a linker script,
|
||||||
|
* to indicate where to place these veneers in memory.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.gnu.sgstubs :
|
||||||
|
{
|
||||||
|
. = ALIGN(32);
|
||||||
|
} > FLASH
|
||||||
|
*/
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
__exidx_start = .;
|
||||||
|
.ARM.exidx :
|
||||||
|
{
|
||||||
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
|
} > FLASH
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
.copy.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__copy_table_start__ = .;
|
||||||
|
|
||||||
|
LONG (__etext)
|
||||||
|
LONG (__data_start__)
|
||||||
|
LONG ((__data_end__ - __data_start__) / 4)
|
||||||
|
|
||||||
|
/* Add each additional data section here */
|
||||||
|
/*
|
||||||
|
LONG (__etext2)
|
||||||
|
LONG (__data2_start__)
|
||||||
|
LONG ((__data2_end__ - __data2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__copy_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
.zero.table :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__zero_table_start__ = .;
|
||||||
|
/* Add each additional bss section here */
|
||||||
|
/*
|
||||||
|
LONG (__bss2_start__)
|
||||||
|
LONG ((__bss2_end__ - __bss2_start__) / 4)
|
||||||
|
*/
|
||||||
|
__zero_table_end__ = .;
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location counter can end up 2byte aligned with narrow Thumb code but
|
||||||
|
* __etext is assumed by startup code to be the LMA of a section in RAM
|
||||||
|
* which must be 4byte aligned
|
||||||
|
*/
|
||||||
|
__etext = ALIGN (4);
|
||||||
|
|
||||||
|
.data : AT (__etext)
|
||||||
|
{
|
||||||
|
__data_start__ = .;
|
||||||
|
*(vtable)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* preinit data */
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP(*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* init data */
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP(*(SORT(.init_array.*)))
|
||||||
|
KEEP(*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* finit data */
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP(*(SORT(.fini_array.*)))
|
||||||
|
KEEP(*(.fini_array))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
/* All data end */
|
||||||
|
__data_end__ = .;
|
||||||
|
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary data section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional data section
|
||||||
|
* to the .copy.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
__etext2 = ALIGN (4);
|
||||||
|
|
||||||
|
.data2 : AT (__etext2)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_start__ = .;
|
||||||
|
*(.data2)
|
||||||
|
*(.data2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data2_end__ = .;
|
||||||
|
|
||||||
|
} > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss_end__ = .;
|
||||||
|
} > RAM AT > RAM
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Secondary bss section, optional
|
||||||
|
*
|
||||||
|
* Remember to add each additional bss section
|
||||||
|
* to the .zero.table above to asure proper
|
||||||
|
* initialization during startup.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.bss2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_start__ = .;
|
||||||
|
*(.bss2)
|
||||||
|
*(.bss2.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
__bss2_end__ = .;
|
||||||
|
} > RAM2 AT > RAM2
|
||||||
|
*/
|
||||||
|
|
||||||
|
.heap (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
. = . + __HEAP_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__HeapLimit = .;
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackLimit = .;
|
||||||
|
. = . + __STACK_SIZE;
|
||||||
|
. = ALIGN(8);
|
||||||
|
__StackTop = .;
|
||||||
|
} > RAM
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||||
|
}
|
||||||
182
云台/云台/.cmsis/device/ARM/ARMCM3/Source/GCC/startup_ARMCM3.S
Normal file
182
云台/云台/.cmsis/device/ARM/ARMCM3/Source/GCC/startup_ARMCM3.S
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
/**************************************************************************//**
|
||||||
|
* @file startup_ARMCM3.S
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for Cortex-M3 Device
|
||||||
|
* @version V2.2.0
|
||||||
|
* @date 26. May 2021
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2021 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
.arch armv7-m
|
||||||
|
|
||||||
|
.section .vectors
|
||||||
|
.align 2
|
||||||
|
.globl __Vectors
|
||||||
|
.globl __Vectors_End
|
||||||
|
.globl __Vectors_Size
|
||||||
|
__Vectors:
|
||||||
|
.long __StackTop /* Top of Stack */
|
||||||
|
.long Reset_Handler /* Reset Handler */
|
||||||
|
.long NMI_Handler /* -14 NMI Handler */
|
||||||
|
.long HardFault_Handler /* -13 Hard Fault Handler */
|
||||||
|
.long MemManage_Handler /* -12 MPU Fault Handler */
|
||||||
|
.long BusFault_Handler /* -11 Bus Fault Handler */
|
||||||
|
.long UsageFault_Handler /* -10 Usage Fault Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long SVC_Handler /* -5 SVC Handler */
|
||||||
|
.long DebugMon_Handler /* -4 Debug Monitor Handler */
|
||||||
|
.long 0 /* Reserved */
|
||||||
|
.long PendSV_Handler /* -2 PendSV Handler */
|
||||||
|
.long SysTick_Handler /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
.long Interrupt0_Handler /* 0 Interrupt 0 */
|
||||||
|
.long Interrupt1_Handler /* 1 Interrupt 1 */
|
||||||
|
.long Interrupt2_Handler /* 2 Interrupt 2 */
|
||||||
|
.long Interrupt3_Handler /* 3 Interrupt 3 */
|
||||||
|
.long Interrupt4_Handler /* 4 Interrupt 4 */
|
||||||
|
.long Interrupt5_Handler /* 5 Interrupt 5 */
|
||||||
|
.long Interrupt6_Handler /* 6 Interrupt 6 */
|
||||||
|
.long Interrupt7_Handler /* 7 Interrupt 7 */
|
||||||
|
.long Interrupt8_Handler /* 8 Interrupt 8 */
|
||||||
|
.long Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
|
||||||
|
.space (214 * 4) /* Interrupts 10 .. 224 are left out */
|
||||||
|
__Vectors_End:
|
||||||
|
.equ __Vectors_Size, __Vectors_End - __Vectors
|
||||||
|
.size __Vectors, . - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
.thumb
|
||||||
|
.section .text
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Reset_Handler, %function
|
||||||
|
.globl Reset_Handler
|
||||||
|
.fnstart
|
||||||
|
Reset_Handler:
|
||||||
|
bl SystemInit
|
||||||
|
|
||||||
|
ldr r4, =__copy_table_start__
|
||||||
|
ldr r5, =__copy_table_end__
|
||||||
|
|
||||||
|
.L_loop0:
|
||||||
|
cmp r4, r5
|
||||||
|
bge .L_loop0_done
|
||||||
|
ldr r1, [r4] /* source address */
|
||||||
|
ldr r2, [r4, #4] /* destination address */
|
||||||
|
ldr r3, [r4, #8] /* word count */
|
||||||
|
lsls r3, r3, #2 /* byte count */
|
||||||
|
|
||||||
|
.L_loop0_0:
|
||||||
|
subs r3, #4 /* decrement byte count */
|
||||||
|
ittt ge
|
||||||
|
ldrge r0, [r1, r3]
|
||||||
|
strge r0, [r2, r3]
|
||||||
|
bge .L_loop0_0
|
||||||
|
|
||||||
|
adds r4, #12
|
||||||
|
b .L_loop0
|
||||||
|
.L_loop0_done:
|
||||||
|
|
||||||
|
ldr r3, =__zero_table_start__
|
||||||
|
ldr r4, =__zero_table_end__
|
||||||
|
|
||||||
|
.L_loop2:
|
||||||
|
cmp r3, r4
|
||||||
|
bge .L_loop2_done
|
||||||
|
ldr r1, [r3] /* destination address */
|
||||||
|
ldr r2, [r3, #4] /* word count */
|
||||||
|
lsls r2, r2, #2 /* byte count */
|
||||||
|
movs r0, 0
|
||||||
|
|
||||||
|
.L_loop2_0:
|
||||||
|
subs r2, #4 /* decrement byte count */
|
||||||
|
itt ge
|
||||||
|
strge r0, [r1, r2]
|
||||||
|
bge .L_loop2_0
|
||||||
|
|
||||||
|
adds r3, #8
|
||||||
|
b .L_loop2
|
||||||
|
.L_loop2_done:
|
||||||
|
|
||||||
|
bl _start
|
||||||
|
|
||||||
|
.fnend
|
||||||
|
.size Reset_Handler, . - Reset_Handler
|
||||||
|
|
||||||
|
/* The default macro is not used for HardFault_Handler
|
||||||
|
* because this results in a poor debug illusion.
|
||||||
|
*/
|
||||||
|
.thumb_func
|
||||||
|
.type HardFault_Handler, %function
|
||||||
|
.weak HardFault_Handler
|
||||||
|
.fnstart
|
||||||
|
HardFault_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size HardFault_Handler, . - HardFault_Handler
|
||||||
|
|
||||||
|
.thumb_func
|
||||||
|
.type Default_Handler, %function
|
||||||
|
.weak Default_Handler
|
||||||
|
.fnstart
|
||||||
|
Default_Handler:
|
||||||
|
b .
|
||||||
|
.fnend
|
||||||
|
.size Default_Handler, . - Default_Handler
|
||||||
|
|
||||||
|
/* Macro to define default exception/interrupt handlers.
|
||||||
|
* Default handler are weak symbols with an endless loop.
|
||||||
|
* They can be overwritten by real handlers.
|
||||||
|
*/
|
||||||
|
.macro Set_Default_Handler Handler_Name
|
||||||
|
.weak \Handler_Name
|
||||||
|
.set \Handler_Name, Default_Handler
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/* Default exception/interrupt handler */
|
||||||
|
|
||||||
|
Set_Default_Handler NMI_Handler
|
||||||
|
Set_Default_Handler MemManage_Handler
|
||||||
|
Set_Default_Handler BusFault_Handler
|
||||||
|
Set_Default_Handler UsageFault_Handler
|
||||||
|
Set_Default_Handler SVC_Handler
|
||||||
|
Set_Default_Handler DebugMon_Handler
|
||||||
|
Set_Default_Handler PendSV_Handler
|
||||||
|
Set_Default_Handler SysTick_Handler
|
||||||
|
|
||||||
|
Set_Default_Handler Interrupt0_Handler
|
||||||
|
Set_Default_Handler Interrupt1_Handler
|
||||||
|
Set_Default_Handler Interrupt2_Handler
|
||||||
|
Set_Default_Handler Interrupt3_Handler
|
||||||
|
Set_Default_Handler Interrupt4_Handler
|
||||||
|
Set_Default_Handler Interrupt5_Handler
|
||||||
|
Set_Default_Handler Interrupt6_Handler
|
||||||
|
Set_Default_Handler Interrupt7_Handler
|
||||||
|
Set_Default_Handler Interrupt8_Handler
|
||||||
|
Set_Default_Handler Interrupt9_Handler
|
||||||
|
|
||||||
|
|
||||||
|
.end
|
||||||
155
云台/云台/.cmsis/device/ARM/ARMCM3/Source/IAR/startup_ARMCM3.s
Normal file
155
云台/云台/.cmsis/device/ARM/ARMCM3/Source/IAR/startup_ARMCM3.s
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
;/**************************************************************************//**
|
||||||
|
; * @file startup_ARMCM3.s
|
||||||
|
; * @brief CMSIS Core Device Startup File for
|
||||||
|
; * ARMCM3 Device
|
||||||
|
; * @version V1.0.0
|
||||||
|
; * @date 09. July 2018
|
||||||
|
; ******************************************************************************/
|
||||||
|
;/*
|
||||||
|
; * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
|
||||||
|
; *
|
||||||
|
; * SPDX-License-Identifier: Apache-2.0
|
||||||
|
; *
|
||||||
|
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
; * not use this file except in compliance with the License.
|
||||||
|
; * You may obtain a copy of the License at
|
||||||
|
; *
|
||||||
|
; * www.apache.org/licenses/LICENSE-2.0
|
||||||
|
; *
|
||||||
|
; * Unless required by applicable law or agreed to in writing, software
|
||||||
|
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
; * See the License for the specific language governing permissions and
|
||||||
|
; * limitations under the License.
|
||||||
|
; */
|
||||||
|
|
||||||
|
;
|
||||||
|
; The modules in this file are included in the libraries, and may be replaced
|
||||||
|
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||||
|
; a user defined start symbol.
|
||||||
|
; To override the cstartup defined in the library, simply add your modified
|
||||||
|
; version to the workbench project.
|
||||||
|
;
|
||||||
|
; The vector table is normally located at address 0.
|
||||||
|
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||||
|
; The name "__vector_table" has special meaning for C-SPY:
|
||||||
|
; it is where the SP start value is found, and the NVIC vector
|
||||||
|
; table register (VTOR) is initialized to this address if != 0.
|
||||||
|
;
|
||||||
|
; Cortex-M version
|
||||||
|
;
|
||||||
|
|
||||||
|
MODULE ?cstartup
|
||||||
|
|
||||||
|
;; Forward declaration of sections.
|
||||||
|
SECTION CSTACK:DATA:NOROOT(3)
|
||||||
|
|
||||||
|
SECTION .intvec:CODE:NOROOT(2)
|
||||||
|
|
||||||
|
EXTERN __iar_program_start
|
||||||
|
EXTERN SystemInit
|
||||||
|
PUBLIC __vector_table
|
||||||
|
PUBLIC __vector_table_0x1c
|
||||||
|
PUBLIC __Vectors
|
||||||
|
PUBLIC __Vectors_End
|
||||||
|
PUBLIC __Vectors_Size
|
||||||
|
|
||||||
|
DATA
|
||||||
|
|
||||||
|
__vector_table
|
||||||
|
DCD sfe(CSTACK) ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; -14 NMI Handler
|
||||||
|
DCD HardFault_Handler ; -13 Hard Fault Handler
|
||||||
|
DCD MemManage_Handler ; -12 MPU Fault Handler
|
||||||
|
DCD BusFault_Handler ; -11 Bus Fault Handler
|
||||||
|
DCD UsageFault_Handler ; -10 Usage Fault Handler
|
||||||
|
__vector_table_0x1c
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; -5 SVC Handler
|
||||||
|
DCD DebugMon_Handler ; -4 Debug Monitor Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; -2 PendSV Handler
|
||||||
|
DCD SysTick_Handler ; -1 SysTick Handler
|
||||||
|
|
||||||
|
; Interrupts
|
||||||
|
DCD Interrupt0_Handler ; 0 Interrupt 0
|
||||||
|
DCD Interrupt1_Handler ; 1 Interrupt 1
|
||||||
|
DCD Interrupt2_Handler ; 2 Interrupt 2
|
||||||
|
DCD Interrupt3_Handler ; 3 Interrupt 3
|
||||||
|
DCD Interrupt4_Handler ; 4 Interrupt 4
|
||||||
|
DCD Interrupt5_Handler ; 5 Interrupt 5
|
||||||
|
DCD Interrupt6_Handler ; 6 Interrupt 6
|
||||||
|
DCD Interrupt7_Handler ; 7 Interrupt 7
|
||||||
|
DCD Interrupt8_Handler ; 8 Interrupt 8
|
||||||
|
DCD Interrupt9_Handler ; 9 Interrupt 9
|
||||||
|
|
||||||
|
DS32 (214) ; Interrupts 10 .. 224 are left out
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors EQU __vector_table
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
; Reset Handler
|
||||||
|
|
||||||
|
PUBWEAK Reset_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||||
|
Reset_Handler
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__iar_program_start
|
||||||
|
BX R0
|
||||||
|
|
||||||
|
|
||||||
|
PUBWEAK NMI_Handler
|
||||||
|
PUBWEAK HardFault_Handler
|
||||||
|
PUBWEAK MemManage_Handler
|
||||||
|
PUBWEAK BusFault_Handler
|
||||||
|
PUBWEAK UsageFault_Handler
|
||||||
|
PUBWEAK SVC_Handler
|
||||||
|
PUBWEAK DebugMon_Handler
|
||||||
|
PUBWEAK PendSV_Handler
|
||||||
|
PUBWEAK SysTick_Handler
|
||||||
|
|
||||||
|
PUBWEAK Interrupt0_Handler
|
||||||
|
PUBWEAK Interrupt1_Handler
|
||||||
|
PUBWEAK Interrupt2_Handler
|
||||||
|
PUBWEAK Interrupt3_Handler
|
||||||
|
PUBWEAK Interrupt4_Handler
|
||||||
|
PUBWEAK Interrupt5_Handler
|
||||||
|
PUBWEAK Interrupt6_Handler
|
||||||
|
PUBWEAK Interrupt7_Handler
|
||||||
|
PUBWEAK Interrupt8_Handler
|
||||||
|
PUBWEAK Interrupt9_Handler
|
||||||
|
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||||
|
NMI_Handler
|
||||||
|
HardFault_Handler
|
||||||
|
MemManage_Handler
|
||||||
|
BusFault_Handler
|
||||||
|
UsageFault_Handler
|
||||||
|
SVC_Handler
|
||||||
|
DebugMon_Handler
|
||||||
|
PendSV_Handler
|
||||||
|
SysTick_Handler
|
||||||
|
|
||||||
|
Interrupt0_Handler
|
||||||
|
Interrupt1_Handler
|
||||||
|
Interrupt2_Handler
|
||||||
|
Interrupt3_Handler
|
||||||
|
Interrupt4_Handler
|
||||||
|
Interrupt5_Handler
|
||||||
|
Interrupt6_Handler
|
||||||
|
Interrupt7_Handler
|
||||||
|
Interrupt8_Handler
|
||||||
|
Interrupt9_Handler
|
||||||
|
Default_Handler
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
150
云台/云台/.cmsis/device/ARM/ARMCM3/Source/startup_ARMCM3.c
Normal file
150
云台/云台/.cmsis/device/ARM/ARMCM3/Source/startup_ARMCM3.c
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* @file startup_ARMCM3.c
|
||||||
|
* @brief CMSIS-Core(M) Device Startup File for a Cortex-M3 Device
|
||||||
|
* @version V2.0.3
|
||||||
|
* @date 31. March 2020
|
||||||
|
******************************************************************************/
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2009-2020 Arm Limited. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined (ARMCM3)
|
||||||
|
#include "ARMCM3.h"
|
||||||
|
#else
|
||||||
|
#error device not specified!
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
External References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
extern uint32_t __INITIAL_SP;
|
||||||
|
|
||||||
|
extern __NO_RETURN void __PROGRAM_START(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Internal References
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler (void);
|
||||||
|
void Default_Handler(void);
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
/* Exceptions */
|
||||||
|
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void HardFault_Handler (void) __attribute__ ((weak));
|
||||||
|
void MemManage_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void BusFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void UsageFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void DebugMon_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
void Interrupt0_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt1_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt2_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt3_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt4_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt5_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt6_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt7_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt8_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
void Interrupt9_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Exception / Interrupt Vector table
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const VECTOR_TABLE_Type __VECTOR_TABLE[240];
|
||||||
|
const VECTOR_TABLE_Type __VECTOR_TABLE[240] __VECTOR_TABLE_ATTRIBUTE = {
|
||||||
|
(VECTOR_TABLE_Type)(&__INITIAL_SP), /* Initial Stack Pointer */
|
||||||
|
Reset_Handler, /* Reset Handler */
|
||||||
|
NMI_Handler, /* -14 NMI Handler */
|
||||||
|
HardFault_Handler, /* -13 Hard Fault Handler */
|
||||||
|
MemManage_Handler, /* -12 MPU Fault Handler */
|
||||||
|
BusFault_Handler, /* -11 Bus Fault Handler */
|
||||||
|
UsageFault_Handler, /* -10 Usage Fault Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
0, /* Reserved */
|
||||||
|
SVC_Handler, /* -5 SVC Handler */
|
||||||
|
DebugMon_Handler, /* -4 Debug Monitor Handler */
|
||||||
|
0, /* Reserved */
|
||||||
|
PendSV_Handler, /* -2 PendSV Handler */
|
||||||
|
SysTick_Handler, /* -1 SysTick Handler */
|
||||||
|
|
||||||
|
/* Interrupts */
|
||||||
|
Interrupt0_Handler, /* 0 Interrupt 0 */
|
||||||
|
Interrupt1_Handler, /* 1 Interrupt 1 */
|
||||||
|
Interrupt2_Handler, /* 2 Interrupt 2 */
|
||||||
|
Interrupt3_Handler, /* 3 Interrupt 3 */
|
||||||
|
Interrupt4_Handler, /* 4 Interrupt 4 */
|
||||||
|
Interrupt5_Handler, /* 5 Interrupt 5 */
|
||||||
|
Interrupt6_Handler, /* 6 Interrupt 6 */
|
||||||
|
Interrupt7_Handler, /* 7 Interrupt 7 */
|
||||||
|
Interrupt8_Handler, /* 8 Interrupt 8 */
|
||||||
|
Interrupt9_Handler /* 9 Interrupt 9 */
|
||||||
|
/* Interrupts 10 .. 223 are left out */
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined ( __GNUC__ )
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Reset Handler called on controller reset
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
__NO_RETURN void Reset_Handler(void)
|
||||||
|
{
|
||||||
|
SystemInit(); /* CMSIS System Initialization */
|
||||||
|
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Hard Fault Handler
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void HardFault_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
Default Handler for Exceptions / Interrupts
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void Default_Handler(void)
|
||||||
|
{
|
||||||
|
while(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user