File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ function(mbed_generate_map_file target)
185
185
TARGET
186
186
${target}
187
187
POST_BUILD
188
- COMMAND ${Python3_EXECUTABLE} ${MBED_ROOT} /tools/memap.py -t ${MBED_TOOLCHAIN} -d 4 ${CMAKE_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX}.map
188
+ COMMAND ${Python3_EXECUTABLE} ${MBED_ROOT} /tools/memap.py -t ${MBED_TOOLCHAIN} ${CMAKE_BINARY_DIR} /${target}${CMAKE_EXECUTABLE_SUFFIX}.map
189
189
WORKING_DIRECTORY
190
190
${CMAKE_BINARY_DIR}
191
191
COMMENT
@@ -194,9 +194,28 @@ 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 (REGEX MATCH "mbed-baremetal"
202
+ output_string ${app_link_libraries} )
203
+ if (${output_string} STREQUAL "mbed-baremetal" )
204
+ if (NOT "bare-metal" IN_LIST MBED_TARGET_SUPPORTED_APPLICATION_PROFILES )
205
+ message (FATAL_ERROR
206
+ "Use full profile as baremetal profile is not supported for this Mbed target" )
207
+ endif ()
208
+ elseif (NOT "full" IN_LIST MBED_TARGET_SUPPORTED_APPLICATION_PROFILES )
209
+ message (FATAL_ERROR
210
+ "The full profile is not supported for this Mbed target" )
211
+ endif ()
212
+ endfunction ()
213
+
214
+ #
215
+ # Prepare post target build step
216
+ #
217
+ function (mbed_post_target_build target )
218
+ mbed_validate_application_profile (${target} )
200
219
mbed_generate_bin_hex (${target} )
201
220
mbed_generate_map_file (${target} )
202
221
endfunction ()
You can’t perform that action at this time.
0 commit comments