编译环境
- Win10 64位
- Keil MDK 5.30
- ART-Pi 开发板:STM32H750XBH6开发板
- 工程:最小RT-Thread 系统,版本:RT-Thread v4.1.0 released
问题描述
Build started: Project: project
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'rt-thread'
compiling main.c...
linking...
.\build\rt-thread.axf: Error: L6218E: Undefined symbol _nextafter (referred from nextafter.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\build\rt-thread.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:05
解决方法
- 通过对比编译正常的工程,发现这个问题报的是 lib库的问题,原来Keil MDK5开了 【Use MicroLIB】的选项

2022-04-03_220258.png
- 解决方法就是去掉这个选项,不使用【Use MicroLIB】

2022-04-03_215724.png
- 编译问题解决
小结
- 如果使用操作系统,Keil MDK5 可以不使用MicroLIB,而是使用操作系统自身的Lib,如NewLib,LibC等
- 遇到问题反复对比,验证,找到解决问题的有效方法