add libs
This commit is contained in:
21
lib_gpio/.gitignore
vendored
Normal file
21
lib_gpio/.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
.*.swp
|
||||
**/.build*/*
|
||||
**/bin/*
|
||||
*.o
|
||||
*.xe
|
||||
*.vcd
|
||||
*.s
|
||||
*.xi
|
||||
*.i
|
||||
*.a
|
||||
**/_build/
|
||||
**/run_*.log
|
||||
**/pdf/*
|
||||
*.pyc
|
||||
test_results.csv
|
||||
**/.venv/**
|
||||
|
||||
# waf build files
|
||||
.lock-waf_*
|
||||
.waf-*/
|
||||
build/
|
||||
44
lib_gpio/CHANGELOG.rst
Normal file
44
lib_gpio/CHANGELOG.rst
Normal file
@@ -0,0 +1,44 @@
|
||||
GPIO library change log
|
||||
=======================
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* CHANGED: Update tests to support tools 15.x.x
|
||||
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* CHANGED: Use XMOS Public Licence Version 1
|
||||
|
||||
2.0.1
|
||||
-----
|
||||
|
||||
* CHANGED: Pin Python package versions
|
||||
* REMOVED: not necessary cpanfile
|
||||
|
||||
2.0.0
|
||||
-----
|
||||
|
||||
* CHANGED: Build files updated to support new "xcommon" behaviour in xwaf.
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
|
||||
* CHANGE: Minor documentation clarifications
|
||||
* CHANGE: Update to dependency (lib_xassert moved to 3.0.0)
|
||||
|
||||
1.0.1
|
||||
-----
|
||||
|
||||
* CHANGE: Update to source code license and copyright
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
|
||||
* Initial version
|
||||
|
||||
* Changes to dependencies:
|
||||
|
||||
- lib_xassert: Added dependency 2.0.0
|
||||
|
||||
55
lib_gpio/Jenkinsfile
vendored
Normal file
55
lib_gpio/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
@Library('xmos_jenkins_shared_library@v0.32.0') _
|
||||
|
||||
getApproval()
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'x86_64&&linux'
|
||||
}
|
||||
environment {
|
||||
REPO = 'lib_gpio'
|
||||
VIEW = getViewName(REPO)
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
stages {
|
||||
stage('Get view') {
|
||||
steps {
|
||||
xcorePrepareSandbox("${VIEW}", "${REPO}")
|
||||
}
|
||||
}
|
||||
|
||||
stage('Library checks') {
|
||||
steps {
|
||||
xcoreLibraryChecks("${REPO}")
|
||||
}
|
||||
}
|
||||
stage('Tests') {
|
||||
steps {
|
||||
runXmostest("${REPO}", 'tests')
|
||||
}
|
||||
}
|
||||
stage('xCORE builds') {
|
||||
steps {
|
||||
dir("${REPO}") {
|
||||
xcoreAllAppsBuild('examples')
|
||||
dir("${REPO}") {
|
||||
runXdoc('doc')
|
||||
}
|
||||
}
|
||||
|
||||
// Archive all the generated .pdf docs
|
||||
archiveArtifacts artifacts: "${REPO}/**/pdf/*.pdf", fingerprint: true, allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
updateViewfiles()
|
||||
}
|
||||
cleanup {
|
||||
xcoreCleanSandbox()
|
||||
}
|
||||
}
|
||||
}
|
||||
84
lib_gpio/LICENSE.rst
Normal file
84
lib_gpio/LICENSE.rst
Normal file
@@ -0,0 +1,84 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
39
lib_gpio/README.rst
Normal file
39
lib_gpio/README.rst
Normal file
@@ -0,0 +1,39 @@
|
||||
GPIO Library
|
||||
============
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The XMOS GPIO library allows you to access xCORE ports as low-speed GPIO.
|
||||
|
||||
Although xCORE ports can be directly accessed via the xC programming
|
||||
language this library allows more flexible usage. In particular, it
|
||||
allows splitting a multi-pin output/input port to be able to use
|
||||
the individual pins independently. It also allows accessing ports
|
||||
across separate XMOS tiles or separate XMOS chips.
|
||||
|
||||
Features
|
||||
........
|
||||
|
||||
* Abstract interface to GPIO functionality of XMOS ports
|
||||
* Allow control of individual bits of multi-bit ports
|
||||
* Allow access to ports across tiles
|
||||
|
||||
Operating modes
|
||||
...............
|
||||
|
||||
* Multi-bit output for individual access to the pins of a multi-bit output port
|
||||
* Multi-bit input for individual access to the pins of a multi-bit input port
|
||||
* Multi-bit input for individual access to the pins of a multi-bit
|
||||
input port allowing the application to react to events on those pins
|
||||
|
||||
Software version and dependencies
|
||||
.................................
|
||||
|
||||
The CHANGELOG contains information about the current and previous versions.
|
||||
For a list of direct dependencies, look for DEPENDENT_MODULES in lib_gpio/module_build_info.
|
||||
|
||||
Related application notes
|
||||
.........................
|
||||
|
||||
Currently there are none.
|
||||
528
lib_gpio/examples/app_gpio_flashing_leds/.cproject
Normal file
528
lib_gpio/examples/app_gpio_flashing_leds/.cproject
Normal file
@@ -0,0 +1,528 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<?fileVersion 4.0.0?>
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="com.xmos.cdt.toolchain.92757610">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.92757610" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings />
|
||||
<extensions>
|
||||
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser" />
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.92757610" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.xmos.cdt.toolchain.92757610.1127281840" name="/" resourcePath="">
|
||||
<toolChain id = "com.xmos.cdt.toolchain.32616463" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser;org.eclipse.cdt.core.GNU_ELF" id = "com.xmos.cdt.core.platform.2811492" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform" />
|
||||
<builder arguments="" id = "com.xmos.cdt.builder.base.87307823" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin" />
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id = "com.xmos.cdt.xc.compiler.50784169" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||
<option id = "com.xmos.xc.compiler.option.defined.symbols.51553279" name="com.xmos.xc.compiler.option.defined.symbols" superClass="com.xmos.xc.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1111"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=11"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__MCPP=2"/>
|
||||
<listOptionValue builtIn="false" value="__XC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__EXCEPTIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.xc.compiler.option.include.paths.51313454" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.xc.compiler.input.55155475" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.c.compiler.26645969" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||
<option id = "com.xmos.c.compiler.option.defined.symbols.22987719" name="com.xmos.c.compiler.option.defined.symbols" superClass="com.xmos.c.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_VERSION__=199901L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_STDC_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.c.compiler.option.include.paths.42141732" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.c.compiler.input.c.49735529" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.cxx.compiler.84727129" name="com.xmos.cdt.cxx.compiler" superClass="com.xmos.cdt.cxx.compiler">
|
||||
<option id = "com.xmos.cxx.compiler.option.defined.symbols.99761820" name="com.xmos.cxx.compiler.option.defined.symbols" superClass="com.xmos.cxx.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.cxx.compiler.option.include.paths.12308476" name="com.xmos.cxx.compiler.option.include.paths" superClass="com.xmos.cxx.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.cxx.compiler.input.cpp.99407135" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding=".build_*" flags="VALUE_WORKSPACE_PATH|RESOLVED"
|
||||
kind="sourcePath" name="" />
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-E -P -v -dD" command="" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping" />
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings" />
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id = "gpio_flashing_leds.null.59544653" name="gpio_flashing_leds" />
|
||||
</storageModule>
|
||||
</cproject>
|
||||
75
lib_gpio/examples/app_gpio_flashing_leds/.project
Normal file
75
lib_gpio/examples/app_gpio_flashing_leds/.project
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gpio_flashing_leds</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?children?</key>
|
||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>CONFIG=Debug</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>xmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
84
lib_gpio/examples/app_gpio_flashing_leds/LICENSE.rst
Normal file
84
lib_gpio/examples/app_gpio_flashing_leds/LICENSE.rst
Normal file
@@ -0,0 +1,84 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
26
lib_gpio/examples/app_gpio_flashing_leds/Makefile
Normal file
26
lib_gpio/examples/app_gpio_flashing_leds/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
APP_NAME = gpio_flashing_leds
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
USED_MODULES = lib_gpio
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
XCC_FLAGS = -O2 -g
|
||||
|
||||
# The XCORE_ARM_PROJECT variable, if set to 1, configures this
|
||||
# project to create both xCORE and ARM binaries.
|
||||
XCORE_ARM_PROJECT = 0
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
-include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
29
lib_gpio/examples/app_gpio_flashing_leds/src/main.xc
Normal file
29
lib_gpio/examples/app_gpio_flashing_leds/src/main.xc
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <xs1.h>
|
||||
#include <gpio.h>
|
||||
|
||||
port p_led1 = XS1_PORT_1A;
|
||||
port p_led2 = XS1_PORT_1B;
|
||||
|
||||
void flash_leds(client output_gpio_if led1, client output_gpio_if led2)
|
||||
{
|
||||
while (1) {
|
||||
led1.output(1);
|
||||
led2.output(0);
|
||||
delay_milliseconds(200);
|
||||
led1.output(0);
|
||||
led2.output(1);
|
||||
delay_milliseconds(200);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
interface output_gpio_if i_led1[1], i_led2[1];
|
||||
par {
|
||||
output_gpio(i_led1, 1, p_led1, null);
|
||||
output_gpio(i_led2, 1, p_led2, null);
|
||||
flash_leds(i_led1[0], i_led2[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
14
lib_gpio/examples/app_gpio_flashing_leds/wscript
Normal file
14
lib_gpio/examples/app_gpio_flashing_leds/wscript
Normal file
@@ -0,0 +1,14 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
492
lib_gpio/lib_gpio/.cproject
Normal file
492
lib_gpio/lib_gpio/.cproject
Normal file
@@ -0,0 +1,492 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<?fileVersion 4.0.0?>
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="com.xmos.cdt.toolchain.57523242">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.57523242" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings />
|
||||
<extensions>
|
||||
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser" />
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments> -f .makefile</buildArguments>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments> -f .makefile</buildArguments>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.57523242" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.xmos.cdt.toolchain.57523242.1127281840" name="/" resourcePath="">
|
||||
<toolChain id = "com.xmos.cdt.toolchain.23600535" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser;org.eclipse.cdt.core.GNU_ELF" id = "com.xmos.cdt.core.platform.81104918" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform" />
|
||||
<builder arguments=" -f .makefile" id = "com.xmos.cdt.builder.base.28632690" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin" />
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id = "com.xmos.cdt.xc.compiler.25750820" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||
<option id = "com.xmos.xc.compiler.option.defined.symbols.70585171" name="com.xmos.xc.compiler.option.defined.symbols" superClass="com.xmos.xc.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1111"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=11"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__MCPP=2"/>
|
||||
<listOptionValue builtIn="false" value="__XC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__EXCEPTIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.xc.compiler.option.include.paths.81829045" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.xc.compiler.input.79446827" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.c.compiler.85196426" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||
<option id = "com.xmos.c.compiler.option.defined.symbols.23867423" name="com.xmos.c.compiler.option.defined.symbols" superClass="com.xmos.c.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_VERSION__=199901L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_STDC_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.c.compiler.option.include.paths.61056721" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.c.compiler.input.c.81398683" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.cxx.compiler.88494951" name="com.xmos.cdt.cxx.compiler" superClass="com.xmos.cdt.cxx.compiler">
|
||||
<option id = "com.xmos.cxx.compiler.option.defined.symbols.23703551" name="com.xmos.cxx.compiler.option.defined.symbols" superClass="com.xmos.cxx.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.cxx.compiler.option.include.paths.92945822" name="com.xmos.cxx.compiler.option.include.paths" superClass="com.xmos.cxx.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.cxx.compiler.input.cpp.45814858" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding=".build_*" flags="VALUE_WORKSPACE_PATH|RESOLVED"
|
||||
kind="sourcePath" name="" />
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-E -P -v -dD" command="" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping" />
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings" />
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id = "lib_gpio.null.72009052" name="lib_gpio" />
|
||||
</storageModule>
|
||||
</cproject>
|
||||
75
lib_gpio/lib_gpio/.project
Normal file
75
lib_gpio/lib_gpio/.project
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>lib_gpio</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?children?</key>
|
||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>CONFIG=Debug</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>xmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
157
lib_gpio/lib_gpio/api/gpio.h
Normal file
157
lib_gpio/lib_gpio/api/gpio.h
Normal file
@@ -0,0 +1,157 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef __gpio_h__
|
||||
#define __gpio_h__
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __XC__
|
||||
|
||||
typedef uint16_t gpio_time_t;
|
||||
|
||||
/** This interface provides access to a GPIO that can perform input
|
||||
operations only. All GPIOs are single bit. */
|
||||
typedef interface input_gpio_if
|
||||
{
|
||||
/** Perform an input on a GPIO
|
||||
*
|
||||
* \returns The value input from the port in the least significant bit.
|
||||
* The rest of the value will be zero extended.
|
||||
*/
|
||||
unsigned input(void);
|
||||
|
||||
/** Perform an input on a GPIO and get a timestamp
|
||||
*
|
||||
* \param timestamp This pass-by-reference parameter will be set
|
||||
* to the time the value was input. This timestamp
|
||||
* is the 16-bit port timer value. The port timer is
|
||||
* driven at the rate of the port clock.
|
||||
*
|
||||
* \returns The value input from the port in the least significant bit.
|
||||
* The rest of the value will be zero extended.
|
||||
*/
|
||||
unsigned input_and_timestamp(gpio_time_t ×tamp);
|
||||
|
||||
/** Request an event when the pin is a certain value.
|
||||
*
|
||||
* This function will cause a notification to occur when the pins
|
||||
* match the specified value.
|
||||
*
|
||||
* \param val The least significant bit represents the 1-bit value to match.
|
||||
*/
|
||||
[[clears_notification]]
|
||||
void event_when_pins_eq(unsigned val);
|
||||
|
||||
/** A pin event has occurred.
|
||||
*
|
||||
* This notification will occur when a pin event has occurred.
|
||||
* Events can be requested using the event_when_pins_eq() call.
|
||||
*/
|
||||
[[notification]]
|
||||
slave void event(void);
|
||||
|
||||
} input_gpio_if;
|
||||
|
||||
/** This interface provides access to a GPIO that can perform output
|
||||
operations only. All GPIOs are single bit. */
|
||||
typedef interface output_gpio_if
|
||||
{
|
||||
/** Perform an output on a GPIO.
|
||||
*
|
||||
* \param data The value to be output. The least significant bit
|
||||
* represents the 1-bit value to be output.
|
||||
*/
|
||||
void output(unsigned data);
|
||||
|
||||
/** Perform an output on a GPIO and get a timestamp of when the output
|
||||
* occurs.
|
||||
*
|
||||
* \param data The value to be output. The least significant bit
|
||||
* represents the 1-bit value to be output.
|
||||
*
|
||||
* \returns The time the value was input. This timestamp
|
||||
* is the 16-bit port timer value. The port timer is driven
|
||||
* at the rate of the port clock.
|
||||
*/
|
||||
gpio_time_t output_and_timestamp(unsigned data);
|
||||
} output_gpio_if;
|
||||
|
||||
|
||||
/** Task that splits a multi-bit port into several 1-bit GPIO interfaces.
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit output port.
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The output port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[distributable]]
|
||||
void output_gpio(server output_gpio_if i[n], static const size_t n, out port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/** Task that splits a multi-bit input port into several 1-bit GPIO interfaces
|
||||
* (no events).
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit input port. It does not support events but is distributable so
|
||||
* requires no specific logical core to run on. If the event_when_pins_eq()
|
||||
* function is called then the component will trap.
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The input port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[distributable]]
|
||||
void input_gpio(server input_gpio_if i[n], static const size_t n, in port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/* Task that splits a multi-bit input port into several 1-bit GPIO interfaces
|
||||
* (with events).
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit input port. It does support events so requires a logical
|
||||
* core to run on (but can be combined with other tasks on the same core).
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The input port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[combinable]]
|
||||
void input_gpio_with_events(server input_gpio_if i[n],
|
||||
static const size_t n,
|
||||
in port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/** Convert a 1-bit port to a single 1-bit GPIO interface.
|
||||
*
|
||||
* This component allows other tasks to access a 1-bit port as a GPIO
|
||||
* interface. It is more efficient that using input_gpio_with_events() for the
|
||||
* restricted case where a 1-bit port is used.
|
||||
*
|
||||
* \param i The interface to connect to other tasks.
|
||||
* \param p The input port.
|
||||
*/
|
||||
[[combinable]]
|
||||
void input_gpio_1bit_with_events(server input_gpio_if i, in port p);
|
||||
|
||||
#endif
|
||||
#endif // __gpio_h__
|
||||
19
lib_gpio/lib_gpio/doc/rst/images/Makefile
Normal file
19
lib_gpio/lib_gpio/doc/rst/images/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
ODGS = $(wildcard *.odg)
|
||||
PDFS = $(ODGS:.odg=.pdf)
|
||||
|
||||
all: $(PDFS)
|
||||
@echo PDFs created
|
||||
|
||||
_uncropped:
|
||||
mkdir _uncropped
|
||||
|
||||
_uncropped/%.pdf: %.odg | _uncropped
|
||||
soffice -env:UserInstallation=file:///home/$(USER)/.libreoffice-alt --headless --convert-to pdf $< --outdir _uncropped
|
||||
|
||||
%.pdf: _uncropped/%.pdf
|
||||
pdfcrop $< $@
|
||||
|
||||
clean:
|
||||
-rm $(PDFS)
|
||||
-rm _uncropped/*.pdf
|
||||
-rmdir _uncropped
|
||||
BIN
lib_gpio/lib_gpio/doc/rst/images/input_gpio_task_diag.odg
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/input_gpio_task_diag.odg
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/input_gpio_task_diag.pdf
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/input_gpio_task_diag.pdf
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_input.odg
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_input.odg
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_input.pdf
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_input.pdf
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_output.odg
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_output.odg
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_output.pdf
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/n_bit_output.pdf
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/output_gpio_task_diag.odg
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/output_gpio_task_diag.odg
Normal file
Binary file not shown.
BIN
lib_gpio/lib_gpio/doc/rst/images/output_gpio_task_diag.pdf
Normal file
BIN
lib_gpio/lib_gpio/doc/rst/images/output_gpio_task_diag.pdf
Normal file
Binary file not shown.
264
lib_gpio/lib_gpio/doc/rst/index.rst
Normal file
264
lib_gpio/lib_gpio/doc/rst/index.rst
Normal file
@@ -0,0 +1,264 @@
|
||||
.. include:: ../../../README.rst
|
||||
|
||||
Connecting external signals to multi-bit ports
|
||||
----------------------------------------------
|
||||
|
||||
Multi-bit ports can be connected to independent signals in either an
|
||||
all output configuration (see :ref:`lib_gpio_n_bit_output`) or an all
|
||||
input configuration (see :ref:`lib_gpio_n_bit_input`). This implies
|
||||
two important restrictions:
|
||||
|
||||
* **Bi-directional signals cannot use this library**
|
||||
* **The signals on the same port must go in the same direction**
|
||||
|
||||
To use bi-directional signals, a dedicated 1-bit hardware port needs
|
||||
to be used.
|
||||
|
||||
.. _lib_gpio_n_bit_input:
|
||||
|
||||
.. figure:: images/n_bit_input.*
|
||||
|
||||
Input configuration
|
||||
|
||||
.. _lib_gpio_n_bit_output:
|
||||
|
||||
.. figure:: images/n_bit_output.*
|
||||
|
||||
Output configuration
|
||||
|
||||
Performance restrictions
|
||||
........................
|
||||
|
||||
This library allows independent access to the pins of mulit-bit ports
|
||||
by multiplexing the port output or input in software. This means that
|
||||
there are some performance implications, namely:
|
||||
|
||||
* The internal buffering, serializing and de-serializing features of
|
||||
the xCORE port are not available.
|
||||
* The software locking and multiplexing between individual bits of
|
||||
the port limits performance. As such, toggling
|
||||
pins at speed above 1Mhz, for example, is not achievable (on a
|
||||
62.5Mhz logical core). The limit may be lower depending on the other
|
||||
code is running on the core and how the other pins of the port are being
|
||||
driven.
|
||||
|
||||
As such, sharing multi-bit ports is most suitable for slow I/O such as
|
||||
LEDs, buttons and reset lines.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Output GPIO usage
|
||||
.................
|
||||
|
||||
Output GPIO components are instantiated as parallel tasks that run in a
|
||||
``par`` statement. These components connect to the hardware ports of
|
||||
the xCORE device. The application
|
||||
can connect via an interface connection using an array of the ``output_gpio_if``
|
||||
interface type:
|
||||
|
||||
.. figure:: images/output_gpio_task_diag.*
|
||||
|
||||
Output GPIO task diagram
|
||||
|
||||
For example, the following code instantiates an output GPIO component
|
||||
for the first 3 pins of a port and connects to it::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
output_gpio_if i_gpio[3];
|
||||
par {
|
||||
output_gpio(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Note that the connection is an array of interfaces, so several tasks
|
||||
can connect to the same component instance, each controlling
|
||||
different pins of the port.
|
||||
|
||||
The application can use the client end of the interface connection to
|
||||
perform GPIO operations e.g.::
|
||||
|
||||
void task1(client output_gpio_if gpio1, client output_gpio_if gpio2)
|
||||
{
|
||||
...
|
||||
gpio1.output(1);
|
||||
gpio2.output(0);
|
||||
delay_milliseconds(200);
|
||||
gpio1.output(0);
|
||||
gpio2.output(1);
|
||||
...
|
||||
}
|
||||
|
||||
More information on interfaces and tasks can be be found in
|
||||
the :ref:`XMOS Programming Guide<programming_guide>`. By default the
|
||||
output GPIO component does not use any logical cores of its
|
||||
own. It is a *distributed* task which means it will perform its
|
||||
function on the logical core of the application task connected to
|
||||
it (provided the application task is on the same tile).
|
||||
|
||||
Input GPIO usage
|
||||
................
|
||||
|
||||
There are two types of input GPIO component: those that support events
|
||||
and those that do not support events. In both cases,
|
||||
input GPIO components are instantiated as parallel tasks that run in a
|
||||
``par`` statement. These components connect to the hardware ports of
|
||||
the xCORE device. The application
|
||||
can connect via an interface connection using an array of the ``input_gpio_if``
|
||||
interface type:
|
||||
|
||||
.. figure:: images/input_gpio_task_diag.*
|
||||
|
||||
Input GPIO task diagram
|
||||
|
||||
For example, the following code instantiates an input GPIO component
|
||||
for the first 3 pins of a port and connects to it::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
input_gpio_if i_gpio[3];
|
||||
par {
|
||||
input_gpio(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Note that the connection is an array of interfaces, so several tasks
|
||||
can connect to the same component instance, each controlling
|
||||
different pins of the port.
|
||||
|
||||
|newpage|
|
||||
|
||||
The application can use the client end of the interface connection to
|
||||
perform GPIO operations e.g.::
|
||||
|
||||
void task1(client input_gpio_if gpio1, client input_gpio_if gpio2)
|
||||
{
|
||||
...
|
||||
val1 = gpio1.input();
|
||||
val2 = gpio2.input();
|
||||
...
|
||||
...
|
||||
val1 = gpio1.input();
|
||||
val2 = gpio2.input();
|
||||
...
|
||||
}
|
||||
|
||||
More information on interfaces and tasks can be be found in
|
||||
the :ref:`XMOS Programming Guide<programming_guide>`. By default the
|
||||
output GPIO component does not use any logical cores of its
|
||||
own. It is a *distributed* task which means it will perform its
|
||||
function on the logical core of the application task connected to
|
||||
it (provided the application task is on the same tile).
|
||||
|
||||
Using events
|
||||
............
|
||||
|
||||
The :c:func:`input_gpio_with_events` and
|
||||
:c:func:`input_gpio_1bit_with_events` functions support the event
|
||||
based functions of the input GPIO interface::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
input_gpio_if i_gpio[3];
|
||||
par {
|
||||
input_gpio_with_events(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
In this case the application can request an event on a pin change and
|
||||
then select on the event happening e.g.::
|
||||
|
||||
gpio.event_when_pins_eq(1);
|
||||
select {
|
||||
case gpio.event():
|
||||
// This event was caused by the pin value being 1
|
||||
...
|
||||
break;
|
||||
}
|
||||
|
||||
|newpage|
|
||||
|
||||
Pin maps
|
||||
........
|
||||
|
||||
The GPIO tasks all take a ``pin_map`` argument. If this is ``null``
|
||||
then the elements of the inteface array will correspond with the a bit
|
||||
of the port based on the array element index. So the first element of
|
||||
the array will control bit 0, the second with control bit 1 and so on.
|
||||
|
||||
Alternatively an array can be provided mapping array elements to
|
||||
pins. For example, the following will map the array indices to pins 3,
|
||||
2 and 7 of the port::
|
||||
|
||||
char pin_map[3] = {3, 2, 7};
|
||||
|
||||
int main() {
|
||||
...
|
||||
par {
|
||||
output_gpio(i_gpio, 3, p, pin_map);
|
||||
...
|
||||
|
||||
Output GPIO API
|
||||
---------------
|
||||
|
||||
All GPIO functions can be accessed via the ``gpio.h`` header::
|
||||
|
||||
#include <gpio.h>
|
||||
|
||||
You will also have to add ``lib_gpio`` to the
|
||||
``USED_MODULES`` field of your application Makefile.
|
||||
|
||||
Output GPIO components
|
||||
......................
|
||||
|
||||
.. doxygenfunction:: output_gpio
|
||||
|
||||
|newpage|
|
||||
|
||||
Output GPIO interface
|
||||
.....................
|
||||
|
||||
.. doxygeninterface:: output_gpio_if
|
||||
|
||||
Input GPIO API
|
||||
--------------
|
||||
|
||||
Input GPIO components
|
||||
......................
|
||||
|
||||
.. doxygenfunction:: input_gpio
|
||||
.. doxygenfunction:: input_gpio_with_events
|
||||
|
||||
|newpage|
|
||||
|
||||
.. doxygenfunction:: input_gpio_1bit_with_events
|
||||
|
||||
|newpage|
|
||||
|
||||
Input GPIO interface
|
||||
....................
|
||||
|
||||
.. doxygeninterface:: input_gpio_if
|
||||
|
||||
|
||||
|appendix|
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
|
||||
No known issues.
|
||||
|
||||
.. include:: ../../../CHANGELOG.rst
|
||||
2
lib_gpio/lib_gpio/doc/rst/xdoc.conf
Normal file
2
lib_gpio/lib_gpio/doc/rst/xdoc.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
XMOSNEWSTYLE = 1
|
||||
DOXYGEN_DIRS=../../api
|
||||
6
lib_gpio/lib_gpio/lib_build_info.cmake
Normal file
6
lib_gpio/lib_gpio/lib_build_info.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
set(LIB_NAME lib_gpio)
|
||||
set(LIB_VERSION 2.2.0)
|
||||
set(LIB_INCLUDES api)
|
||||
set(LIB_COMPILER_FLAGS -Os)
|
||||
|
||||
XMOS_REGISTER_MODULE()
|
||||
14
lib_gpio/lib_gpio/module_build_info
Normal file
14
lib_gpio/lib_gpio/module_build_info
Normal file
@@ -0,0 +1,14 @@
|
||||
VERSION = 2.2.0
|
||||
|
||||
DEPENDENT_MODULES = lib_xassert(>=4.0.0)
|
||||
|
||||
MODULE_XCC_FLAGS = $(XCC_FLAGS) \
|
||||
-O3
|
||||
|
||||
OPTIONAL_HEADERS +=
|
||||
|
||||
EXPORT_INCLUDE_DIRS = api
|
||||
|
||||
INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS)
|
||||
|
||||
SOURCE_DIRS = src
|
||||
163
lib_gpio/lib_gpio/src/gpio.xc
Normal file
163
lib_gpio/lib_gpio/src/gpio.xc
Normal file
@@ -0,0 +1,163 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <xs1.h>
|
||||
#include <gpio.h>
|
||||
#include <xassert.h>
|
||||
#include <print.h>
|
||||
|
||||
[[distributable]]
|
||||
void input_gpio(server input_gpio_if i[n], static const size_t n,
|
||||
in port p, char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[n];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].input() -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result @ ts;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].event_when_pins_eq(unsigned value):
|
||||
fail("input_gpio task does not support events.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma unsafe arrays
|
||||
[[combinable]]
|
||||
void input_gpio_with_events(server input_gpio_if i[n],
|
||||
static const size_t n,
|
||||
in port p,
|
||||
char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[32];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
unsigned pval = 0;
|
||||
char test_vals[32];
|
||||
unsigned waiting = 0;
|
||||
for (size_t j = 0; j < n; j++)
|
||||
test_vals[j] = -1;
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].input() -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result @ ts;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].event_when_pins_eq(unsigned value):
|
||||
unsigned val;
|
||||
p :> val;
|
||||
unsigned pos = pmap[j];
|
||||
unsigned bit = (val >> pos) & 1;
|
||||
if (bit == value)
|
||||
i[j].event();
|
||||
else {
|
||||
if (test_vals[j] != -1)
|
||||
waiting++;
|
||||
test_vals[j] = value;
|
||||
}
|
||||
break;
|
||||
case waiting => p when pinsneq(pval) :> pval:
|
||||
for (size_t j = 0; j < n; j++) {
|
||||
unsigned pos = pmap[j];
|
||||
unsigned bit = (pval >> pos) & 1;
|
||||
if (bit == test_vals[j]) {
|
||||
test_vals[j] = -1;
|
||||
waiting--;
|
||||
i[j].event();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[[combinable]]
|
||||
void input_gpio_1bit_with_events(server input_gpio_if i, in port p)
|
||||
{
|
||||
unsigned test_val = -1;
|
||||
while (1) {
|
||||
select {
|
||||
case i.input() -> unsigned result:
|
||||
p :> result;
|
||||
break;
|
||||
case i.input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
p :> result @ ts;
|
||||
break;
|
||||
case i.event_when_pins_eq(unsigned value):
|
||||
test_val = value;
|
||||
break;
|
||||
case (test_val != -1) => p when pinseq(test_val) :> int:
|
||||
i.event();
|
||||
test_val = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[[distributable]]
|
||||
void output_gpio(server output_gpio_if i[n], static const size_t n, out port p,
|
||||
char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[n];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
unsigned current_val = 0;
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].output(unsigned data):
|
||||
unsigned pos = pmap[j];
|
||||
current_val &= ~(1 << pos);
|
||||
current_val |= ((data & 1) << pos);
|
||||
p <: current_val;
|
||||
break;
|
||||
|
||||
case i[int j].output_and_timestamp(unsigned data) -> gpio_time_t ts:
|
||||
unsigned pos = pmap[j];
|
||||
current_val &= ~(1 << pos);
|
||||
current_val |= ((data & 1) << pos);
|
||||
p <: current_val @ ts;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
lib_gpio/python/setup.py
Normal file
20
lib_gpio/python/setup.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2020-2024 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import setuptools
|
||||
|
||||
# Another repository might depend on python code defined in this one. The
|
||||
# procedure to set up a suitable python environment for that repository may
|
||||
# pip-install this one as editable using this setup.py file. To minimise the
|
||||
# chance of version conflicts while ensuring a minimal degree of conformity,
|
||||
# the 3rd-party modules listed here require the same major version and at
|
||||
# least the same minor version as specified in the requirements.txt file.
|
||||
# The same modules should appear in the requirements.txt file as given below.
|
||||
setuptools.setup(
|
||||
name='lib_gpio',
|
||||
packages=setuptools.find_packages(),
|
||||
install_requires=[
|
||||
'flake8~=7.0',
|
||||
],
|
||||
dependency_links=[
|
||||
],
|
||||
)
|
||||
34
lib_gpio/requirements.txt
Normal file
34
lib_gpio/requirements.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
# python_version 3.12
|
||||
#
|
||||
# The parse_version_from_requirements() function in the installPipfile.groovy
|
||||
# file of the Jenkins Shared Library uses the python_version comment to set
|
||||
# the version of python used.
|
||||
|
||||
# Distributed (released) dependencies
|
||||
#
|
||||
# The python modules listed below specify a known working combination required
|
||||
# by the python code in this repository. The procedure used to set up a
|
||||
# suitable python environment for it installs the version of each module in
|
||||
# the list. Using a specific version ensures a controlled infrastructure for
|
||||
# development, testing and release of this repository.
|
||||
#
|
||||
# Another repository might depend on python code defined in this one. The
|
||||
# procedure to set up a suitable python environment for that repository may
|
||||
# pip-install this one as editable using this repository's setup.py file. The
|
||||
# same modules should appear in the setup.py list as given below.
|
||||
|
||||
flake8==7.0.0
|
||||
|
||||
# Development dependencies
|
||||
#
|
||||
# Each link listed below specifies the path to a setup.py file which are
|
||||
# installed in editable mode with '-e $PATH' (without the quotes).
|
||||
#
|
||||
# If python code in this repository depends on python code under development
|
||||
# in another repository, then an entry for that other respository should
|
||||
# appear in this list instead of the released dependencies list.
|
||||
#
|
||||
# If this repository uses the setup functionality (e.g., script entry points)
|
||||
# of its own setup.py file, then this list must include an entry for that
|
||||
# setup.py file, e.g., '-e .' or '-e ./python' (without the quotes).
|
||||
-e ./python
|
||||
74
lib_gpio/tests/gpio_basic_checker.py
Normal file
74
lib_gpio/tests/gpio_basic_checker.py
Normal file
@@ -0,0 +1,74 @@
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
class GPIOBasicChecker(xmostest.SimThread):
|
||||
"""
|
||||
This simulator thread will read and write to pins.
|
||||
"""
|
||||
|
||||
def __init__(self, mode, test_port, expected_test_port_data, num_clients,
|
||||
trigger_port = None):
|
||||
self._mode = mode
|
||||
if self._mode != 'input' and self._mode != 'output':
|
||||
print("ERROR: Checker initialised in unsupported mode %s" %
|
||||
(self._mode))
|
||||
self._test_port = test_port
|
||||
self._expected_test_port_data = expected_test_port_data
|
||||
self._num_clients = num_clients
|
||||
self._trigger_port = trigger_port
|
||||
|
||||
print("Checking %s on port %s with %d clients" % (self._mode,
|
||||
self._test_port, self._num_clients))
|
||||
if self._trigger_port != None:
|
||||
print("Using port %s as trigger" % (self._trigger_port))
|
||||
|
||||
def drive_port(self, xsi):
|
||||
# Check the xCORE is not trying to drive the port
|
||||
if xsi.is_port_driving(self._test_port):
|
||||
print("ERROR: xCORE driving port %s which expected to be input only"
|
||||
% (self._test_port))
|
||||
# Drive the port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
|
||||
def read_port(self, xsi):
|
||||
pin_values = []
|
||||
for client in range(0, self._num_clients):
|
||||
pin_values.append(-1)
|
||||
|
||||
correct_pin_count = 0
|
||||
while (correct_pin_count < self._num_clients):
|
||||
# Wait for the xCORE to drive the port
|
||||
self.wait_for_port_pins_change([self._test_port])
|
||||
port_data = xsi.sample_port_pins(self._test_port)
|
||||
for client in range(0, self._num_clients):
|
||||
# Check for the updated pin
|
||||
pin_data = ((port_data >> client) & 1)
|
||||
if pin_values[client] == -1:
|
||||
# Not yet seen the correct pin data yet
|
||||
if pin_data == ((self._expected_test_port_data >>
|
||||
client) & 1):
|
||||
pin_values[client] = pin_data
|
||||
correct_pin_count +=1
|
||||
print("Checker has seen correct value on pin %d " %
|
||||
(client))
|
||||
else: # Check valid pin data has not been overwritten
|
||||
if pin_values[client] != ((self._expected_test_port_data >>
|
||||
client) & 1):
|
||||
print("ERROR: Data on pin %d changed unexpected" %
|
||||
(client))
|
||||
print("Checker has seen all pins change")
|
||||
|
||||
# Drive trigger port to allow xCORE program to terminate
|
||||
xsi.drive_port_pins(self._trigger_port, 1)
|
||||
print("Checker driving termination trigger")
|
||||
|
||||
def run(self):
|
||||
if self._mode == 'input':
|
||||
# xCORE testing 'input' functionality means checker must drive port
|
||||
self.drive_port(self.xsi)
|
||||
elif self._mode == 'output':
|
||||
# xCORE testing 'output' functionality means checker must read port
|
||||
self.read_port(self.xsi)
|
||||
print("Checker complete")
|
||||
49
lib_gpio/tests/gpio_events_checker.py
Normal file
49
lib_gpio/tests/gpio_events_checker.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
class GPIOEventsChecker(xmostest.SimThread):
|
||||
"""
|
||||
This simulator thread will write to pins to allow xCORE to event.
|
||||
"""
|
||||
|
||||
def __init__(self, test_port, expected_test_port_data, num_clients,
|
||||
trigger_port):
|
||||
self._test_port = test_port
|
||||
self._expected_test_port_data = expected_test_port_data
|
||||
self._num_clients = num_clients
|
||||
self._trigger_port = trigger_port
|
||||
|
||||
print("Checking events on port %s with %d clients" % (self._test_port,
|
||||
self._num_clients))
|
||||
print("Using port %s as trigger" % (self._trigger_port))
|
||||
|
||||
def drive_port(self, xsi):
|
||||
# Check the xCORE is not trying to drive the port
|
||||
if xsi.is_port_driving(self._test_port):
|
||||
print("ERROR: xCORE driving port %s which expected to be input only"
|
||||
% (self._test_port))
|
||||
# Drive the test port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
# Flip bits of expected data for second part of test
|
||||
self._expected_test_port_data = ~self._expected_test_port_data
|
||||
# Delay driving new data to test port until num_client bits of
|
||||
# trigger_port go high
|
||||
expected_trigger_data = 0
|
||||
for i in range(0, self._num_clients):
|
||||
expected_trigger_data = (expected_trigger_data << 1) + 1
|
||||
print("Checker expecting 0x%x as trigger data" % (expected_trigger_data))
|
||||
while True:
|
||||
self.wait_for_port_pins_change([self._trigger_port])
|
||||
trigger_data = xsi.sample_port_pins(self._trigger_port)
|
||||
if trigger_data == expected_trigger_data:
|
||||
print("Checker received correct trigger")
|
||||
break
|
||||
# Drive the test port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
|
||||
def run(self):
|
||||
self.drive_port(self.xsi)
|
||||
print("Checker complete")
|
||||
36
lib_gpio/tests/gpio_input_1bit_test/Makefile
Normal file
36
lib_gpio/tests/gpio_input_1bit_test/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=0
|
||||
XCC_FLAGS_input_timestamps = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
105
lib_gpio/tests/gpio_input_1bit_test/src/main.xc
Normal file
105
lib_gpio/tests/gpio_input_1bit_test/src/main.xc
Normal file
@@ -0,0 +1,105 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_TEST_EVENTS (2)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100)
|
||||
|
||||
port input_port = XS1_PORT_1A;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void read_port_on_event(client input_gpio_if input_port) {
|
||||
unsigned int completed_events = 0;
|
||||
unsigned int expected_value = 1;
|
||||
|
||||
/* Setup event that should trigger immediately */
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE setup pins eq event\n");
|
||||
|
||||
while (1) {
|
||||
select {
|
||||
case input_port.event():
|
||||
debug_printf("xCORE got input port event\n");
|
||||
completed_events++;
|
||||
// Read value on pin to make sure it's correct
|
||||
unsigned int pin_data = input_port.input();
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read does not match expected data 0x%x\n",
|
||||
pin_data, expected_value);
|
||||
}
|
||||
|
||||
if (completed_events < NUM_TEST_EVENTS) {
|
||||
/* Setup event that should trigger later */
|
||||
// Flip expected_value each iteration of test
|
||||
expected_value = !expected_value;
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE setup pins eq event\n");
|
||||
// Trigger simulator to output new expected_value
|
||||
debug_printf("xCORE driving trigger port\n");
|
||||
trigger_port <: 1;
|
||||
} else {
|
||||
_exit(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void read_port(client input_gpio_if input_port) {
|
||||
unsigned int pin_data;
|
||||
unsigned int expected_value = 1;
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
pin_data = input_port.input_and_timestamp(ts1);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
input_port.input_and_timestamp(ts2);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) read appears to be earlier than first (%d)\n",
|
||||
ts2, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read smaller than expected\n",
|
||||
ts1, ts2);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read larger than expected\n",
|
||||
ts1, ts2);
|
||||
}
|
||||
} else {
|
||||
pin_data = input_port.input();
|
||||
}
|
||||
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read does not match expected data 0x%x\n",
|
||||
pin_data, expected_value);
|
||||
} else {
|
||||
debug_printf("xCORE input data correctly\n");
|
||||
}
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port;
|
||||
par {
|
||||
input_gpio_1bit_with_events(i_input_port, input_port);
|
||||
#if EVENTS
|
||||
read_port_on_event(i_input_port);
|
||||
#else
|
||||
read_port(i_input_port);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
14
lib_gpio/tests/gpio_input_1bit_test/wscript
Normal file
14
lib_gpio/tests/gpio_input_1bit_test/wscript
Normal file
@@ -0,0 +1,14 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
40
lib_gpio/tests/gpio_input_basic_test/Makefile
Normal file
40
lib_gpio/tests/gpio_input_basic_test/Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_timestamps = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_events_timestamps = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_supply_pin_map = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=1 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_crosstile = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=1
|
||||
XCC_FLAGS_input_events_timestamps_supply_pin_map_crosstile = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=1 -DCROSSTILE=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
85
lib_gpio/tests/gpio_input_basic_test/src/main.xc
Normal file
85
lib_gpio/tests/gpio_input_basic_test/src/main.xc
Normal file
@@ -0,0 +1,85 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include <platform.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#ifndef CROSSTILE
|
||||
#define CROSSTILE 0
|
||||
#endif
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100 + CROSSTILE?100:0)
|
||||
|
||||
on tile[0] : port input_port = XS1_PORT_4D;
|
||||
|
||||
void read_port(client input_gpio_if input_port, unsigned int client_num) {
|
||||
unsigned int pin_data;
|
||||
unsigned int expected_value = (client_num & 1);
|
||||
if (SUPPLY_PIN_MAP) {
|
||||
expected_value = !expected_value;
|
||||
}
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
pin_data = input_port.input_and_timestamp(ts1);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
input_port.input_and_timestamp(ts2);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) read by client %d appears to be earlier than first (%d)\n",
|
||||
ts2, client_num, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read by client %d smaller than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read by client %d larger than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
} else {
|
||||
pin_data = input_port.input();
|
||||
}
|
||||
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read by client %d does not match expected data 0x%x\n",
|
||||
pin_data, client_num, expected_value);
|
||||
} else {
|
||||
debug_printf("xCORE client %d input data correctly\n", client_num);
|
||||
}
|
||||
|
||||
// Allow other cores to complete
|
||||
delay_microseconds(5);
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
#if SUPPLY_PIN_MAP
|
||||
static char pin_map[NUM_CLIENTS] = {1, 0, 3, 2};
|
||||
#else
|
||||
#define pin_map null
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port[NUM_CLIENTS];
|
||||
par {
|
||||
#if EVENTS
|
||||
on tile[0] : input_gpio_with_events(i_input_port, NUM_CLIENTS, input_port, pin_map);
|
||||
#else
|
||||
on tile[0] : input_gpio(i_input_port, NUM_CLIENTS, input_port, pin_map);
|
||||
#endif
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
on tile[CROSSTILE?i%2:0] : read_port(i_input_port[i], i);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
14
lib_gpio/tests/gpio_input_basic_test/wscript
Normal file
14
lib_gpio/tests/gpio_input_basic_test/wscript
Normal file
@@ -0,0 +1,14 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
35
lib_gpio/tests/gpio_input_events_test/Makefile
Normal file
35
lib_gpio/tests/gpio_input_events_test/Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report -DXASSERT_ENABLE_ASSERTIONS=1 -DXASSERT_ENABLE_DEBUG=1
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
70
lib_gpio/tests/gpio_input_events_test/src/main.xc
Normal file
70
lib_gpio/tests/gpio_input_events_test/src/main.xc
Normal file
@@ -0,0 +1,70 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define NUM_TEST_EVENTS (2)
|
||||
|
||||
port input_port = XS1_PORT_4D;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void read_port_on_event(client input_gpio_if input_port, unsigned int client_num,
|
||||
client output_gpio_if trigger_port) {
|
||||
unsigned int completed_events = 0;
|
||||
unsigned int expected_value = (client_num & 1);
|
||||
|
||||
/* Setup event that should trigger immediately */
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE client %d setup pins eq event\n", client_num);
|
||||
|
||||
while (1) {
|
||||
select {
|
||||
case input_port.event():
|
||||
debug_printf("xCORE client %d got input port event\n", client_num);
|
||||
completed_events++;
|
||||
// Read value on pin to make sure it's correct
|
||||
unsigned int pin_data = input_port.input();
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read by client %d does not match expected data 0x%x\n",
|
||||
pin_data, client_num, expected_value);
|
||||
}
|
||||
|
||||
if (completed_events < NUM_TEST_EVENTS) {
|
||||
/* Setup event that should trigger later */
|
||||
// Flip expected_value each iteration of test
|
||||
expected_value = !expected_value;
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE client %d setup pins eq event\n", client_num);
|
||||
// Trigger simulator to output new expected_value
|
||||
debug_printf("xCORE client %d driving trigger port\n", client_num);
|
||||
trigger_port.output(1);
|
||||
} else {
|
||||
// Allow other cores to complete
|
||||
delay_microseconds(5);
|
||||
_exit(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port[NUM_CLIENTS];
|
||||
interface output_gpio_if i_trigger_port[NUM_CLIENTS];
|
||||
par {
|
||||
#if EVENTS
|
||||
input_gpio_with_events(i_input_port, NUM_CLIENTS, input_port, null);
|
||||
#else
|
||||
input_gpio(i_input_port, NUM_CLIENTS, input_port, null);
|
||||
#endif
|
||||
output_gpio(i_trigger_port, NUM_CLIENTS, trigger_port, null);
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
read_port_on_event(i_input_port[i], i, i_trigger_port[i]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
14
lib_gpio/tests/gpio_input_events_test/wscript
Normal file
14
lib_gpio/tests/gpio_input_events_test/wscript
Normal file
@@ -0,0 +1,14 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
36
lib_gpio/tests/gpio_output_test/Makefile
Normal file
36
lib_gpio/tests/gpio_output_test/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_output_basic = $(COMMON_FLAGS) -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0
|
||||
XCC_FLAGS_output_timestamps = $(COMMON_FLAGS) -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0
|
||||
XCC_FLAGS_output_supply_pin_map = $(COMMON_FLAGS) -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
75
lib_gpio/tests/gpio_output_test/src/main.xc
Normal file
75
lib_gpio/tests/gpio_output_test/src/main.xc
Normal file
@@ -0,0 +1,75 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100)
|
||||
|
||||
port output_port = XS1_PORT_4D;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void wait_for_termination_signal() {
|
||||
debug_printf("xCORE waiting for termination signal\n");
|
||||
select {
|
||||
case trigger_port when pinsneq(0) :> int _:
|
||||
_exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void drive_port(client output_gpio_if output_port, unsigned int client_num) {
|
||||
unsigned int expected_pin_data = (client_num & 1);
|
||||
if (SUPPLY_PIN_MAP) {
|
||||
expected_pin_data = !expected_pin_data;
|
||||
}
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
debug_printf("xCORE client %d driving port\n", client_num);
|
||||
ts1 = output_port.output_and_timestamp(expected_pin_data);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
ts2 = output_port.output_and_timestamp(expected_pin_data);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) received by client %d appears to be earlier than first (%d)\n",
|
||||
ts2, client_num, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) received by client %d smaller than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) received by client %d larger than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
} else {
|
||||
debug_printf("xCORE client %d driving port\n", client_num);
|
||||
output_port.output(expected_pin_data);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface output_gpio_if i_output_port[NUM_CLIENTS];
|
||||
#if SUPPLY_PIN_MAP
|
||||
char pin_map[NUM_CLIENTS] = {1, 0, 3, 2};
|
||||
#else
|
||||
#define pin_map null
|
||||
#endif
|
||||
par {
|
||||
output_gpio(i_output_port, NUM_CLIENTS, output_port, pin_map);
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
drive_port(i_output_port[i], i);
|
||||
}
|
||||
wait_for_termination_signal();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
14
lib_gpio/tests/gpio_output_test/wscript
Normal file
14
lib_gpio/tests/gpio_output_test/wscript
Normal file
@@ -0,0 +1,14 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
3
lib_gpio/tests/input_1bit_basic_test.expected
Normal file
3
lib_gpio/tests/input_1bit_basic_test.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE input data correctly
|
||||
10
lib_gpio/tests/input_1bit_events_test.expected
Normal file
10
lib_gpio/tests/input_1bit_events_test.expected
Normal file
@@ -0,0 +1,10 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x1 as trigger data
|
||||
xCORE setup pins eq event
|
||||
xCORE got input port event
|
||||
xCORE setup pins eq event
|
||||
xCORE driving trigger port
|
||||
Checker received correct trigger
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE got input port event
|
||||
6
lib_gpio/tests/input_basic_test.expected
Normal file
6
lib_gpio/tests/input_basic_test.expected
Normal file
@@ -0,0 +1,6 @@
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
3
lib_gpio/tests/input_events_test_basic.expected
Normal file
3
lib_gpio/tests/input_events_test_basic.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x\w as trigger data
|
||||
input_gpio task does not support events.
|
||||
25
lib_gpio/tests/input_events_test_events.expected
Normal file
25
lib_gpio/tests/input_events_test_events.expected
Normal file
@@ -0,0 +1,25 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x\w as trigger data
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
Checker received correct trigger
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
12
lib_gpio/tests/output_supply_pin_map_test.expected
Normal file
12
lib_gpio/tests/output_supply_pin_map_test.expected
Normal file
@@ -0,0 +1,12 @@
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE waiting for termination signal
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen all pins change
|
||||
Checker driving termination trigger
|
||||
Checker complete
|
||||
12
lib_gpio/tests/output_test.expected
Normal file
12
lib_gpio/tests/output_test.expected
Normal file
@@ -0,0 +1,12 @@
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE waiting for termination signal
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen all pins change
|
||||
Checker driving termination trigger
|
||||
Checker complete
|
||||
31
lib_gpio/tests/runtests.py
Normal file
31
lib_gpio/tests/runtests.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
if __name__ == "__main__":
|
||||
xmostest.init()
|
||||
|
||||
xmostest.register_group("lib_gpio",
|
||||
"gpio_sim_tests",
|
||||
"GPIO simulator tests",
|
||||
"""
|
||||
Tests are performed by running the GPIO library connected to a simulator model
|
||||
(written as a python plugin to xsim). The simulator model checks that the pins
|
||||
are driven and read by the ports as expected. Tests are run to test the
|
||||
following features:
|
||||
|
||||
* Inputting on a multibit port with multiple clients using the default pin map
|
||||
* Inputting on a multibit port with multiple clients using a specified pin map
|
||||
* Inputting on a 1bit port
|
||||
* Inputting with timestamps
|
||||
* Eventing on a multibit input port
|
||||
* Eventing on a 1bit input port
|
||||
* Outputting on a multibit port with multiple clients using the default pin map
|
||||
* Outputting on a multibit port with multiple clients using a specified pin map
|
||||
* Outputting with timestamps
|
||||
""")
|
||||
|
||||
xmostest.runtests()
|
||||
|
||||
xmostest.finish()
|
||||
36
lib_gpio/tests/test_input_1bit_basic.py
Normal file
36
lib_gpio/tests/test_input_1bit_basic.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_input_1bit_basic_test(timestamps):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not timestamps:
|
||||
path += '_basic'
|
||||
else:
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
|
||||
binary = 'gpio_input_1bit_test/bin/input' + path + \
|
||||
'/gpio_input_1bit_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="input",
|
||||
test_port="tile[0]:XS1_PORT_1A",
|
||||
expected_test_port_data=0b1,
|
||||
num_clients=1)
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_1bit_basic_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_1bit_basic_test',
|
||||
{'timestamps':timestamps,},
|
||||
regexp=False)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_1bit_basic_test(timestamps=False)
|
||||
do_input_1bit_basic_test(timestamps=True)
|
||||
26
lib_gpio/tests/test_input_1bit_events.py
Normal file
26
lib_gpio/tests/test_input_1bit_events.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_events_checker import GPIOEventsChecker
|
||||
|
||||
def do_input_1bit_events_test():
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
binary = 'gpio_input_1bit_test/bin/input_events/gpio_input_1bit_test_input_events.xe'
|
||||
|
||||
checker = GPIOEventsChecker(test_port="tile[0]:XS1_PORT_1A",
|
||||
expected_test_port_data=0b1,
|
||||
num_clients=1,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_1bit_events_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_1bit_events_test',
|
||||
regexp=False)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_1bit_events_test()
|
||||
50
lib_gpio/tests/test_input_basic.py
Normal file
50
lib_gpio/tests/test_input_basic.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_input_basic_test(events, timestamps, supply_pin_map, crosstile):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not events and not timestamps and not supply_pin_map and not crosstile:
|
||||
path += '_basic'
|
||||
else:
|
||||
if events:
|
||||
path += '_events'
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
if supply_pin_map:
|
||||
path += '_supply_pin_map'
|
||||
if crosstile:
|
||||
path += '_crosstile'
|
||||
|
||||
binary = 'gpio_input_basic_test/bin/input' + path + \
|
||||
'/gpio_input_basic_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="input",
|
||||
test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4)
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_basic_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_basic_test',
|
||||
{'events':events,
|
||||
'timestamps':timestamps,
|
||||
'supply_pin_map':supply_pin_map,
|
||||
'crosstile':crosstile},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=True, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=True, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=True, timestamps=False, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=True, timestamps=True, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=False, crosstile=True)
|
||||
do_input_basic_test(events=True, timestamps=True, supply_pin_map=True, crosstile=True)
|
||||
36
lib_gpio/tests/test_input_events.py
Normal file
36
lib_gpio/tests/test_input_events.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_events_checker import GPIOEventsChecker
|
||||
|
||||
def do_input_events_test(events):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not events:
|
||||
path += '_basic'
|
||||
else:
|
||||
if events:
|
||||
path += '_events'
|
||||
|
||||
binary = 'gpio_input_events_test/bin/input' + path + \
|
||||
'/gpio_input_events_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOEventsChecker(test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_events_test%s.expected' % path),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_events_test',
|
||||
{'events':events},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_events_test(events=False)
|
||||
do_input_events_test(events=True)
|
||||
45
lib_gpio/tests/test_output.py
Normal file
45
lib_gpio/tests/test_output.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_output_test(timestamps, supply_pin_map):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not timestamps and not supply_pin_map:
|
||||
path += '_basic'
|
||||
else:
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
if supply_pin_map:
|
||||
path += '_supply_pin_map'
|
||||
|
||||
binary = 'gpio_output_test/bin/output' + path + \
|
||||
'/gpio_output_test_output' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="output",
|
||||
test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
if supply_pin_map:
|
||||
expected_result = 'output_supply_pin_map_test.expected'
|
||||
else:
|
||||
expected_result = 'output_test.expected'
|
||||
tester = xmostest.ComparisonTester(open(expected_result),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'output_test',
|
||||
{'timestamps':timestamps,
|
||||
'supply_pin_map':supply_pin_map},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_output_test(timestamps=False, supply_pin_map=False)
|
||||
do_output_test(timestamps=False, supply_pin_map=True)
|
||||
do_output_test(timestamps=True, supply_pin_map=False)
|
||||
Reference in New Issue
Block a user