فهرست منبع

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 سال پیش
والد
کامیت
d16a54b685
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  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>)
     target_link_options(STM32::NoSys INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nosys.specs>)
 endif()
 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/utilities)
 include(stm32/f0)
 include(stm32/f0)
 include(stm32/f1)
 include(stm32/f1)