蕾蕾 发表于 2013-4-17 14:15:53

KEIL编程溢出问题ERROR L107: ADDRESS SPACE OVERFLOW

我在C编程的时候老师碰到这种情况,当我定义以下语句,int dattemp=0;在Build的时候就会出现以下错误:*** ERROR L107: ADDRESS SPACE OVERFLOW。神奇的是,我不给他赋初值,就是写成int dattemp;他就没有错了。。。我头文件里边有下面这些typefef语句,不知道有没有影响。请各位指导指导!
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned char uchar;
typedef unsigned int uint;       

typedef unsigned char                uint8;/*8 bits */
typedef unsigned short int        uint16; /* 16 bits */
typedef unsigned long int        uint32; /* 32 bits */
typedef char                          int8;   /*8 bits */
typedef short int                int16;/* 16 bits */
typedef int                            int32;/* 32 bits */

qllaoda1 发表于 2013-4-17 14:21:50

可能你的代码里已经到临界值了,所以一点改动就造成溢出。
估计是你定义的变量太多,超过了系统的RAM限制。试试修改内存模式为large,当然这需要系统有XRAM,否则程序编译通过了也无法运行。

蕾蕾 发表于 2013-4-17 20:20:40

是啊,后来我发现问题了,就是将数组定义为xdata就可以了,谢谢你了哈

fhy-123 发表于 2013-4-18 11:10:45

学习了,有时编程超出限制很常见
页: [1]
查看完整版本: KEIL编程溢出问题ERROR L107: ADDRESS SPACE OVERFLOW