思路一:Options for Target -->BL51 Misc -->disable warning -->输入260 (告警的编号) 编译出现了这样的一个错误;*** FATAL ERROR L227: PARAMETER OUT OF RANGE delay.obj, flash.obj TO UART0Test0 RAMSIZE (256) DISABLEWARNING (260)# 原来程序都可以正常运行,我故意弄个警告而已,想让这个警告不出现。现在到多出了新的错误。问高手解决方案 Keil BL51 Misc Disable Warning Numbers Enter a comma-separated list of warning numbers to disable. Use Linker Control File Enables the linker control file.
网上参考:KEIL 7.50,如何关闭指定编号的警告?没有实现预期效果。keil帮助也没有解决问题
思路二:用#pragma warning(disable:260)也没有达到效果。到增加了新的警告问题。 MAIN.C(16): warning C285: DISABLE:260 #pragma The #pragma directive specifies compiler directives that may change during program compilation.
#pragma directive « directive ... » Basically, you place pragmas in your program source code where you want the directive(s) to take effect. Refer to the Cx51 Compiler Directives for a complete list of directives you may specify using #pragma.
上面的描述看不太懂。 VC/C和keil当中有不同。还请哪位高手指教呀。 |