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