Clone of official tools

Committer:
screamer
Date:
Thu May 19 19:44:41 2016 +0100
Revision:
0:66f3b5499f7f
Child:
13:ab47a20b66f0
Initial revision

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:66f3b5499f7f 1 #!/usr/bin/env python
screamer 0:66f3b5499f7f 2 """
screamer 0:66f3b5499f7f 3 mbed SDK
screamer 0:66f3b5499f7f 4 Copyright (c) 2011-2013 ARM Limited
screamer 0:66f3b5499f7f 5
screamer 0:66f3b5499f7f 6 Licensed under the Apache License, Version 2.0 (the "License");
screamer 0:66f3b5499f7f 7 you may not use this file except in compliance with the License.
screamer 0:66f3b5499f7f 8 You may obtain a copy of the License at
screamer 0:66f3b5499f7f 9
screamer 0:66f3b5499f7f 10 http://www.apache.org/licenses/LICENSE-2.0
screamer 0:66f3b5499f7f 11
screamer 0:66f3b5499f7f 12 Unless required by applicable law or agreed to in writing, software
screamer 0:66f3b5499f7f 13 distributed under the License is distributed on an "AS IS" BASIS,
screamer 0:66f3b5499f7f 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
screamer 0:66f3b5499f7f 15 See the License for the specific language governing permissions and
screamer 0:66f3b5499f7f 16 limitations under the License.
screamer 0:66f3b5499f7f 17 """
screamer 0:66f3b5499f7f 18 import sys
screamer 0:66f3b5499f7f 19 from os.path import join, abspath, dirname, exists
screamer 0:66f3b5499f7f 20 ROOT = abspath(join(dirname(__file__), ".."))
screamer 0:66f3b5499f7f 21 sys.path.insert(0, ROOT)
screamer 0:66f3b5499f7f 22
screamer 0:66f3b5499f7f 23 from shutil import move
screamer 0:66f3b5499f7f 24
screamer 0:66f3b5499f7f 25 from tools.paths import *
screamer 0:66f3b5499f7f 26 from tools.utils import mkdir, cmd
screamer 0:66f3b5499f7f 27 from tools.export import export, setup_user_prj
screamer 0:66f3b5499f7f 28
screamer 0:66f3b5499f7f 29
screamer 0:66f3b5499f7f 30 USR_PRJ_NAME = "usr_prj"
screamer 0:66f3b5499f7f 31 USER_PRJ = join(EXPORT_WORKSPACE, USR_PRJ_NAME)
screamer 0:66f3b5499f7f 32 USER_SRC = join(USER_PRJ, "src")
screamer 0:66f3b5499f7f 33
screamer 0:66f3b5499f7f 34
screamer 0:66f3b5499f7f 35 def setup_test_user_prj():
screamer 0:66f3b5499f7f 36 if exists(USER_PRJ):
screamer 0:66f3b5499f7f 37 print 'Test user project already generated...'
screamer 0:66f3b5499f7f 38 return
screamer 0:66f3b5499f7f 39
screamer 0:66f3b5499f7f 40 setup_user_prj(USER_PRJ, join(TEST_DIR, "rtos", "mbed", "basic"), [join(LIB_DIR, "rtos"), join(LIB_DIR, "tests", "mbed", "env")])
screamer 0:66f3b5499f7f 41
screamer 0:66f3b5499f7f 42 # FAKE BUILD URL
screamer 0:66f3b5499f7f 43 open(join(USER_SRC, "mbed.bld"), 'w').write("http://mbed.org/users/mbed_official/code/mbed/builds/976df7c37ad5\n")
screamer 0:66f3b5499f7f 44
screamer 0:66f3b5499f7f 45
screamer 0:66f3b5499f7f 46 def fake_build_url_resolver(url):
screamer 0:66f3b5499f7f 47 # FAKE BUILD URL: Ignore the URL, always return the path to the mbed library
screamer 0:66f3b5499f7f 48 return {'path':MBED_LIBRARIES, 'name':'mbed'}
screamer 0:66f3b5499f7f 49
screamer 0:66f3b5499f7f 50
screamer 0:66f3b5499f7f 51 def test_export(toolchain, target, expected_error=None):
screamer 0:66f3b5499f7f 52 if toolchain is None and target is None:
screamer 0:66f3b5499f7f 53 base_dir = join(EXPORT_TMP, "zip")
screamer 0:66f3b5499f7f 54 else:
screamer 0:66f3b5499f7f 55 base_dir = join(EXPORT_TMP, toolchain, target)
screamer 0:66f3b5499f7f 56 temp_dir = join(base_dir, "temp")
screamer 0:66f3b5499f7f 57 mkdir(temp_dir)
screamer 0:66f3b5499f7f 58
screamer 0:66f3b5499f7f 59 zip_path, report = export(USER_PRJ, USR_PRJ_NAME, toolchain, target, base_dir, temp_dir, False, None, fake_build_url_resolver)
screamer 0:66f3b5499f7f 60
screamer 0:66f3b5499f7f 61 if report['success']:
screamer 0:66f3b5499f7f 62 move(zip_path, join(EXPORT_DIR, "export_%s_%s.zip" % (toolchain, target)))
screamer 0:66f3b5499f7f 63 print "[OK]"
screamer 0:66f3b5499f7f 64 else:
screamer 0:66f3b5499f7f 65 if expected_error is None:
screamer 0:66f3b5499f7f 66 print '[ERRROR] %s' % report['errormsg']
screamer 0:66f3b5499f7f 67 else:
screamer 0:66f3b5499f7f 68 if (zip_path is None) and (expected_error in report['errormsg']):
screamer 0:66f3b5499f7f 69 print '[OK]'
screamer 0:66f3b5499f7f 70 else:
screamer 0:66f3b5499f7f 71 print '[ERROR]'
screamer 0:66f3b5499f7f 72 print ' zip:', zip_path
screamer 0:66f3b5499f7f 73 print ' msg:', report['errormsg']
screamer 0:66f3b5499f7f 74
screamer 0:66f3b5499f7f 75
screamer 0:66f3b5499f7f 76 if __name__ == '__main__':
screamer 0:66f3b5499f7f 77 setup_test_user_prj()
screamer 0:66f3b5499f7f 78
screamer 0:66f3b5499f7f 79 for toolchain, target in [
screamer 0:66f3b5499f7f 80 ('zip', 'LPC1768'),
screamer 0:66f3b5499f7f 81
screamer 0:66f3b5499f7f 82 ('emblocks', 'LPC1768'),
screamer 0:66f3b5499f7f 83 ('emblocks', 'LPC1549'),
screamer 0:66f3b5499f7f 84 ('emblocks', 'LPC1114'),
screamer 0:66f3b5499f7f 85 ('emblocks', 'LPC11U35_401'),
screamer 0:66f3b5499f7f 86 ('emblocks', 'LPC11U35_501'),
screamer 0:66f3b5499f7f 87 ('emblocks', 'LPCCAPPUCCINO'),
screamer 0:66f3b5499f7f 88 ('emblocks', 'LPC2368'),
screamer 0:66f3b5499f7f 89 ('emblocks', 'STM32F407'),
screamer 0:66f3b5499f7f 90 ('emblocks', 'DISCO_F100RB'),
screamer 0:66f3b5499f7f 91 ('emblocks', 'DISCO_F051R8'),
screamer 0:66f3b5499f7f 92 ('emblocks', 'DISCO_F407VG'),
screamer 0:66f3b5499f7f 93 ('emblocks', 'DISCO_F303VC'),
screamer 0:66f3b5499f7f 94 ('emblocks', 'NRF51822'),
screamer 0:66f3b5499f7f 95 ('emblocks', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 96 ('emblocks', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 97 ('emblocks', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 98 ('emblocks', 'MTS_MDOT_F405RG'),
screamer 0:66f3b5499f7f 99 ('emblocks', 'MTS_MDOT_F411RE'),
screamer 0:66f3b5499f7f 100
screamer 0:66f3b5499f7f 101 ('coide', 'KL05Z'),
screamer 0:66f3b5499f7f 102 ('coide', 'KL25Z'),
screamer 0:66f3b5499f7f 103 ('coide', 'LPC1768'),
screamer 0:66f3b5499f7f 104 ('coide', 'ARCH_PRO'),
screamer 0:66f3b5499f7f 105 ('coide', 'DISCO_F407VG'),
screamer 0:66f3b5499f7f 106 ('coide', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 107 ('coide', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 108 ('coide', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 109 ('coide', 'DISCO_F429ZI'),
screamer 0:66f3b5499f7f 110 #('coide', 'DISCO_F469NI'), removed because template not available
screamer 0:66f3b5499f7f 111 ('coide', 'NUCLEO_F334R8'),
screamer 0:66f3b5499f7f 112 ('coide', 'MTS_MDOT_F405RG'),
screamer 0:66f3b5499f7f 113 ('coide', 'MTS_MDOT_F411RE'),
screamer 0:66f3b5499f7f 114
screamer 0:66f3b5499f7f 115 ('uvision', 'LPC1768'),
screamer 0:66f3b5499f7f 116 ('uvision', 'LPC11U24'),
screamer 0:66f3b5499f7f 117 ('uvision', 'LPC11U35_401'),
screamer 0:66f3b5499f7f 118 ('uvision', 'LPC11U35_501'),
screamer 0:66f3b5499f7f 119 ('uvision', 'KL25Z'),
screamer 0:66f3b5499f7f 120 ('uvision', 'LPC1347'),
screamer 0:66f3b5499f7f 121 ('uvision', 'LPC1114'),
screamer 0:66f3b5499f7f 122 ('uvision', 'LPC4088'),
screamer 0:66f3b5499f7f 123 ('uvision', 'LPC4088_DM'),
screamer 0:66f3b5499f7f 124 ('uvision', 'LPC4337'),
screamer 0:66f3b5499f7f 125 ('uvision', 'LPC824'),
screamer 0:66f3b5499f7f 126 ('uvision', 'SSCI824'),
screamer 0:66f3b5499f7f 127 ('uvision', 'HRM1017'),
screamer 0:66f3b5499f7f 128
screamer 0:66f3b5499f7f 129 ('uvision', 'B96B_F446VE'),
screamer 0:66f3b5499f7f 130 ('uvision', 'NUCLEO_F030R8'),
screamer 0:66f3b5499f7f 131 ('uvision', 'NUCLEO_F031K6'),
screamer 0:66f3b5499f7f 132 ('uvision', 'NUCLEO_F042K6'),
screamer 0:66f3b5499f7f 133 ('uvision', 'NUCLEO_F070RB'),
screamer 0:66f3b5499f7f 134 ('uvision', 'NUCLEO_F072RB'),
screamer 0:66f3b5499f7f 135 ('uvision', 'NUCLEO_F091RC'),
screamer 0:66f3b5499f7f 136 ('uvision', 'NUCLEO_F103RB'),
screamer 0:66f3b5499f7f 137 ('uvision', 'NUCLEO_F302R8'),
screamer 0:66f3b5499f7f 138 ('uvision', 'NUCLEO_F303K8'),
screamer 0:66f3b5499f7f 139 ('uvision', 'NUCLEO_F303RE'),
screamer 0:66f3b5499f7f 140 ('uvision', 'NUCLEO_F334R8'),
screamer 0:66f3b5499f7f 141 ('uvision', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 142 ('uvision', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 143 ('uvision', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 144 ('uvision', 'NUCLEO_F446RE'),
screamer 0:66f3b5499f7f 145 ('uvision', 'NUCLEO_L053R8'),
screamer 0:66f3b5499f7f 146 ('uvision', 'NUCLEO_L073RZ'),
screamer 0:66f3b5499f7f 147 ('uvision', 'NUCLEO_L152RE'),
screamer 0:66f3b5499f7f 148 ('uvision', 'NUCLEO_L476RG'),
screamer 0:66f3b5499f7f 149 ('uvision', 'MTS_MDOT_F405RG'),
screamer 0:66f3b5499f7f 150 ('uvision', 'MAXWSNENV'),
screamer 0:66f3b5499f7f 151 ('uvision', 'MAX32600MBED'),
screamer 0:66f3b5499f7f 152 ('uvision', 'DISCO_F051R8'),
screamer 0:66f3b5499f7f 153 ('uvision', 'DISCO_F103RB'),
screamer 0:66f3b5499f7f 154 ('uvision', 'DISCO_F303VC'),
screamer 0:66f3b5499f7f 155 ('uvision', 'DISCO_L053C8'),
screamer 0:66f3b5499f7f 156 ('uvision', 'DISCO_F334C8'),
screamer 0:66f3b5499f7f 157 ('uvision', 'DISCO_F407VG'),
screamer 0:66f3b5499f7f 158 ('uvision', 'DISCO_F429ZI'),
screamer 0:66f3b5499f7f 159 ('uvision', 'DISCO_F746NG'),
screamer 0:66f3b5499f7f 160 ('uvision', 'DISCO_F469NI'),
screamer 0:66f3b5499f7f 161 ('uvision', 'DISCO_L476VG'),
screamer 0:66f3b5499f7f 162 ('uvision', 'MOTE_L152RC'),
screamer 0:66f3b5499f7f 163
screamer 0:66f3b5499f7f 164 ('lpcxpresso', 'LPC1768'),
screamer 0:66f3b5499f7f 165 ('lpcxpresso', 'LPC4088'),
screamer 0:66f3b5499f7f 166 ('lpcxpresso', 'LPC4088_DM'),
screamer 0:66f3b5499f7f 167 ('lpcxpresso', 'LPC1114'),
screamer 0:66f3b5499f7f 168 ('lpcxpresso', 'LPC11U35_401'),
screamer 0:66f3b5499f7f 169 ('lpcxpresso', 'LPC11U35_501'),
screamer 0:66f3b5499f7f 170 ('lpcxpresso', 'LPCCAPPUCCINO'),
screamer 0:66f3b5499f7f 171 ('lpcxpresso', 'LPC1549'),
screamer 0:66f3b5499f7f 172 ('lpcxpresso', 'LPC11U68'),
screamer 0:66f3b5499f7f 173
screamer 0:66f3b5499f7f 174 # Linux path: /home/emimon01/bin/gcc-arm/bin/
screamer 0:66f3b5499f7f 175 # Windows path: C:/arm-none-eabi-gcc-4_7/bin/
screamer 0:66f3b5499f7f 176 ('gcc_arm', 'LPC1768'),
screamer 0:66f3b5499f7f 177 ('gcc_arm', 'LPC4088_DM'),
screamer 0:66f3b5499f7f 178 ('gcc_arm', 'LPC1549'),
screamer 0:66f3b5499f7f 179 ('gcc_arm', 'LPC1114'),
screamer 0:66f3b5499f7f 180 ('gcc_arm', 'LPC11U35_401'),
screamer 0:66f3b5499f7f 181 ('gcc_arm', 'LPC11U35_501'),
screamer 0:66f3b5499f7f 182 ('gcc_arm', 'LPCCAPPUCCINO'),
screamer 0:66f3b5499f7f 183 ('gcc_arm', 'LPC2368'),
screamer 0:66f3b5499f7f 184 ('gcc_arm', 'LPC2460'),
screamer 0:66f3b5499f7f 185 ('gcc_arm', 'LPC824'),
screamer 0:66f3b5499f7f 186 ('gcc_arm', 'SSCI824'),
screamer 0:66f3b5499f7f 187
screamer 0:66f3b5499f7f 188 ('gcc_arm', 'B96B_F446VE'),
screamer 0:66f3b5499f7f 189 ('gcc_arm', 'STM32F407'),
screamer 0:66f3b5499f7f 190 ('gcc_arm', 'DISCO_F100RB'),
screamer 0:66f3b5499f7f 191 ('gcc_arm', 'DISCO_F051R8'),
screamer 0:66f3b5499f7f 192 ('gcc_arm', 'DISCO_F407VG'),
screamer 0:66f3b5499f7f 193 ('gcc_arm', 'DISCO_F303VC'),
screamer 0:66f3b5499f7f 194 ('gcc_arm', 'DISCO_L053C8'),
screamer 0:66f3b5499f7f 195 ('gcc_arm', 'DISCO_F334C8'),
screamer 0:66f3b5499f7f 196 ('gcc_arm', 'DISCO_L053C8'),
screamer 0:66f3b5499f7f 197 ('gcc_arm', 'DISCO_F429ZI'),
screamer 0:66f3b5499f7f 198 ('gcc_arm', 'DISCO_F746NG'),
screamer 0:66f3b5499f7f 199 ('gcc_arm', 'NUCLEO_F031K6'),
screamer 0:66f3b5499f7f 200 ('gcc_arm', 'NUCLEO_F042K6'),
screamer 0:66f3b5499f7f 201 ('gcc_arm', 'NRF51822'),
screamer 0:66f3b5499f7f 202 ('gcc_arm', 'RBLAB_BLENANO'),
screamer 0:66f3b5499f7f 203 ('gcc_arm', 'HRM1017'),
screamer 0:66f3b5499f7f 204 ('gcc_arm', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 205 ('gcc_arm', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 206 ('gcc_arm', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 207 ('gcc_arm', 'NUCLEO_F446RE'),
screamer 0:66f3b5499f7f 208 ('gcc_arm', 'ELMO_F411RE'),
screamer 0:66f3b5499f7f 209 ('gcc_arm', 'DISCO_F469NI'),
screamer 0:66f3b5499f7f 210 ('gcc_arm', 'NUCLEO_F334R8'),
screamer 0:66f3b5499f7f 211 ('gcc_arm', 'MAX32600MBED'),
screamer 0:66f3b5499f7f 212 ('gcc_arm', 'MTS_MDOT_F405RG'),
screamer 0:66f3b5499f7f 213 ('gcc_arm', 'MTS_MDOT_F411RE'),
screamer 0:66f3b5499f7f 214 ('gcc_arm', 'RZ_A1H'),
screamer 0:66f3b5499f7f 215 ('gcc_arm', 'MAXWSNENV'),
screamer 0:66f3b5499f7f 216 ('gcc_arm', 'MAX32600MBED'),
screamer 0:66f3b5499f7f 217 ('gcc_arm', 'ARCH_BLE'),
screamer 0:66f3b5499f7f 218 ('gcc_arm', 'ARCH_MAX'),
screamer 0:66f3b5499f7f 219 ('gcc_arm', 'ARCH_PRO'),
screamer 0:66f3b5499f7f 220 ('gcc_arm', 'DELTA_DFCM_NNN40'),
screamer 0:66f3b5499f7f 221 ('gcc_arm', 'K20D50M'),
screamer 0:66f3b5499f7f 222 ('gcc_arm', 'K22F'),
screamer 0:66f3b5499f7f 223 ('gcc_arm', 'K64F'),
screamer 0:66f3b5499f7f 224 ('gcc_arm', 'KL05Z'),
screamer 0:66f3b5499f7f 225 ('gcc_arm', 'KL25Z'),
screamer 0:66f3b5499f7f 226 ('gcc_arm', 'KL43Z'),
screamer 0:66f3b5499f7f 227 ('gcc_arm', 'KL46Z'),
screamer 0:66f3b5499f7f 228 ('gcc_arm', 'EFM32GG_STK3700'),
screamer 0:66f3b5499f7f 229 ('gcc_arm', 'EFM32LG_STK3600'),
screamer 0:66f3b5499f7f 230 ('gcc_arm', 'EFM32WG_STK3800'),
screamer 0:66f3b5499f7f 231 ('gcc_arm', 'EFM32ZG_STK3200'),
screamer 0:66f3b5499f7f 232 ('gcc_arm', 'EFM32HG_STK3400'),
screamer 0:66f3b5499f7f 233
screamer 0:66f3b5499f7f 234 ('ds5_5', 'LPC1768'),
screamer 0:66f3b5499f7f 235 ('ds5_5', 'LPC11U24'),
screamer 0:66f3b5499f7f 236 ('ds5_5', 'RZ_A1H'),
screamer 0:66f3b5499f7f 237
screamer 0:66f3b5499f7f 238 ('iar', 'LPC1768'),
screamer 0:66f3b5499f7f 239 ('iar', 'LPC4088_DM'),
screamer 0:66f3b5499f7f 240 ('iar', 'LPC1347'),
screamer 0:66f3b5499f7f 241
screamer 0:66f3b5499f7f 242 ('iar', 'B96B_F446VE'),
screamer 0:66f3b5499f7f 243 ('iar', 'NUCLEO_F030R8'),
screamer 0:66f3b5499f7f 244 ('iar', 'NUCLEO_F031K6'),
screamer 0:66f3b5499f7f 245 ('iar', 'NUCLEO_F042K6'),
screamer 0:66f3b5499f7f 246 ('iar', 'NUCLEO_F070RB'),
screamer 0:66f3b5499f7f 247 ('iar', 'NUCLEO_F072RB'),
screamer 0:66f3b5499f7f 248 ('iar', 'NUCLEO_F091RC'),
screamer 0:66f3b5499f7f 249 ('iar', 'NUCLEO_F302R8'),
screamer 0:66f3b5499f7f 250 ('iar', 'NUCLEO_F303K8'),
screamer 0:66f3b5499f7f 251 ('iar', 'NUCLEO_F303RE'),
screamer 0:66f3b5499f7f 252 ('iar', 'NUCLEO_F334R8'),
screamer 0:66f3b5499f7f 253 ('iar', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 254 ('iar', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 255 ('iar', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 256 ('iar', 'NUCLEO_F446RE'),
screamer 0:66f3b5499f7f 257 ('iar', 'NUCLEO_L053R8'),
screamer 0:66f3b5499f7f 258 ('iar', 'NUCLEO_L073RZ'),
screamer 0:66f3b5499f7f 259 ('iar', 'NUCLEO_L152RE'),
screamer 0:66f3b5499f7f 260 ('iar', 'NUCLEO_L476RG'),
screamer 0:66f3b5499f7f 261 ('iar', 'DISCO_L053C8'),
screamer 0:66f3b5499f7f 262 ('iar', 'DISCO_F334C8'),
screamer 0:66f3b5499f7f 263 ('iar', 'DISCO_F429ZI'),
screamer 0:66f3b5499f7f 264 ('iar', 'DISCO_F469NI'),
screamer 0:66f3b5499f7f 265 ('iar', 'DISCO_F746NG'),
screamer 0:66f3b5499f7f 266 ('iar', 'DISCO_L476VG'),
screamer 0:66f3b5499f7f 267 ('iar', 'STM32F407'),
screamer 0:66f3b5499f7f 268 ('iar', 'MTS_MDOT_F405RG'),
screamer 0:66f3b5499f7f 269 ('iar', 'MTS_MDOT_F411RE'),
screamer 0:66f3b5499f7f 270 ('iar', 'MAXWSNENV'),
screamer 0:66f3b5499f7f 271 ('iar', 'MAX32600MBED'),
screamer 0:66f3b5499f7f 272 ('iar', 'MOTE_L152RC'),
screamer 0:66f3b5499f7f 273 ('iar', 'RZ_A1H'),
screamer 0:66f3b5499f7f 274
screamer 0:66f3b5499f7f 275 # ('sw4stm32', 'DISCO_F051R8'),
screamer 0:66f3b5499f7f 276 # ('sw4stm32', 'DISCO_F100RB'),
screamer 0:66f3b5499f7f 277 ('sw4stm32', 'DISCO_F303VC'),
screamer 0:66f3b5499f7f 278 ('sw4stm32', 'DISCO_F334C8'),
screamer 0:66f3b5499f7f 279 # ('sw4stm32', 'DISCO_F401VC'),
screamer 0:66f3b5499f7f 280 ('sw4stm32', 'DISCO_F407VG'),
screamer 0:66f3b5499f7f 281 ('sw4stm32', 'DISCO_F429ZI'),
screamer 0:66f3b5499f7f 282 ('sw4stm32', 'DISCO_F469NI'),
screamer 0:66f3b5499f7f 283 ('sw4stm32', 'DISCO_F746NG'),
screamer 0:66f3b5499f7f 284 ('sw4stm32', 'DISCO_L053C8'),
screamer 0:66f3b5499f7f 285 ('sw4stm32', 'DISCO_L476VG'),
screamer 0:66f3b5499f7f 286 ('sw4stm32', 'NUCLEO_F030R8'),
screamer 0:66f3b5499f7f 287 ('sw4stm32', 'NUCLEO_F031K6'),
screamer 0:66f3b5499f7f 288 ('sw4stm32', 'NUCLEO_F042K6'),
screamer 0:66f3b5499f7f 289 ('sw4stm32', 'NUCLEO_F070RB'),
screamer 0:66f3b5499f7f 290 ('sw4stm32', 'NUCLEO_F072RB'),
screamer 0:66f3b5499f7f 291 ('sw4stm32', 'NUCLEO_F091RC'),
screamer 0:66f3b5499f7f 292 ('sw4stm32', 'NUCLEO_F103RB'),
screamer 0:66f3b5499f7f 293 ('sw4stm32', 'NUCLEO_F302R8'),
screamer 0:66f3b5499f7f 294 ('sw4stm32', 'NUCLEO_F303K8'),
screamer 0:66f3b5499f7f 295 ('sw4stm32', 'NUCLEO_F303RE'),
screamer 0:66f3b5499f7f 296 ('sw4stm32', 'NUCLEO_F334R8'),
screamer 0:66f3b5499f7f 297 ('sw4stm32', 'NUCLEO_F401RE'),
screamer 0:66f3b5499f7f 298 ('sw4stm32', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 299 ('sw4stm32', 'NUCLEO_F411RE'),
screamer 0:66f3b5499f7f 300 ('sw4stm32', 'NUCLEO_F446RE'),
screamer 0:66f3b5499f7f 301 ('sw4stm32', 'NUCLEO_L053R8'),
screamer 0:66f3b5499f7f 302 ('sw4stm32', 'NUCLEO_L073RZ'),
screamer 0:66f3b5499f7f 303 ('sw4stm32', 'NUCLEO_L152RE'),
screamer 0:66f3b5499f7f 304 ('sw4stm32', 'NUCLEO_L476RG'),
screamer 0:66f3b5499f7f 305 ('sw4stm32', 'NUCLEO_F031K6'),
screamer 0:66f3b5499f7f 306 ('sw4stm32', 'NUCLEO_F042K6'),
screamer 0:66f3b5499f7f 307 ('sw4stm32', 'NUCLEO_F303K8'),
screamer 0:66f3b5499f7f 308 ('sw4stm32', 'NUCLEO_F410RB'),
screamer 0:66f3b5499f7f 309 # Removed following item to avoid script error
screamer 0:66f3b5499f7f 310 #(None, None),
screamer 0:66f3b5499f7f 311 ]:
screamer 0:66f3b5499f7f 312 print '\n=== Exporting to "%s::%s" ===' % (toolchain, target)
screamer 0:66f3b5499f7f 313 test_export(toolchain, target)
screamer 0:66f3b5499f7f 314
screamer 0:66f3b5499f7f 315 print "\n=== Test error messages ==="
screamer 0:66f3b5499f7f 316 test_export('lpcxpresso', 'LPC11U24', expected_error='lpcxpresso')