尝试把原有的stm32工程F1canBootloader用cmake来管理,遇到了以下几个坑:
1. 报错,undefined reference to `__dso_handle'。
CMakeFiles/app.elf.dir/home/chenxx/engineering/stmproj/F1canBootLoader/iap/uartIapDevice.cpp.obj:
In function `__static_initialization_and_destruction_0(int, int)':
uartIapDevice.cpp:(.text+0x5dc): undefined reference to `__dso_handle'
/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/ld: app.elf: hidden symbol `__dso_handle' isn't defined
/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
实际情况是根本没有起名为__dso_handle的函数。后来经查询是g