使用a库时,需要在项目属性C/C++选项卡里面的Misc Controls中添加--wchar32选项,才能编译通过,否则会报ble_hello_sensor_CM7\ble_hello_sensor_CM7.axf: Error: L6242E: Cannot link object btm_ble_privacy.o as its attributes are incompatible with the image attributes. ... wchart-16 clashes with wchart-32.的错误。 如果用的是ar库,那就可以直接使用,不用加--wchar32选项。