Просмотр исходного кода

stm32: common: Add comments to the 'stm32_print_size_of_target'

Alexander Voronov 3 лет назад
Родитель
Сommit
b29da0d6ff
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      cmake/stm32/common.cmake

+ 3 - 0
cmake/stm32/common.cmake

@@ -54,6 +54,9 @@ find_program(CMAKE_SIZE NAMES ${STM32_TARGET_TRIPLET}-size HINTS ${TOOLCHAIN_BIN
 find_program(CMAKE_DEBUGGER NAMES ${STM32_TARGET_TRIPLET}-gdb HINTS ${TOOLCHAIN_BIN_PATH})
 find_program(CMAKE_CPPFILT NAMES ${STM32_TARGET_TRIPLET}-c++filt HINTS ${TOOLCHAIN_BIN_PATH})
 
+# This function adds a target with name '${TARGET}_always_display_size'. The new
+# target builds a TARGET and then calls the program defined in CMAKE_SIZE to
+# display the size of the final ELF.
 function(stm32_print_size_of_target TARGET)
     add_custom_target(${TARGET}_always_display_size
         ALL COMMAND ${CMAKE_SIZE} "$<TARGET_FILE:${TARGET}>"