Maxim mbed development library

Dependents:   sensomed

Committer:
switches
Date:
Tue Nov 08 18:27:11 2016 +0000
Revision:
0:0e018d759a2a
Initial commit

Who changed what in which revision?

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