Clone of official tools

Committer:
screamer
Date:
Thu Jul 14 20:21:19 2016 +0100
Revision:
13:ab47a20b66f0
Parent:
3:02a8b145dcb7
Child:
20:835f6355470d
Apply latest tools

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 ##############################################################################
screamer 3:02a8b145dcb7 28 BUILD_DIR = abspath(join(ROOT, ".build"))
screamer 0:66f3b5499f7f 29
screamer 13:ab47a20b66f0 30 # ARM Compiler 5
screamer 13:ab47a20b66f0 31 ARM_PATH = "C:/Keil_v5/ARM/ARMCC"
screamer 0:66f3b5499f7f 32
screamer 0:66f3b5499f7f 33 # GCC ARM
screamer 0:66f3b5499f7f 34 GCC_ARM_PATH = ""
screamer 0:66f3b5499f7f 35
screamer 0:66f3b5499f7f 36 # GCC CodeRed
screamer 0:66f3b5499f7f 37 GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
screamer 0:66f3b5499f7f 38
screamer 0:66f3b5499f7f 39 # IAR
screamer 13:ab47a20b66f0 40 IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.3/arm"
screamer 0:66f3b5499f7f 41
screamer 13:ab47a20b66f0 42 # Goanna static analyser. Please overload it in mbed_settings.py
screamer 0:66f3b5499f7f 43 GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
screamer 0:66f3b5499f7f 44
screamer 0:66f3b5499f7f 45 # cppcheck path (command) and output message format
screamer 0:66f3b5499f7f 46 CPPCHECK_CMD = ["cppcheck", "--enable=all"]
screamer 0:66f3b5499f7f 47 CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
screamer 0:66f3b5499f7f 48
screamer 0:66f3b5499f7f 49 BUILD_OPTIONS = []
screamer 0:66f3b5499f7f 50
screamer 0:66f3b5499f7f 51 # mbed.org username
screamer 0:66f3b5499f7f 52 MBED_ORG_USER = ""
screamer 0:66f3b5499f7f 53
screamer 13:ab47a20b66f0 54
screamer 13:ab47a20b66f0 55 ##############################################################################
screamer 13:ab47a20b66f0 56 # User Settings (file)
screamer 13:ab47a20b66f0 57 ##############################################################################
screamer 13:ab47a20b66f0 58 try:
screamer 13:ab47a20b66f0 59 # Allow to overwrite the default settings without the need to edit the
screamer 13:ab47a20b66f0 60 # settings file stored in the repository
screamer 13:ab47a20b66f0 61 from mbed_settings import *
screamer 13:ab47a20b66f0 62 except ImportError:
screamer 13:ab47a20b66f0 63 pass
screamer 13:ab47a20b66f0 64
screamer 13:ab47a20b66f0 65
screamer 13:ab47a20b66f0 66 ##############################################################################
screamer 13:ab47a20b66f0 67 # User Settings (env vars)
screamer 13:ab47a20b66f0 68 ##############################################################################
screamer 13:ab47a20b66f0 69 _ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'GCC_CR_PATH', 'IAR_PATH']
screamer 13:ab47a20b66f0 70
screamer 13:ab47a20b66f0 71 for _n in _ENV_PATHS:
screamer 13:ab47a20b66f0 72 if getenv('MBED_'+_n):
screamer 13:ab47a20b66f0 73 if exists(getenv('MBED_'+_n)):
screamer 13:ab47a20b66f0 74 globals()[_n] = getenv('MBED_'+_n)
screamer 13:ab47a20b66f0 75 else:
screamer 13:ab47a20b66f0 76 print "WARNING: MBED_%s set as environment variable but doesn't exist" % _n
screamer 13:ab47a20b66f0 77
screamer 13:ab47a20b66f0 78
screamer 13:ab47a20b66f0 79 ##############################################################################
screamer 13:ab47a20b66f0 80 # ARM Compiler Paths
screamer 13:ab47a20b66f0 81 ##############################################################################
screamer 13:ab47a20b66f0 82
screamer 13:ab47a20b66f0 83 ARM_BIN = join(ARM_PATH, "bin")
screamer 13:ab47a20b66f0 84 ARM_INC = join(ARM_PATH, "include")
screamer 13:ab47a20b66f0 85 ARM_LIB = join(ARM_PATH, "lib")
screamer 13:ab47a20b66f0 86 ARM_CPPLIB = join(ARM_LIB, "cpplib")
screamer 13:ab47a20b66f0 87 MY_ARM_CLIB = join(ARM_LIB, "lib", "microlib")
screamer 13:ab47a20b66f0 88
screamer 13:ab47a20b66f0 89
screamer 0:66f3b5499f7f 90 ##############################################################################
screamer 0:66f3b5499f7f 91 # Test System Settings
screamer 0:66f3b5499f7f 92 ##############################################################################
screamer 0:66f3b5499f7f 93 SERVER_PORT = 59432
screamer 0:66f3b5499f7f 94 SERVER_ADDRESS = "10.2.200.94"
screamer 0:66f3b5499f7f 95 LOCALHOST = "10.2.200.94"
screamer 0:66f3b5499f7f 96
screamer 0:66f3b5499f7f 97 MUTs = {
screamer 0:66f3b5499f7f 98 "1" : {"mcu": "LPC1768",
screamer 0:66f3b5499f7f 99 "port":"COM41", "disk":'E:\\',
screamer 0:66f3b5499f7f 100 "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
screamer 0:66f3b5499f7f 101 },
screamer 0:66f3b5499f7f 102 "2": {"mcu": "LPC11U24",
screamer 0:66f3b5499f7f 103 "port":"COM42", "disk":'F:\\',
screamer 0:66f3b5499f7f 104 "peripherals": ["TMP102", "digital_loop", "port_loop", "SD"]
screamer 0:66f3b5499f7f 105 },
screamer 0:66f3b5499f7f 106 "3" : {"mcu": "KL25Z",
screamer 0:66f3b5499f7f 107 "port":"COM43", "disk":'G:\\',
screamer 0:66f3b5499f7f 108 "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
screamer 0:66f3b5499f7f 109 },
screamer 0:66f3b5499f7f 110 }