Clone of official tools

Committer:
theotherjimmy
Date:
Tue Oct 10 16:56:30 2017 -0500
Revision:
40:7d3fa6b99b2b
Parent:
35:da9c89f8be7d
Child:
43:2a7da56ebd24
Update to tools release 5.6.1

Who changed what in which revision?

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