From: Jon A. Cruz Date: Sat, 21 Mar 2015 01:22:47 +0000 (-0700) Subject: Fixed Arduino config setup when 'ALL' is selected as a transport. X-Git-Tag: 0.9.1-alpha1~38^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=731425aebad6d00bf58f2f009bf743ce4d52b06a;p=contrib%2Fiotivity.git Fixed Arduino config setup when 'ALL' is selected as a transport. Arduino scons config was only structured to handle one transport as a time, and would fail to configure needed lib imports when 'ALL' was the selected transport. This change removes the choice of 'ALL' when Arduino is the selected OS. It also will log an error and stop the build when more than a single transport is selected for Arduino builds. This is mainly until resources permit testing of the code on hardware configurations with multiple transport shields attached. Change-Id: I9da97df1db696904581eaccbbbc519b291b0b3ed Signed-off-by: Jon A. Cruz Reviewed-on: https://gerrit.iotivity.org/gerrit/507 Tested-by: jenkins-iotivity Reviewed-by: Joseph Morrow Reviewed-by: Ashok Babu Channa Reviewed-by: Patrick Lankswert --- diff --git a/build_common/SConscript b/build_common/SConscript index 8de3072..15f97de 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -53,10 +53,17 @@ require_upload = ARGUMENTS.get('UPLOAD', False) ###################################################################### # Common build options (release, target os, target arch) ###################################################################### +targets_disallow_multitransport = ['arduino'] + help_vars = Variables() help_vars.Add(BoolVariable('RELEASE', 'Build for release?', True)) # set to 'no', 'false' or 0 for debug help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map[host])) -help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'WIFI', 'BT', 'BLE', 'ETHERNET'])) + +if target_os in targets_disallow_multitransport: + help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ETHERNET', ['WIFI', 'BT', 'BLE', 'ETHERNET'])) +else: + help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'WIFI', 'BT', 'BLE', 'ETHERNET'])) + help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os])) help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1'))) help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1'))) diff --git a/resource/csdk/connectivity/SConscript b/resource/csdk/connectivity/SConscript index a67c39c..4668011 100644 --- a/resource/csdk/connectivity/SConscript +++ b/resource/csdk/connectivity/SConscript @@ -10,6 +10,14 @@ transport = env.get('TARGET_TRANSPORT') print "Given Transport is %s" % transport print "Given OS is %s" % target_os +targets_disallow_multitransport = ['arduino'] + +if target_os in targets_disallow_multitransport: + if ('ALL' in transport) or (len(transport) != 1): + print "*** Error invalid option values: TARGET_TRANSPORT" + print "%s disallowed until testing can validate use of multiple transports on %s %d" % (transport, target_os, len(transport)) + Exit(1) + if 'ALL' in transport: if target_os == 'linux': env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'ETHERNET_ADAPTER','NO_EDR_ADAPTER','NO_LE_ADAPTER'])