Skip to content

Commit 852421f

Browse files
committed
Initial commit
0 parents  commit 852421f

File tree

264 files changed

+54459
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+54459
-0
lines changed

.gitattributes

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.git* export-ignore
2+
.hooks* export-ignore
3+
4+
# Custom attribute to mark sources as using our C code style.
5+
[attr]our-c-style whitespace=tab-in-indent eol=lf format.clang-format-6.0
6+
7+
# Custom attribute to mark sources as generated.
8+
# Do not perform whitespace checks. Do not format.
9+
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format-6.0
10+
11+
bootstrap eol=lf
12+
configure eol=lf
13+
*.[1-9] eol=lf
14+
*.bash eol=lf
15+
*.sh eol=lf
16+
*.sh.in eol=lf
17+
18+
*.bat eol=crlf
19+
*.bat.in eol=crlf
20+
*.sln eol=crlf
21+
*.vcproj eol=crlf
22+
23+
*.pfx -text
24+
*.png -text
25+
*.png.in -text
26+
27+
*.c our-c-style
28+
*.cc our-c-style
29+
*.cpp our-c-style
30+
*.cu our-c-style
31+
*.cxx our-c-style
32+
*.h our-c-style
33+
*.hh our-c-style
34+
*.hpp our-c-style
35+
*.hxx our-c-style
36+
*.notcu our-c-style
37+
38+
*.cmake whitespace=tab-in-indent
39+
*.rst whitespace=tab-in-indent conflict-marker-size=79
40+
*.txt whitespace=tab-in-indent

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.vscode/
2+
_deps/
3+
build/
4+
CMakeFiles/
5+
CMakeScripts/
6+
CMakeLists.txt.user
7+
CMakeCache.txt
8+
Testing
9+
Makefile
10+
cmake_install.cmake
11+
install_manifest.txt
12+
compile_commands.json
13+
CTestTestfile.cmake
14+

CMakeLists.txt

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
2+
3+
# Set up the project
4+
project(threadx
5+
VERSION 6.0.0
6+
LANGUAGES C ASM
7+
)
8+
9+
if(NOT DEFINED THREADX_ARCH)
10+
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
11+
endif()
12+
if(NOT DEFINED THREADX_TOOLCHAIN)
13+
message(FATAL_ERROR "Error: THREADX_TOOLCHAIN not defined")
14+
endif()
15+
16+
# Define our target library and an alias for consumers
17+
add_library(${PROJECT_NAME})
18+
add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME})
19+
20+
# A place for generated/copied include files (no need to change)
21+
set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
22+
23+
# Pick up the port specific variables and apply them
24+
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
25+
26+
# Pick up the common stuff
27+
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
28+
29+
30+
31+
32+
# If the user provided an override, copy it to the custom directory
33+
if (NOT TX_USER_FILE)
34+
message(STATUS "Using default tx_user.h file")
35+
set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/tx_user_sample.h)
36+
else()
37+
message(STATUS "Using custom tx_user.h file from ${UX_USER_FILE}")
38+
endif()
39+
configure_file(${TX_USER_FILE} ${CUSTOM_INC_DIR}/tx_user.h COPYONLY)
40+
target_include_directories(${PROJECT_NAME}
41+
PUBLIC
42+
${CUSTOM_INC_DIR}
43+
)
44+
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_INCLUDE_USER_DEFINE_FILE" )

LICENSE.txt

