@@ -1736,6 +1736,13 @@ def get_toolchain(self, toolchain=None):
1736
1736
error ("Please specify toolchain using the -t switch or set default toolchain using command \" mbed toolchain\" " , 1 )
1737
1737
return tchain
1738
1738
1739
+ def get_profile (self , profile = None ):
1740
+ if not profile :
1741
+ profile_cfg = self .get_cfg ('PROFILE' )
1742
+ if profile_cfg :
1743
+ profile = [profile_cfg ]
1744
+ return profile
1745
+
1739
1746
def set_defaults (self , target = None , toolchain = None ):
1740
1747
if target and not self .get_cfg ('TARGET' ):
1741
1748
self .set_cfg ('TARGET' , target )
@@ -2638,6 +2645,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2638
2645
target = program .get_target (target )
2639
2646
tchain = program .get_toolchain (toolchain )
2640
2647
macros = program .get_macros ()
2648
+ profile = program .get_profile (profile )
2641
2649
2642
2650
if compile_config :
2643
2651
# Compile configuration
@@ -3150,7 +3158,7 @@ def sterm(port=None, baudrate=None, echo=None, reset=False, sterm=True):
3150
3158
"Gets, sets or unsets mbed tool configuration options.\n "
3151
3159
"Options can be global (via the --global switch) or local (per program)\n "
3152
3160
"Global options are always overridden by local/program options.\n "
3153
- "Currently supported options: target, toolchain, protocol, depth, cache" ))
3161
+ "Currently supported options: target, toolchain, protocol, depth, cache, profile " ))
3154
3162
def config_ (var = None , value = None , global_cfg = False , unset = False , list_config = False ):
3155
3163
name = var
3156
3164
var = str (var ).upper ()
0 commit comments