BBR 1 Ebene

Committer:
borlanic
Date:
Mon May 14 11:29:06 2018 +0000
Revision:
0:fbdae7e6d805
BBR

Who changed what in which revision?

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