STM32F10x_StdPeriph_Lib_V3.5.0在Keil上编译遇到的问题总结

【1】出warning: #223-D: function "assert_param" declared implicitly

解决方法很简单,MDK的在工程上点右键,选择options,选择C/C++选项,在defined的框里填上USE_STDPERIPH_DRIVER就可以了。

还要根据自己所用芯片在defined填上如STM32F10X_HD,这样就编译就不会出错了。

stm32f10x芯片分类表
STM32F10X_LD STM32F10X_MD STM32F10X_HD STM32F10X_CL
CPU型号 STM32F101xx

STM32F102xx

STM32F103xx

STM32F101xx

STM32F102xx

STM32F103xx

STM32F101xx

STM32F103xx

STM32F105xx

STM32F107xx

flash大小 16 ~ 32 Kbytes 64 ~ 128 Kbytes 256 ~ 512 Kbytes 所有flash大小
LD == Low Density

HD == High Density

CL == Connective Line

【2】在汇编代码中/× ×/这样的C语言注释符号,keil不认识,报错, 怎么办

报错形式:error: A1167E: Invalid line start

MDK的在工程上点右键,选择options,选择Asm选项,在Misc Controls框框中输入 --cpreproc

意思所在汇编armasm编译汇编代码之前先用armcc将代码中C注释预编译掉

参考:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.kui0100a/armasm_chdhcfgd.htm

【3】error: A1137E: Unexpected characters at end of line

This is given when extra characters that are not part of an instruction are found on an instruction line.

For example:
ADD r0, r0, r1 comment

Can be changed to:
ADD r0, r0, r1 ; comment

参考:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0496c/CACHCBBJ.html





你可能感兴趣的:(嵌入式)