Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用 zephyrproject.org 为 STM32 arm-none-eabi 进行交叉编译。Zephyr-nostdinc为每个 C/C++ 文件添加标志。如果不修复构建系统源,我找不到如何覆盖它。
-nostdinc
-stdinc
您可以找出默认包含目录是什么,并使用-I选项将它们添加回来。
-I
此信息来自 gcc 的手册页
目录搜索 选项 这些选项指定了搜索头文件、库和编译器部分的目录:
-I dir -iquote dir -isystem dir -idirafter dir
@kyb 我遇到了同样的问题,最终找到了 Zephyr 的正确解决方案:
只需添加CONFIG_NEWLIB_LIBC=y到您的prj.conf文件!
CONFIG_NEWLIB_LIBC=y
prj.conf