Browse Source

Adds support for the Newlib-Nano Standard Library

- For MCUs with very little flash, the Nano library is more suitable.
- This change supports building with the GCC nano stdlib, simply by
  linking STM32::Nano library in cmake.
Clemens Zangl 5 năm trước cách đây
mục cha
commit
d16a54b685
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      cmake/stm32/common.cmake

+ 6 - 0
cmake/stm32/common.cmake

@@ -230,6 +230,12 @@ if(NOT (TARGET STM32::NoSys))
     target_link_options(STM32::NoSys INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nosys.specs>)
 endif()
 
+if(NOT (TARGET STM32::Nano))
+    add_library(STM32::Nano INTERFACE IMPORTED)
+    target_compile_options(STM32::Nano INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nano.specs>)
+    target_link_options(STM32::Nano INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nano.specs>)
+endif()
+
 include(stm32/utilities)
 include(stm32/f0)
 include(stm32/f1)