+246
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
MICROSOFT SOFTWARE LICENSE TERMS
2+
3+
MICROSOFT AZURE RTOS
4+
5+
Shape
6+
7+
These license terms are an agreement between you and Microsoft Corporation (or
8+
one of its affiliates). They apply to the software named above and any Microsoft
9+
services or software updates (except to the extent such services or updates are
10+
accompanied by new or additional terms, in which case those different terms
11+
apply prospectively and do not alter your or Microsoft’s rights relating to
12+
pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU
13+
HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
14+
15+
INSTALLATION AND USE RIGHTS.
16+
17+
General. You may install and use the software and the included Microsoft
18+
applications solely for internal development, testing and evaluation purposes.
19+
Any distribution or production use requires a separate license as set forth in
20+
Section 2.
21+
22+
Contributions. Microsoft welcomes contributions to this software. In the event
23+
that you make a contribution to this software you will be required to agree to a
24+
Contributor License Agreement (CLA) declaring that you have the right to, and
25+
actually do, grant Microsoft the rights to use your contribution. For details,
26+
visit https://cla.microsoft.com.
27+
28+
Included Microsoft Applications. The software includes other Microsoft
29+
applications which are governed by the licenses embedded in or made available
30+
with those applications.
31+
32+
Third Party Components. The software may include third party components with
33+
separate legal notices or governed by other agreements, as may be described
34+
within the software or in the ThirdPartyNotices file(s) accompanying the
35+
software.
36+
37+
Competitive Benchmarking. If you are a direct competitor, and you access or use
38+
the software for purposes of competitive benchmarking, analysis, or intelligence
39+
gathering, you waive as against Microsoft, its subsidiaries, and its affiliated
40+
companies (including prospectively) any competitive use, access, and
41+
benchmarking test restrictions in the terms governing your software to the
42+
extent your terms of use are, or purport to be, more restrictive than
43+
Microsoft’s terms. If you do not waive any such purported restrictions in the
44+
terms governing your software, you are not allowed to access or use this
45+
software, and will not do so.
46+
47+
DISTRIBUTION AND PRODUCTION USE. If you have obtained and/or are developing on
48+
microprocessor(s) and/or microcontroller(s) (“hardware”) listed in the file
49+
named “LICENSED-HARDWARE.txt” included in the repository and/or distributed with
50+
the software you have the following rights in and to the software solely when
51+
used in combination with the hardware. In the event hardware is not listed in
52+
the LICENSED-HARDWARE.txt file, you do not have the rights in this Section 2.
53+
54+
Distribution and Production Use Rights.
55+
56+
You may use the software in production (e.g. program the modified or unmodified
57+
software to devices you own or control) and distribute (i.e. make available to
58+
third parties) the modified or unmodified binary image produced from this code.
59+
60+
61+
You may permit your device distributors or developers to copy and distribute the
62+
binary image as programmed or to be programmed to your devices.
63+
64+
You may redistribute the unmodified or modified source to your device
65+
distributors or developers. Modifications must be clearly marked. Any
66+
redistribution in source code form must contain this license and any other
67+
licenses that accompany the software.
68+
69+
Requirements. For any code you distribute, you must:
70+
71+
when distributed in binary form, except as embedded in a device, include with
72+
such distribution the terms of this agreement;
73+
74+
when distributed in source code form to distributors or developers of your
75+
devices, include with such distribution the terms of this agreement; and
76+
77+
indemnify, defend and hold harmless Microsoft from any claims, including
78+
attorneys’ fees, related to the distribution or use of your devices, except to
79+
the extent that any claim is based solely on the unmodified software.
80+
81+
Restrictions. You may not:
82+
83+
use or modify the software to create a competing real time operating system
84+
software;
85+
86+
remove any copyright notices or licenses contained in the software;
87+
88+
use Microsoft’s trademarks or trade dress in your application in any way that
89+
suggests your device or application comes from or is endorsed by Microsoft;
90+
91+
transfer individual components, specific libraries, classes, functions or code
92+
fragments of the software separately for purposes unrelated to the software; or
93+
94+
use or distribute the software in any way that would subject the software or
95+
Microsoft’s intellectual property or technology to any other license terms.
96+
97+
SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all
98+
other rights. Unless applicable law gives you more rights despite this
99+
limitation, you will not (and have no right to):
100+
101+
remove, minimize, block, or modify any notices of Microsoft or its suppliers in
102+
the software;
103+
104+
use the software in any way that is against the law or to create or propagate
105+
malware; or
106+
107+
share, publish, distribute, or lease the software (except as permitted in
108+
Section 2 above), or provide the software as a stand-alone offering for others
109+
to use.
110+
111+
DATA. This software may interact with other Microsoft products that collect data
112+
that is transmitted to Microsoft. To learn more about how Microsoft processes
113+
personal data we collect, please see the Microsoft Privacy Statement at
114+
https://go.microsoft.com/fwlink/?LinkId=248681.
115+
116+
EXPORT RESTRICTIONS. You must comply with all domestic and international export
117+
laws and regulations that apply to the software, which include restrictions on
118+
destinations, end users, and end use. For further information on export
119+
restrictions, visit https://aka.ms/exporting.
120+
121+
SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any
122+
support services for the software. Any support provided is “as is”, “with all
123+
faults”, and without warranty of any kind.
124+
125+
UPDATES. Microsoft may periodically update the software. You may obtain updates
126+
only from Microsoft or Microsoft-authorized sources. Updates may not include or
127+
support all existing software features, services, or peripheral devices.
128+
129+
TERMINATION. Without prejudice to any other rights, Microsoft may terminate this
130+
agreement if you fail to comply with any of its terms or conditions. In such
131+
event, you must destroy all copies of the software and all of its component
132+
parts.
133+
134+
ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for
135+
supplements, updates, or third-party applications, is the entire agreement for
136+
the software. To the extent you have entered into a separate agreement with
137+
Microsoft relating specifically to the software, the terms in such agreement
138+
shall control.
139+
140+
APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in
141+
the United States or Canada, the laws of the state or province where you live
142+
(or, if a business, where your principal place of business is located) govern
143+
the interpretation of this agreement, claims for its breach, and all other
144+
claims (including consumer protection, unfair competition, and tort claims),
145+
regardless of conflict of laws principles. If you acquired the software in any
146+
other country, its laws apply. If U.S. federal jurisdiction exists, you and
147+
Microsoft consent to exclusive jurisdiction and venue in the federal court in
148+
King County, Washington for all disputes heard in court. If not, you and
149+
Microsoft consent to exclusive jurisdiction and venue in the Superior Court of
150+
King County, Washington for all disputes heard in court.
151+
152+
CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal
153+
rights. You may have other rights, including consumer rights, under the laws of
154+
your state or country. Separate and apart from your relationship with Microsoft,
155+
you may also have rights with respect to the party from which you acquired the
156+
software. This agreement does not change those other rights if the laws of your
157+
state or country do not permit it to do so. For example, if you acquired the
158+
software in one of the below regions, or mandatory country law applies, then the
159+
following provisions apply to you:
160+
161+
Australia. You have statutory guarantees under the Australian Consumer Law and
162+
nothing in this agreement is intended to affect those rights.
163+
164+
Germany and Austria.
165+
166+
i.Warranty. The properly licensed software will perform substantially as
167+
described in any Microsoft materials that accompany the software. However,
168+
Microsoft gives no contractual guarantee in relation to the licensed software.
169+
170+
ii.Limitation of Liability. In case of intentional conduct, gross negligence,
171+
claims based on the Product Liability Act, as well as, in case of death or
172+
personal or physical injury, Microsoft is liable according to the statutory law.
173+
174+
175+
Subject to the foregoing clause ii., Microsoft will only be liable for slight
176+
negligence if Microsoft is in breach of such material contractual obligations,
177+
the fulfillment of which facilitate the due performance of this agreement, the
178+
breach of which would endanger the purpose of this agreement and the compliance
179+
with which a party may constantly trust in (so-called "cardinal obligations").
180+
In other cases of slight negligence, Microsoft will not be liable for slight
181+
negligence.
182+
183+
DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF
184+
USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO
185+
THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED
186+
WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
187+
NON-INFRINGEMENT.
188+
189+
LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING
190+
DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM
191+
MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT
192+
RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL,
193+
INDIRECT, OR INCIDENTAL DAMAGES.
194+
195+
This limitation applies to (a) anything related to the software, services,
196+
content (including code) on third party Internet sites, or third party
197+
applications; and (b) claims for breach of contract, warranty, guarantee, or
198+
condition; strict liability, negligence, or other tort; or any other claim; in
199+
each case to the extent permitted by applicable law.
200+
201+
It also applies even if Microsoft knew or should have known about the
202+
possibility of the damages. The above limitation or exclusion may not apply to
203+
you because your state, province, or country may not allow the exclusion or
204+
limitation of incidental, consequential, or other damages.
205+
206+
207+
208+
Please note: As this software is distributed in Canada, some of the clauses in
209+
this agreement are provided below in French.
210+
211+
Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce
212+
contrat sont fournies ci-dessous en français.
213+
214+
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel
215+
». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft
216+
n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits
217+
additionnels en vertu du droit local sur la protection des consommateurs, que ce
218+
contrat ne peut modifier. La ou elles sont permises par le droit locale, les
219+
garanties implicites de qualité marchande, d’adéquation à un usage particulier
220+
et d’absence de contrefaçon sont exclues.
221+
222+
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES
223+
DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une
224+
indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous
225+
ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris
226+
les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
227+
228+
Cette limitation concerne:
229+
230+
•tout ce qui est relié au logiciel, aux services ou au contenu (y compris le
231+
code) figurant sur des sites Internet tiers ou dans des programmes tiers; et
232+
233+
•les réclamations au titre de violation de contrat ou de garantie, ou au titre
234+
de responsabilité stricte, de négligence ou d’une autre faute dans la limite
235+
autorisée par la loi en vigueur.
236+
237+
Elle s’applique également, même si Microsoft connaissait ou devrait connaître
238+
l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la
239+
limitation de responsabilité pour les dommages indirects, accessoires ou de
240+
quelque nature que ce soit, il se peut que la limitation ou l’exclusion
241+
ci-dessus ne s’appliquera pas à votre égard.
242+
243+
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous
244+
pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent
245+
contrat ne modifie pas les droits que vous confèrent les lois de votre pays si
246+
celles-ci ne le permettent pas.

LICENSED-HARDWARE.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
LICENSED HARDWARE LIST
2+
3+
Last Updated: 2020-05-08
4+
5+
Microsoft has entered into OEM Agreements with manufacturers of the following
6+
microprocessors and microcontrollers (the “hardware”) to enable those
7+
manufacturers to include and distribute Azure RTOS in certain hardware. If you
8+
have obtained and/or are developing on microprocessor(s) and/or
9+
microcontroller(s) (“hardware”) listed below you inherit the “Distribution and
10+
Production Use” rights in Section 2 of the Microsoft Software License Terms for
11+
Microsoft Azure RTOS. If hardware is not listed below, you do not have those
12+
rights.
13+
14+
--------------------------------------------------------------------------------
15+
16+
More coming soon. Please check back frequently for updates.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ThreadX

TODO

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TODO:
2+

0 commit comments

Comments
 (0)