问题:
在u-boot-1.1.6-2008R1/include/configs/bf561-ezkit.h中有类似这样的语句:
#if
(CONFIG_COMMANDS & CFG_CMD_KGDB)
#define
CFG_CBSIZE 1024 /* Console I/O Buffer Size */
#else
#define
CFG_CBSIZE 256 /* Console I/O Buffer Size */
#endif
这样的语句在汇编器中是无法通过的,但是在C编译器中则没有问题。在汇编器中引用时会产生这样的错误:
[Error pp0063] "../../include/configs/bf561-ezkit.h":160 Bad number format
帮助中对pp0063的解释是:
pp0063
Preprocessor Error: Bad number format
Description
The preprocessor evaluated an expression with an invalid numeric base in the context of a #if directive.
Severity
Error
Example
#if 01ux
#endif
[Error pp0063] "error63.c":5 Bad number format
How to Fix
Correct the expression to ensure that it has a valid number.
主要的原因是u-boot将每一个命令都用一个8个字节的整数来表示,而vdsp5的汇编器却不支持8个字节的整数运算,也不支持其定义,如
#define
CFG_CMD_EXT2 0x1000000000000000ULL /* EXT2 Support */
所以就出现ERROR。
解决方法:
查找CFG_CBSIZE时并没有发现在.s文件中有对它的引用,因此可以直接改为:
#ifndef
__ASSEMBLY__
#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
#else
#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
#endif
#endif
以此相类似的还有
#if (CONFIG_COMMANDS & CFG_CMD_NET)