2013-08-06 13:38:00 +00:00
|
|
|
"""
|
|
|
|
mbed SDK
|
2016-06-24 20:40:04 +00:00
|
|
|
Copyright (c) 2016 ARM Limited
|
|
|
|
|
2013-08-06 13:38:00 +00:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
2016-06-24 20:40:04 +00:00
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
2013-08-06 13:38:00 +00:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
"""
|
2018-01-11 21:05:46 +00:00
|
|
|
from __future__ import print_function
|
2016-06-24 20:40:04 +00:00
|
|
|
from os import getenv
|
|
|
|
from os.path import join, abspath, dirname, exists
|
2013-02-18 15:32:11 +00:00
|
|
|
import logging
|
|
|
|
|
|
|
|
ROOT = abspath(join(dirname(__file__), ".."))
|
|
|
|
|
|
|
|
|
2013-08-15 15:09:12 +00:00
|
|
|
##############################################################################
|
2016-06-24 20:40:04 +00:00
|
|
|
# Toolchains and Build System Settings
|
2013-08-15 15:09:12 +00:00
|
|
|
##############################################################################
|
2016-11-18 06:03:55 +00:00
|
|
|
BUILD_DIR = abspath(join(ROOT, "BUILD"))
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2018-11-26 11:07:24 +00:00
|
|
|
# Default directory for dual-core and v8 targets
|
|
|
|
# delivering secure binaries across builds
|
2018-11-13 18:33:05 +00:00
|
|
|
DELIVERY_DIR = abspath(join(ROOT, "DELIVERY"))
|
|
|
|
|
2016-06-24 20:40:04 +00:00
|
|
|
# ARM Compiler 5
|
2016-12-20 17:14:18 +00:00
|
|
|
ARM_PATH = ""
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2016-09-23 16:36:46 +00:00
|
|
|
# ARM Compiler 6
|
|
|
|
ARMC6_PATH = ""
|
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
# GCC ARM
|
2015-06-29 12:56:50 +00:00
|
|
|
GCC_ARM_PATH = ""
|
2013-02-18 15:32:11 +00:00
|
|
|
|
|
|
|
# IAR
|
2016-12-20 17:14:18 +00:00
|
|
|
IAR_PATH = ""
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2016-06-09 21:24:05 +00:00
|
|
|
# Goanna static analyser. Please overload it in mbed_settings.py
|
2016-12-20 17:14:18 +00:00
|
|
|
GOANNA_PATH = ""
|
2013-10-16 13:35:35 +00:00
|
|
|
|
2018-04-26 16:19:51 +00:00
|
|
|
|
2014-06-10 15:38:43 +00:00
|
|
|
# cppcheck path (command) and output message format
|
|
|
|
CPPCHECK_CMD = ["cppcheck", "--enable=all"]
|
2014-06-11 16:08:35 +00:00
|
|
|
CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
|
2014-06-10 15:38:43 +00:00
|
|
|
|
2013-07-02 15:43:29 +00:00
|
|
|
BUILD_OPTIONS = []
|
|
|
|
|
2013-11-27 14:24:42 +00:00
|
|
|
# mbed.org username
|
|
|
|
MBED_ORG_USER = ""
|
|
|
|
|
2018-03-05 14:44:49 +00:00
|
|
|
# Print compiler warnings and errors as link format
|
|
|
|
PRINT_COMPILER_OUTPUT_AS_LINK = False
|
|
|
|
|
2018-07-24 16:50:23 +00:00
|
|
|
# Compare against a fixed build of the project for space consumption
|
|
|
|
COMPARE_FIXED = False
|
|
|
|
|
2018-04-26 16:19:51 +00:00
|
|
|
# Print warnings/errors in color
|
|
|
|
COLOR = False
|
|
|
|
|
2016-07-07 18:27:20 +00:00
|
|
|
CLI_COLOR_MAP = {
|
2018-04-26 16:19:51 +00:00
|
|
|
"Warning": "yellow",
|
|
|
|
"Error" : "red"
|
2016-07-07 18:27:20 +00:00
|
|
|
}
|
2016-06-24 20:40:04 +00:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# User Settings (file)
|
|
|
|
##############################################################################
|
|
|
|
try:
|
|
|
|
# Allow to overwrite the default settings without the need to edit the
|
|
|
|
# settings file stored in the repository
|
|
|
|
from mbed_settings import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# User Settings (env vars)
|
|
|
|
##############################################################################
|
2018-10-02 15:46:09 +00:00
|
|
|
_ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'IAR_PATH', 'ARMC6_PATH']
|
2016-06-24 20:40:04 +00:00
|
|
|
|
|
|
|
for _n in _ENV_PATHS:
|
2016-06-27 22:20:05 +00:00
|
|
|
if getenv('MBED_'+_n):
|
2019-04-05 19:47:02 +00:00
|
|
|
# It's common to provide paths with quotes for certain OSes
|
|
|
|
env_path = getenv('MBED_'+_n).strip("\"'")
|
|
|
|
if exists(env_path):
|
|
|
|
globals()[_n] = env_path
|
2016-06-24 20:40:04 +00:00
|
|
|
else:
|
2018-01-11 21:05:46 +00:00
|
|
|
print("WARNING: MBED_%s set as environment variable but doesn't"
|
|
|
|
" exist" % _n)
|
2016-06-24 20:40:04 +00:00
|
|
|
|
2018-07-24 16:50:23 +00:00
|
|
|
_ENV_VARS = ['PRINT_COMPILER_OUTPUT_AS_LINK', 'COLOR', 'COMPARE_FIXED']
|
2018-04-26 16:19:51 +00:00
|
|
|
for _n in _ENV_VARS:
|
|
|
|
value = getenv('MBED_%s' % _n)
|
|
|
|
if value:
|
|
|
|
globals()[_n] = value
|
|
|
|
|
2016-06-24 20:40:04 +00:00
|
|
|
|
2013-08-15 15:09:12 +00:00
|
|
|
##############################################################################
|
|
|
|
# Test System Settings
|
|
|
|
##############################################################################
|
|
|
|
SERVER_PORT = 59432
|
|
|
|
SERVER_ADDRESS = "10.2.200.94"
|
|
|
|
LOCALHOST = "10.2.200.94"
|
|
|
|
|
|
|
|
MUTs = {
|
|
|
|
"1" : {"mcu": "LPC1768",
|
|
|
|
"port":"COM41", "disk":'E:\\',
|
|
|
|
"peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
|
|
|
|
},
|
|
|
|
"2": {"mcu": "LPC11U24",
|
|
|
|
"port":"COM42", "disk":'F:\\',
|
|
|
|
"peripherals": ["TMP102", "digital_loop", "port_loop", "SD"]
|
|
|
|
},
|
|
|
|
"3" : {"mcu": "KL25Z",
|
|
|
|
"port":"COM43", "disk":'G:\\',
|
|
|
|
"peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
|
|
|
|
},
|
|
|
|
}
|