Includes library modifications to allow access to AIN_4 (AIN_0 / 5)

Committer:
bryantaylor
Date:
Tue Sep 20 21:26:12 2016 +0000
Revision:
0:eafc3fd41f75
hackathon

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bryantaylor 0:eafc3fd41f75 1 """
bryantaylor 0:eafc3fd41f75 2 mbed SDK
bryantaylor 0:eafc3fd41f75 3 Copyright (c) 2016 ARM Limited
bryantaylor 0:eafc3fd41f75 4
bryantaylor 0:eafc3fd41f75 5 Licensed under the Apache License, Version 2.0 (the "License");
bryantaylor 0:eafc3fd41f75 6 you may not use this file except in compliance with the License.
bryantaylor 0:eafc3fd41f75 7 You may obtain a copy of the License at
bryantaylor 0:eafc3fd41f75 8
bryantaylor 0:eafc3fd41f75 9 http://www.apache.org/licenses/LICENSE-2.0
bryantaylor 0:eafc3fd41f75 10
bryantaylor 0:eafc3fd41f75 11 Unless required by applicable law or agreed to in writing, software
bryantaylor 0:eafc3fd41f75 12 distributed under the License is distributed on an "AS IS" BASIS,
bryantaylor 0:eafc3fd41f75 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bryantaylor 0:eafc3fd41f75 14 See the License for the specific language governing permissions and
bryantaylor 0:eafc3fd41f75 15 limitations under the License.
bryantaylor 0:eafc3fd41f75 16 """
bryantaylor 0:eafc3fd41f75 17
bryantaylor 0:eafc3fd41f75 18 from os import getenv
bryantaylor 0:eafc3fd41f75 19 from os.path import join, abspath, dirname, exists
bryantaylor 0:eafc3fd41f75 20 import logging
bryantaylor 0:eafc3fd41f75 21
bryantaylor 0:eafc3fd41f75 22 ROOT = abspath(join(dirname(__file__), ".."))
bryantaylor 0:eafc3fd41f75 23
bryantaylor 0:eafc3fd41f75 24
bryantaylor 0:eafc3fd41f75 25 ##############################################################################
bryantaylor 0:eafc3fd41f75 26 # Toolchains and Build System Settings
bryantaylor 0:eafc3fd41f75 27 ##############################################################################
bryantaylor 0:eafc3fd41f75 28 BUILD_DIR = abspath(join(ROOT, ".build"))
bryantaylor 0:eafc3fd41f75 29
bryantaylor 0:eafc3fd41f75 30 # ARM Compiler 5
bryantaylor 0:eafc3fd41f75 31 ARM_PATH = "C:/Keil_v5/ARM/ARMCC"
bryantaylor 0:eafc3fd41f75 32
bryantaylor 0:eafc3fd41f75 33 # GCC ARM
bryantaylor 0:eafc3fd41f75 34 GCC_ARM_PATH = ""
bryantaylor 0:eafc3fd41f75 35
bryantaylor 0:eafc3fd41f75 36 # GCC CodeRed
bryantaylor 0:eafc3fd41f75 37 GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
bryantaylor 0:eafc3fd41f75 38
bryantaylor 0:eafc3fd41f75 39 # IAR
bryantaylor 0:eafc3fd41f75 40 IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.3/arm"
bryantaylor 0:eafc3fd41f75 41
bryantaylor 0:eafc3fd41f75 42 # Goanna static analyser. Please overload it in mbed_settings.py
bryantaylor 0:eafc3fd41f75 43 GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
bryantaylor 0:eafc3fd41f75 44
bryantaylor 0:eafc3fd41f75 45 # cppcheck path (command) and output message format
bryantaylor 0:eafc3fd41f75 46 CPPCHECK_CMD = ["cppcheck", "--enable=all"]
bryantaylor 0:eafc3fd41f75 47 CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
bryantaylor 0:eafc3fd41f75 48
bryantaylor 0:eafc3fd41f75 49 BUILD_OPTIONS = []
bryantaylor 0:eafc3fd41f75 50
bryantaylor 0:eafc3fd41f75 51 # mbed.org username
bryantaylor 0:eafc3fd41f75 52 MBED_ORG_USER = ""
bryantaylor 0:eafc3fd41f75 53
bryantaylor 0:eafc3fd41f75 54 CLI_COLOR_MAP = {
bryantaylor 0:eafc3fd41f75 55 "warning": "yellow",
bryantaylor 0:eafc3fd41f75 56 "error" : "red"
bryantaylor 0:eafc3fd41f75 57 }
bryantaylor 0:eafc3fd41f75 58
bryantaylor 0:eafc3fd41f75 59 ##############################################################################
bryantaylor 0:eafc3fd41f75 60 # User Settings (file)
bryantaylor 0:eafc3fd41f75 61 ##############################################################################
bryantaylor 0:eafc3fd41f75 62 try:
bryantaylor 0:eafc3fd41f75 63 # Allow to overwrite the default settings without the need to edit the
bryantaylor 0:eafc3fd41f75 64 # settings file stored in the repository
bryantaylor 0:eafc3fd41f75 65 from mbed_settings import *
bryantaylor 0:eafc3fd41f75 66 except ImportError:
bryantaylor 0:eafc3fd41f75 67 pass
bryantaylor 0:eafc3fd41f75 68
bryantaylor 0:eafc3fd41f75 69
bryantaylor 0:eafc3fd41f75 70 ##############################################################################
bryantaylor 0:eafc3fd41f75 71 # User Settings (env vars)
bryantaylor 0:eafc3fd41f75 72 ##############################################################################
bryantaylor 0:eafc3fd41f75 73 _ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'GCC_CR_PATH', 'IAR_PATH']
bryantaylor 0:eafc3fd41f75 74
bryantaylor 0:eafc3fd41f75 75 for _n in _ENV_PATHS:
bryantaylor 0:eafc3fd41f75 76 if getenv('MBED_'+_n):
bryantaylor 0:eafc3fd41f75 77 if exists(getenv('MBED_'+_n)):
bryantaylor 0:eafc3fd41f75 78 globals()[_n] = getenv('MBED_'+_n)
bryantaylor 0:eafc3fd41f75 79 else:
bryantaylor 0:eafc3fd41f75 80 print "WARNING: MBED_%s set as environment variable but doesn't exist" % _n
bryantaylor 0:eafc3fd41f75 81
bryantaylor 0:eafc3fd41f75 82
bryantaylor 0:eafc3fd41f75 83 ##############################################################################
bryantaylor 0:eafc3fd41f75 84 # Test System Settings
bryantaylor 0:eafc3fd41f75 85 ##############################################################################
bryantaylor 0:eafc3fd41f75 86 SERVER_PORT = 59432
bryantaylor 0:eafc3fd41f75 87 SERVER_ADDRESS = "10.2.200.94"
bryantaylor 0:eafc3fd41f75 88 LOCALHOST = "10.2.200.94"
bryantaylor 0:eafc3fd41f75 89
bryantaylor 0:eafc3fd41f75 90 MUTs = {
bryantaylor 0:eafc3fd41f75 91 "1" : {"mcu": "LPC1768",
bryantaylor 0:eafc3fd41f75 92 "port":"COM41", "disk":'E:\\',
bryantaylor 0:eafc3fd41f75 93 "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
bryantaylor 0:eafc3fd41f75 94 },
bryantaylor 0:eafc3fd41f75 95 "2": {"mcu": "LPC11U24",
bryantaylor 0:eafc3fd41f75 96 "port":"COM42", "disk":'F:\\',
bryantaylor 0:eafc3fd41f75 97 "peripherals": ["TMP102", "digital_loop", "port_loop", "SD"]
bryantaylor 0:eafc3fd41f75 98 },
bryantaylor 0:eafc3fd41f75 99 "3" : {"mcu": "KL25Z",
bryantaylor 0:eafc3fd41f75 100 "port":"COM43", "disk":'G:\\',
bryantaylor 0:eafc3fd41f75 101 "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
bryantaylor 0:eafc3fd41f75 102 },
bryantaylor 0:eafc3fd41f75 103 }