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