Skip to content

Instantly share code, notes, and snippets.

@tiantian1645
Created February 1, 2023 01:58
Show Gist options
  • Save tiantian1645/356fd514ae50e2faa1f4be79f14c8a5b to your computer and use it in GitHub Desktop.
Save tiantian1645/356fd514ae50e2faa1f4be79f14c8a5b to your computer and use it in GitHub Desktop.
embedded-studio 导入 STM32CubeIDE FreeRTOS 项目

使能 configUSE_NEWLIB_REENTRANT 的情况下

  1. Code->Linker->Additional Input Files 需要增加对应的 libc_nano.a 文件 比如 STM32F103 需要 D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\arm-none-eabi\lib\thumb\v7-m\nofp\libc_nano.a 具体在STM32CubeIDE 生成的 map文件中可以看到
  2. Code->Preprocessor->User Include Directories 中增加 头文件路径 D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\arm-none-eabi\include D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\arm-none-eabi\include\newlib-nano D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\lib\gcc\arm-none-eabi\10.3.1\include D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\arm-none-eabi\include\sys D:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\lib\gcc\arm-none-eabi\10.3.1\include-fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment