mbed os with nrf51 internal bandgap enabled to read battery level

Dependents:   BLE_file_test BLE_Blink ExternalEncoder

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 """
elessair 0:f269e3021894 2 mbed SDK
elessair 0:f269e3021894 3 Copyright (c) 2011-2013 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 from os.path import join
elessair 0:f269e3021894 18 from os import getenv
elessair 0:f269e3021894 19
elessair 0:f269e3021894 20 # Conventions about the directory structure
elessair 0:f269e3021894 21 from tools.settings import ROOT, BUILD_DIR
elessair 0:f269e3021894 22
elessair 0:f269e3021894 23 # Allow overriding some of the build parameters using environment variables
elessair 0:f269e3021894 24 BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR
elessair 0:f269e3021894 25
elessair 0:f269e3021894 26 # Embedded Libraries Sources
elessair 0:f269e3021894 27 LIB_DIR = join(ROOT, "features/unsupported")
elessair 0:f269e3021894 28
elessair 0:f269e3021894 29 TOOLS = join(ROOT, "tools")
elessair 0:f269e3021894 30 TOOLS_DATA = join(TOOLS, "data")
elessair 0:f269e3021894 31 TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
elessair 0:f269e3021894 32
elessair 0:f269e3021894 33 # mbed libraries
elessair 0:f269e3021894 34 MBED_HEADER = join(ROOT, "mbed.h")
elessair 0:f269e3021894 35 MBED_DRIVERS = join(ROOT, "drivers")
elessair 0:f269e3021894 36 MBED_PLATFORM = join(ROOT, "platform")
elessair 0:f269e3021894 37 MBED_HAL = join(ROOT, "hal")
elessair 0:f269e3021894 38
elessair 0:f269e3021894 39 MBED_CMSIS_PATH = join(ROOT, "cmsis")
elessair 0:f269e3021894 40 MBED_TARGETS_PATH = join(ROOT, "targets")
elessair 0:f269e3021894 41
elessair 0:f269e3021894 42 MBED_LIBRARIES = join(BUILD_DIR, "mbed")
elessair 0:f269e3021894 43 MBED_LIBRARIES_DRIVERS = join(MBED_LIBRARIES, "drivers")
elessair 0:f269e3021894 44 MBED_LIBRARIES_PLATFORM = join(MBED_LIBRARIES, "platform")
elessair 0:f269e3021894 45 MBED_LIBRARIES_HAL = join(MBED_LIBRARIES, "hal")
elessair 0:f269e3021894 46
elessair 0:f269e3021894 47 MBED_CONFIG_FILE = join(ROOT, "platform/mbed_lib.json")
elessair 0:f269e3021894 48
elessair 0:f269e3021894 49 # Tests
elessair 0:f269e3021894 50 TEST_DIR = join(LIB_DIR, "tests")
elessair 0:f269e3021894 51 HOST_TESTS = join(ROOT, "tools", "host_tests")
elessair 0:f269e3021894 52
elessair 0:f269e3021894 53 # mbed RPC
elessair 0:f269e3021894 54 MBED_RPC = join(LIB_DIR, "rpc")
elessair 0:f269e3021894 55
elessair 0:f269e3021894 56 RPC_LIBRARY = join(BUILD_DIR, "rpc")
elessair 0:f269e3021894 57
elessair 0:f269e3021894 58 # mbed RTOS
elessair 0:f269e3021894 59 RTOS = join(ROOT, "rtos")
elessair 0:f269e3021894 60 MBED_RTX = join(RTOS, "rtx")
elessair 0:f269e3021894 61
elessair 0:f269e3021894 62 RTOS_LIBRARIES = join(BUILD_DIR, "rtos")
elessair 0:f269e3021894 63
elessair 0:f269e3021894 64 # TCP/IP
elessair 0:f269e3021894 65 NET = join(LIB_DIR, "net")
elessair 0:f269e3021894 66
elessair 0:f269e3021894 67 ETH_SOURCES = join(NET, "eth")
elessair 0:f269e3021894 68 LWIP_SOURCES = join(NET, "lwip")
elessair 0:f269e3021894 69 VODAFONE_SOURCES = join(NET, "VodafoneUSBModem")
elessair 0:f269e3021894 70 CELLULAR_SOURCES = join(NET, "cellular", "CellularModem")
elessair 0:f269e3021894 71 CELLULAR_USB_SOURCES = join(NET, "cellular", "CellularUSBModem")
elessair 0:f269e3021894 72 UBLOX_SOURCES = join(NET, "cellular", "UbloxUSBModem")
elessair 0:f269e3021894 73
elessair 0:f269e3021894 74 NET_LIBRARIES = join(BUILD_DIR, "net")
elessair 0:f269e3021894 75 ETH_LIBRARY = join(NET_LIBRARIES, "eth")
elessair 0:f269e3021894 76 VODAFONE_LIBRARY = join(NET_LIBRARIES, "VodafoneUSBModem")
elessair 0:f269e3021894 77 UBLOX_LIBRARY = join(NET_LIBRARIES, "UbloxUSBModem")
elessair 0:f269e3021894 78
elessair 0:f269e3021894 79 # FS
elessair 0:f269e3021894 80 FS_PATH = join(LIB_DIR, "fs")
elessair 0:f269e3021894 81 FAT_FS = join(FS_PATH, "fat")
elessair 0:f269e3021894 82 SD_FS = join(FS_PATH, "sd")
elessair 0:f269e3021894 83 FS_LIBRARY = join(BUILD_DIR, "fat")
elessair 0:f269e3021894 84
elessair 0:f269e3021894 85 # DSP
elessair 0:f269e3021894 86 DSP = join(LIB_DIR, "dsp")
elessair 0:f269e3021894 87 DSP_CMSIS = join(DSP, "cmsis_dsp")
elessair 0:f269e3021894 88 DSP_ABSTRACTION = join(DSP, "dsp")
elessair 0:f269e3021894 89 DSP_LIBRARIES = join(BUILD_DIR, "dsp")
elessair 0:f269e3021894 90
elessair 0:f269e3021894 91 # USB Device
elessair 0:f269e3021894 92 USB = join(LIB_DIR, "USBDevice")
elessair 0:f269e3021894 93 USB_LIBRARIES = join(BUILD_DIR, "usb")
elessair 0:f269e3021894 94
elessair 0:f269e3021894 95 # USB Host
elessair 0:f269e3021894 96 USB_HOST = join(LIB_DIR, "USBHost")
elessair 0:f269e3021894 97 USB_HOST_LIBRARIES = join(BUILD_DIR, "usb_host")
elessair 0:f269e3021894 98
elessair 0:f269e3021894 99 # Export
elessair 0:f269e3021894 100 EXPORT_DIR = join(BUILD_DIR, "export")
elessair 0:f269e3021894 101 EXPORT_WORKSPACE = join(EXPORT_DIR, "workspace")
elessair 0:f269e3021894 102 EXPORT_TMP = join(EXPORT_DIR, ".temp")
elessair 0:f269e3021894 103
elessair 0:f269e3021894 104 # CppUtest library
elessair 0:f269e3021894 105 CPPUTEST_DIR = join(ROOT, "..")
elessair 0:f269e3021894 106 CPPUTEST_SRC = join(CPPUTEST_DIR, "cpputest", "src", "CppUTest")
elessair 0:f269e3021894 107 CPPUTEST_INC = join(CPPUTEST_DIR, "cpputest", "include")
elessair 0:f269e3021894 108 CPPUTEST_INC_EXT = join(CPPUTEST_DIR, "cpputest", "include", "CppUTest")
elessair 0:f269e3021894 109 # Platform dependant code is here (for armcc compiler)
elessair 0:f269e3021894 110 CPPUTEST_PLATFORM_SRC = join(CPPUTEST_DIR, "cpputest", "src", "Platforms",
elessair 0:f269e3021894 111 "armcc")
elessair 0:f269e3021894 112 CPPUTEST_PLATFORM_INC = join(CPPUTEST_DIR, "cpputest", "include", "Platforms",
elessair 0:f269e3021894 113 "armcc")
elessair 0:f269e3021894 114 # Function 'main' used to run all compiled UTs
elessair 0:f269e3021894 115 CPPUTEST_TESTRUNNER_SCR = join(TEST_DIR, "utest", "testrunner")
elessair 0:f269e3021894 116 CPPUTEST_TESTRUNNER_INC = join(TEST_DIR, "utest", "testrunner")
elessair 0:f269e3021894 117
elessair 0:f269e3021894 118 CPPUTEST_LIBRARY = join(BUILD_DIR, "cpputest")