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