File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,27 @@ function(mbed_generate_map_file target)
194
194
endfunction ()
195
195
196
196
#
197
- # Generate executables
197
+ # Validate selected application profile.
198
198
#
199
- function (mbed_generate_executable target )
199
+ function (mbed_validate_application_profile target )
200
+ get_target_property (app_link_libraries ${target} LINK_LIBRARIES )
201
+ string (FIND ${app_link_libraries} "mbed-baremetal" string_found_position )
202
+ if (${string_found_position} GREATER_EQUAL 0 )
203
+ if (NOT "bare-metal" IN_LIST MBED_TARGET_SUPPORTED_APPLICATION_PROFILES )
204
+ message (FATAL_ERROR
205
+ "Use full profile as baremetal profile is not supported for this Mbed target" )
206
+ endif ()
207
+ elseif (NOT "full" IN_LIST MBED_TARGET_SUPPORTED_APPLICATION_PROFILES )
208
+ message (FATAL_ERROR
209
+ "The full profile is not supported for this Mbed target" )
210
+ endif ()
211
+ endfunction ()
212
+
213
+ #
214
+ # Set post build operations
215
+ #
216
+ function (mbed_set_post_build target )
217
+ mbed_validate_application_profile (${target} )
200
218
mbed_generate_bin_hex (${target} )
201
219
mbed_generate_map_file (${target} )
202
220
endfunction ()
You can’t perform that action at this time.
0 commit comments