2013-08-06 13:38:00 +00:00
|
|
|
"""
|
|
|
|
mbed SDK
|
|
|
|
Copyright (c) 2011-2013 ARM Limited
|
2020-02-20 14:22:24 +00:00
|
|
|
SPDX-License-Identifier: Apache-2.0
|
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
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
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.
|
|
|
|
"""
|
2019-02-10 14:53:47 +00:00
|
|
|
from os.path import join, commonprefix, realpath
|
2014-05-07 21:13:16 +00:00
|
|
|
from os import getenv
|
2013-02-18 15:32:11 +00:00
|
|
|
|
|
|
|
# Conventions about the directory structure
|
2016-08-15 18:53:26 +00:00
|
|
|
from tools.settings import ROOT, BUILD_DIR
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2014-05-07 21:13:16 +00:00
|
|
|
# Allow overriding some of the build parameters using environment variables
|
|
|
|
BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR
|
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
# Embedded Libraries Sources
|
2017-02-22 15:19:02 +00:00
|
|
|
LIB_DIR = join(ROOT, "features/unsupported")
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2016-06-09 20:34:53 +00:00
|
|
|
TOOLS = join(ROOT, "tools")
|
2013-02-18 15:32:11 +00:00
|
|
|
TOOLS_DATA = join(TOOLS, "data")
|
2015-01-13 21:13:45 +00:00
|
|
|
TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
|
2013-02-18 15:32:11 +00:00
|
|
|
|
|
|
|
# mbed libraries
|
2016-09-30 23:22:31 +00:00
|
|
|
MBED_HEADER = join(ROOT, "mbed.h")
|
|
|
|
MBED_DRIVERS = join(ROOT, "drivers")
|
|
|
|
MBED_PLATFORM = join(ROOT, "platform")
|
|
|
|
MBED_HAL = join(ROOT, "hal")
|
2013-06-14 16:32:15 +00:00
|
|
|
|
2016-10-03 23:45:09 +00:00
|
|
|
MBED_CMSIS_PATH = join(ROOT, "cmsis")
|
2016-09-30 23:22:31 +00:00
|
|
|
MBED_TARGETS_PATH = join(ROOT, "targets")
|
2013-02-18 15:32:11 +00:00
|
|
|
|
|
|
|
MBED_LIBRARIES = join(BUILD_DIR, "mbed")
|
2016-10-01 18:34:57 +00:00
|
|
|
MBED_LIBRARIES_DRIVERS = join(MBED_LIBRARIES, "drivers")
|
|
|
|
MBED_LIBRARIES_PLATFORM = join(MBED_LIBRARIES, "platform")
|
|
|
|
MBED_LIBRARIES_HAL = join(MBED_LIBRARIES, "hal")
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2016-09-30 23:47:58 +00:00
|
|
|
MBED_CONFIG_FILE = join(ROOT, "platform/mbed_lib.json")
|
2016-08-10 16:03:13 +00:00
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
# Tests
|
|
|
|
TEST_DIR = join(LIB_DIR, "tests")
|
2016-06-09 20:34:53 +00:00
|
|
|
HOST_TESTS = join(ROOT, "tools", "host_tests")
|
2013-02-18 15:32:11 +00:00
|
|
|
|
2013-06-14 16:32:15 +00:00
|
|
|
# mbed RPC
|
|
|
|
MBED_RPC = join(LIB_DIR, "rpc")
|
|
|
|
|
2015-11-15 08:52:54 +00:00
|
|
|
RPC_LIBRARY = join(BUILD_DIR, "rpc")
|
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
# DSP
|
|
|
|
DSP = join(LIB_DIR, "dsp")
|
|
|
|
DSP_CMSIS = join(DSP, "cmsis_dsp")
|
|
|
|
DSP_ABSTRACTION = join(DSP, "dsp")
|
|
|
|
DSP_LIBRARIES = join(BUILD_DIR, "dsp")
|
|
|
|
|
|
|
|
# USB Device
|
|
|
|
USB = join(LIB_DIR, "USBDevice")
|
|
|
|
USB_LIBRARIES = join(BUILD_DIR, "usb")
|
|
|
|
|
2013-08-16 15:39:30 +00:00
|
|
|
# Export
|
|
|
|
EXPORT_DIR = join(BUILD_DIR, "export")
|
|
|
|
EXPORT_WORKSPACE = join(EXPORT_DIR, "workspace")
|
|
|
|
EXPORT_TMP = join(EXPORT_DIR, ".temp")
|
|
|
|
|
2014-07-01 16:45:12 +00:00
|
|
|
# CppUtest library
|
|
|
|
CPPUTEST_DIR = join(ROOT, "..")
|
2014-11-11 15:31:18 +00:00
|
|
|
CPPUTEST_SRC = join(CPPUTEST_DIR, "cpputest", "src", "CppUTest")
|
|
|
|
CPPUTEST_INC = join(CPPUTEST_DIR, "cpputest", "include")
|
|
|
|
CPPUTEST_INC_EXT = join(CPPUTEST_DIR, "cpputest", "include", "CppUTest")
|
2014-07-01 16:45:12 +00:00
|
|
|
# Platform dependant code is here (for armcc compiler)
|
2016-08-15 18:53:26 +00:00
|
|
|
CPPUTEST_PLATFORM_SRC = join(CPPUTEST_DIR, "cpputest", "src", "Platforms",
|
|
|
|
"armcc")
|
|
|
|
CPPUTEST_PLATFORM_INC = join(CPPUTEST_DIR, "cpputest", "include", "Platforms",
|
|
|
|
"armcc")
|
2014-07-01 16:45:12 +00:00
|
|
|
# Function 'main' used to run all compiled UTs
|
|
|
|
CPPUTEST_TESTRUNNER_SCR = join(TEST_DIR, "utest", "testrunner")
|
|
|
|
CPPUTEST_TESTRUNNER_INC = join(TEST_DIR, "utest", "testrunner")
|
|
|
|
|
|
|
|
CPPUTEST_LIBRARY = join(BUILD_DIR, "cpputest")
|