mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

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