Development mbed library for MAX32630FTHR

Dependents:   blinky_max32630fthr

Committer:
switches
Date:
Fri Dec 16 16:27:57 2016 +0000
Revision:
3:1198227e6421
Parent:
0:5c4d7b2438d3
Changed ADC scale for MAX32625 platforms to 1.2V full scale to match MAX32630 platforms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
switches 0:5c4d7b2438d3 1 #!/usr/bin/env python2
switches 0:5c4d7b2438d3 2
switches 0:5c4d7b2438d3 3 """
switches 0:5c4d7b2438d3 4 Travis-CI build script
switches 0:5c4d7b2438d3 5
switches 0:5c4d7b2438d3 6 mbed SDK
switches 0:5c4d7b2438d3 7 Copyright (c) 2011-2013 ARM Limited
switches 0:5c4d7b2438d3 8
switches 0:5c4d7b2438d3 9 Licensed under the Apache License, Version 2.0 (the "License");
switches 0:5c4d7b2438d3 10 you may not use this file except in compliance with the License.
switches 0:5c4d7b2438d3 11 You may obtain a copy of the License at
switches 0:5c4d7b2438d3 12
switches 0:5c4d7b2438d3 13 http://www.apache.org/licenses/LICENSE-2.0
switches 0:5c4d7b2438d3 14
switches 0:5c4d7b2438d3 15 Unless required by applicable law or agreed to in writing, software
switches 0:5c4d7b2438d3 16 distributed under the License is distributed on an "AS IS" BASIS,
switches 0:5c4d7b2438d3 17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
switches 0:5c4d7b2438d3 18 See the License for the specific language governing permissions and
switches 0:5c4d7b2438d3 19 limitations under the License.
switches 0:5c4d7b2438d3 20 """
switches 0:5c4d7b2438d3 21
switches 0:5c4d7b2438d3 22 import os
switches 0:5c4d7b2438d3 23 import sys
switches 0:5c4d7b2438d3 24
switches 0:5c4d7b2438d3 25 ################################################################################
switches 0:5c4d7b2438d3 26 # Configure builds here
switches 0:5c4d7b2438d3 27 # "libs" can contain "dsp", "rtos", "eth", "usb_host", "usb", "ublox", "fat"
switches 0:5c4d7b2438d3 28
switches 0:5c4d7b2438d3 29 build_list = (
switches 0:5c4d7b2438d3 30 { "target": "LPC1768", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "eth", "usb_host", "usb", "ublox", "fat"] },
switches 0:5c4d7b2438d3 31 { "target": "LPC2368", "toolchains": "GCC_ARM", "libs": ["fat"] },
switches 0:5c4d7b2438d3 32 { "target": "LPC2460", "toolchains": "GCC_ARM", "libs": ["rtos", "usb_host", "usb", "fat"] },
switches 0:5c4d7b2438d3 33 { "target": "LPC11U24", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 34 { "target": "OC_MBUINO", "toolchains": "GCC_ARM", "libs": ["fat"] },
switches 0:5c4d7b2438d3 35
switches 0:5c4d7b2438d3 36 { "target": "LPC11U24_301", "toolchains": "GCC_ARM", "libs": ["fat"] },
switches 0:5c4d7b2438d3 37
switches 0:5c4d7b2438d3 38 { "target": "B96B_F446VE", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 39 { "target": "NUCLEO_L053R8", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 40 { "target": "NUCLEO_L152RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 41 { "target": "NUCLEO_F030R8", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 42 { "target": "NUCLEO_F031K6", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 43 { "target": "NUCLEO_F042K6", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 44 { "target": "NUCLEO_F070RB", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 45 { "target": "NUCLEO_F072RB", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 46 { "target": "NUCLEO_F091RC", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 47 { "target": "NUCLEO_F103RB", "toolchains": "GCC_ARM", "libs": ["rtos", "fat"] },
switches 0:5c4d7b2438d3 48 { "target": "NUCLEO_F207ZG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 49 { "target": "NUCLEO_F302R8", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 50 { "target": "NUCLEO_F303K8", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 51 { "target": "NUCLEO_F303RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 52 { "target": "NUCLEO_F303ZE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 53 { "target": "NUCLEO_F334R8", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 54 { "target": "NUCLEO_F401RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 55 { "target": "NUCLEO_F410RB", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 56 { "target": "NUCLEO_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 57 { "target": "NUCLEO_L432KC", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 58 { "target": "NUCLEO_L476RG", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 59 { "target": "NUCLEO_L011K4", "toolchains": "GCC_ARM", "libs": ["dsp"] },
switches 0:5c4d7b2438d3 60 { "target": "NUCLEO_L031K6", "toolchains": "GCC_ARM", "libs": ["dsp"] },
switches 0:5c4d7b2438d3 61 { "target": "NUCLEO_L073RZ", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 62 { "target": "NUCLEO_F429ZI", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 63 { "target": "NUCLEO_F446RE", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 64 { "target": "NUCLEO_F446ZE", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 65 { "target": "NUCLEO_F746ZG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 66 { "target": "NUCLEO_F767ZI", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 67
switches 0:5c4d7b2438d3 68 { "target": "MOTE_L152RC", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 69
switches 0:5c4d7b2438d3 70 { "target": "ELMO_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 71
switches 0:5c4d7b2438d3 72 { "target": "MTS_MDOT_F405RG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos"] },
switches 0:5c4d7b2438d3 73 { "target": "MTS_MDOT_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos"] },
switches 0:5c4d7b2438d3 74 { "target": "MTS_DRAGONFLY_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 75 { "target": "ARCH_MAX", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 76
switches 0:5c4d7b2438d3 77 { "target": "DISCO_F051R8", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 78 { "target": "DISCO_F334C8", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 79 { "target": "DISCO_F401VC", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 80 { "target": "DISCO_F407VG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 81 { "target": "DISCO_F429ZI", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 82 { "target": "DISCO_F469NI", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 83 { "target": "DISCO_F746NG", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 84 { "target": "DISCO_F769NI", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 85
switches 0:5c4d7b2438d3 86 { "target": "LPC1114", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 87 { "target": "LPC11U35_401", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 88 { "target": "UBLOX_C027", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 89 { "target": "LPC11U35_501", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 90 { "target": "LPC11U68", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 91 { "target": "LPC11U37H_401", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 92
switches 0:5c4d7b2438d3 93 { "target": "KL05Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 94 { "target": "KL25Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 95 { "target": "KL27Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 96 { "target": "KL43Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 97 { "target": "KL46Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 98 { "target": "K20D50M", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 99 { "target": "TEENSY3_1", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 100 { "target": "K64F", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 101 { "target": "K22F", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 102 { "target": "LPC4088", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat"] },
switches 0:5c4d7b2438d3 103 { "target": "ARCH_PRO", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 104 { "target": "LPC1549", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 105 { "target": "NRF51822", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 106 { "target": "DELTA_DFCM_NNN40", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 107 { "target": "NRF51_DK", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 108 { "target": "NRF51_MICROBIT", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
switches 0:5c4d7b2438d3 109
switches 0:5c4d7b2438d3 110 { "target": "EFM32ZG_STK3200", "toolchains": "GCC_ARM", "libs": ["dsp"] },
switches 0:5c4d7b2438d3 111 { "target": "EFM32HG_STK3400", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
switches 0:5c4d7b2438d3 112 { "target": "EFM32LG_STK3600", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
switches 0:5c4d7b2438d3 113 { "target": "EFM32GG_STK3700", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
switches 0:5c4d7b2438d3 114 { "target": "EFM32WG_STK3800", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
switches 0:5c4d7b2438d3 115 { "target": "EFM32PG_STK3401", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos"] },
switches 0:5c4d7b2438d3 116
switches 0:5c4d7b2438d3 117 { "target": "MAXWSNENV", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 118 { "target": "MAX32600MBED", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 119 { "target": "MAX32620HSP", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 120
switches 0:5c4d7b2438d3 121 { "target": "RZ_A1H", "toolchains": "GCC_ARM", "libs": ["fat"] },
switches 0:5c4d7b2438d3 122
switches 0:5c4d7b2438d3 123 { "target": "SAMR21G18A", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 124 { "target": "SAMD21J18A", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 125 { "target": "SAMD21G18A", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 126 { "target": "SAML21J18A", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
switches 0:5c4d7b2438d3 127 )
switches 0:5c4d7b2438d3 128
switches 0:5c4d7b2438d3 129 ################################################################################
switches 0:5c4d7b2438d3 130 # Configure example test building (linking against external mbed SDK libraries liek fat or rtos)
switches 0:5c4d7b2438d3 131
switches 0:5c4d7b2438d3 132 linking_list = [
switches 0:5c4d7b2438d3 133 {"target": "LPC1768",
switches 0:5c4d7b2438d3 134 "toolchains": "GCC_ARM",
switches 0:5c4d7b2438d3 135 "tests": {"" : ["MBED_2", "MBED_10", "MBED_11", "MBED_15", "MBED_16", "MBED_17"],
switches 0:5c4d7b2438d3 136 "eth" : ["NET_1", "NET_2", "NET_3", "NET_4"],
switches 0:5c4d7b2438d3 137 "fat" : ["MBED_A12", "MBED_19", "PERF_1", "PERF_2", "PERF_3"],
switches 0:5c4d7b2438d3 138 "rtos" : ["RTOS_1", "RTOS_2", "RTOS_3"],
switches 0:5c4d7b2438d3 139 "usb" : ["USB_1", "USB_2" ,"USB_3"],
switches 0:5c4d7b2438d3 140 }
switches 0:5c4d7b2438d3 141 },
switches 0:5c4d7b2438d3 142 {"target": "K64F",
switches 0:5c4d7b2438d3 143 "toolchains": "GCC_ARM",
switches 0:5c4d7b2438d3 144 "tests": {"" : ["MBED_2", "MBED_10", "MBED_11", "MBED_16"],
switches 0:5c4d7b2438d3 145 "fat" : ["MBED_A12", "PERF_1", "PERF_2", "PERF_3"],
switches 0:5c4d7b2438d3 146 "rtos" : ["RTOS_1", "RTOS_2", "RTOS_3"],
switches 0:5c4d7b2438d3 147 "usb" : ["USB_1", "USB_2" ,"USB_3"],
switches 0:5c4d7b2438d3 148 }
switches 0:5c4d7b2438d3 149 },
switches 0:5c4d7b2438d3 150 {"target": "K22F",
switches 0:5c4d7b2438d3 151 "toolchains": "GCC_ARM",
switches 0:5c4d7b2438d3 152 "tests": {"" : ["MBED_2", "MBED_10", "MBED_11", "MBED_16"],
switches 0:5c4d7b2438d3 153 "fat" : ["MBED_A12", "PERF_1", "PERF_2", "PERF_3"],
switches 0:5c4d7b2438d3 154 "rtos" : ["RTOS_1", "RTOS_2", "RTOS_3"],
switches 0:5c4d7b2438d3 155 "usb" : ["USB_1", "USB_2" ,"USB_3"],
switches 0:5c4d7b2438d3 156 }
switches 0:5c4d7b2438d3 157 },
switches 0:5c4d7b2438d3 158 {"target": "KL43Z",
switches 0:5c4d7b2438d3 159 "toolchains": "GCC_ARM",
switches 0:5c4d7b2438d3 160 "tests": {"" : ["MBED_2", "MBED_10", "MBED_11", "MBED_16"],
switches 0:5c4d7b2438d3 161 "fat" : ["MBED_A12", "PERF_1", "PERF_2", "PERF_3"],
switches 0:5c4d7b2438d3 162 "rtos" : ["RTOS_1", "RTOS_2", "RTOS_3"],
switches 0:5c4d7b2438d3 163 "usb" : ["USB_1", "USB_2" ,"USB_3"],
switches 0:5c4d7b2438d3 164 }
switches 0:5c4d7b2438d3 165 }
switches 0:5c4d7b2438d3 166 ]
switches 0:5c4d7b2438d3 167
switches 0:5c4d7b2438d3 168 ################################################################################
switches 0:5c4d7b2438d3 169
switches 0:5c4d7b2438d3 170 # Driver
switches 0:5c4d7b2438d3 171
switches 0:5c4d7b2438d3 172 def run_builds(dry_run):
switches 0:5c4d7b2438d3 173 for build in build_list:
switches 0:5c4d7b2438d3 174 toolchain_list = build["toolchains"]
switches 0:5c4d7b2438d3 175 if type(toolchain_list) != type([]): toolchain_list = [toolchain_list]
switches 0:5c4d7b2438d3 176 for toolchain in toolchain_list:
switches 0:5c4d7b2438d3 177 cmdline = "python tools/build.py -m %s -t %s -j 4 -c --silent "% (build["target"], toolchain)
switches 0:5c4d7b2438d3 178 libs = build.get("libs", [])
switches 0:5c4d7b2438d3 179 if libs:
switches 0:5c4d7b2438d3 180 cmdline = cmdline + " ".join(["--" + l for l in libs])
switches 0:5c4d7b2438d3 181 print "Executing: " + cmdline
switches 0:5c4d7b2438d3 182 if not dry_run:
switches 0:5c4d7b2438d3 183 if os.system(cmdline) != 0:
switches 0:5c4d7b2438d3 184 sys.exit(1)
switches 0:5c4d7b2438d3 185
switches 0:5c4d7b2438d3 186
switches 0:5c4d7b2438d3 187 def run_test_linking(dry_run):
switches 0:5c4d7b2438d3 188 """ Function run make.py commands to build and link simple mbed SDK
switches 0:5c4d7b2438d3 189 tests against few libraries to make sure there are no simple linking errors.
switches 0:5c4d7b2438d3 190 """
switches 0:5c4d7b2438d3 191 for link in linking_list:
switches 0:5c4d7b2438d3 192 toolchain_list = link["toolchains"]
switches 0:5c4d7b2438d3 193 if type(toolchain_list) != type([]):
switches 0:5c4d7b2438d3 194 toolchain_list = [toolchain_list]
switches 0:5c4d7b2438d3 195 for toolchain in toolchain_list:
switches 0:5c4d7b2438d3 196 tests = link["tests"]
switches 0:5c4d7b2438d3 197 # Call make.py for each test group for particular library
switches 0:5c4d7b2438d3 198 for test_lib in tests:
switches 0:5c4d7b2438d3 199 test_names = tests[test_lib]
switches 0:5c4d7b2438d3 200 test_lib_switch = "--" + test_lib if test_lib else ""
switches 0:5c4d7b2438d3 201 cmdline = "python tools/make.py -m %s -t %s -c --silent %s -n %s " % (link["target"], toolchain, test_lib_switch, ",".join(test_names))
switches 0:5c4d7b2438d3 202 print "Executing: " + cmdline
switches 0:5c4d7b2438d3 203 if not dry_run:
switches 0:5c4d7b2438d3 204 if os.system(cmdline) != 0:
switches 0:5c4d7b2438d3 205 sys.exit(1)
switches 0:5c4d7b2438d3 206
switches 0:5c4d7b2438d3 207 def run_test_testsuite(dry_run):
switches 0:5c4d7b2438d3 208 cmdline = "python tools/singletest.py --version"
switches 0:5c4d7b2438d3 209 print "Executing: " + cmdline
switches 0:5c4d7b2438d3 210 if not dry_run:
switches 0:5c4d7b2438d3 211 if os.system(cmdline) != 0:
switches 0:5c4d7b2438d3 212 sys.exit(1)
switches 0:5c4d7b2438d3 213
switches 0:5c4d7b2438d3 214 if __name__ == "__main__":
switches 0:5c4d7b2438d3 215 run_builds("-s" in sys.argv)
switches 0:5c4d7b2438d3 216 run_test_linking("-s" in sys.argv)
switches 0:5c4d7b2438d3 217 run_test_testsuite("-s" in sys.argv)