Committer:
borlanic
Date:
Fri Mar 30 14:07:05 2018 +0000
Revision:
4:75df35ef4fb6
Parent:
0:380207fcb5c1
commentar

Who changed what in which revision?

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