u16 sdram_gImage_shuidi[2000] __attribute__((at(LCD_FRAME_BUF_ADDR+1536000))); //定义最大屏分辨率时,LCD所需的帧缓存数组大小
sdram_gImage_shuidi[0]=0xaa;
sdram_gImage_shuidi[2]=0xbb;
sdram_gImage_shuidi[4]=0xcc;
sdram_gImage_shuidi[6]=0xee;
以上是我在SDRAM里面定义了一个数组,然后往数组里面填数据,但是这样就编译通不过,错误如下,请教下 这个是什么原因呢
..HARDWARELCDltdc.c(29): error: #94-D: the size of an array must be greater than zero
sdram_gImage_shuidi[0]=0xaa;
..HARDWARELCDltdc.c(29): error: #77-D: this declaration has no storage class or type specifier
sdram_gImage_shuidi[0]=0xaa;
..HARDWARELCDltdc.c(29): error: #147: declaration is incompatible with "u16 sdram_gImage_shuidi[2000]" (declared at line 28)
sdram_gImage_shuidi[0]=0xaa;
..HARDWARELCDltdc.c(29): warning: #520-D: initialization with "{...}" expected for aggregate object
sdram_gImage_shuidi[0]=0xaa;
..HARDWARELCDltdc.c(30): error: #77-D: this declaration has no storage class or type specifier
sdram_gImage_shuidi[2]=0xbb;
..HARDWARELCDltdc.c(30): error: #147: declaration is incompatible with "u16 sdram_gImage_shuidi[2000]" (declared at line 29)
sdram_gImage_shuidi[2]=0xbb;
..HARDWARELCDltdc.c(30): error: #148: variable "sdram_gImage_shuidi" has already been initialized
sdram_gImage_shuidi[2]=0xbb;
..HARDWARELCDltdc.c(30): warning: #520-D: initialization with "{...}" expected for aggregate object
sdram_gImage_shuidi[2]=0xbb;
..HARDWARELCDltdc.c(31): error: #77-D: this declaration has no storage class or type specifier
sdram_gImage_shuidi[4]=0xcc;
..HARDWARELCDltdc.c(31): error: #147: declaration is incompatible with "u16 sdram_gImage_shuidi[2000]" (declared at line 29)
sdram_gImage_shuidi[4]=0xcc;
..HARDWARELCDltdc.c(31): error: #148: variable "sdram_gImage_shuidi" has already been initialized
sdram_gImage_shuidi[4]=0xcc;
..HARDWARELCDltdc.c(31): warning: #520-D: initialization with "{...}" expected for aggregate object
sdram_gImage_shuidi[4]=0xcc;
..HARDWARELCDltdc.c(32): error: #77-D: this declaration has no storage class or type specifier
sdram_gImage_shuidi[6]=0xee;
..HARDWARELCDltdc.c(32): error: #147: declaration is incompatible with "u16 sdram_gImage_shuidi[2000]" (declared at line 29)
sdram_gImage_shuidi[6]=0xee;
..HARDWARELCDltdc.c(32): error: #148: variable "sdram_gImage_shuidi" has already been initialized
sdram_gImage_shuidi[6]=0xee;
..HARDWARELCDltdc.c(32): warning: #520-D: initialization with "{...}" expected for aggregate object
sdram_gImage_shuidi[6]=0xee;
一周热门 更多>