error: declaration may not appear after executable statement in block

在CCS中:


typedef struct {
  Uint32 gblctl;
  Uint32 cectl0;
  Uint32 cectl1;
  Uint32 cectl2;
  Uint32 cectl3;
  Uint32 sdctl;
  Uint32 sdtim;
  Uint32 sdext;
  Uint32 cesec0;
  Uint32 cesec1;
  Uint32 cesec2;
  Uint32 cesec3;
} EMIFA_Config;


void main()
{
*GPEN = 0x000026f0 ;
*GPDIR = 0x00002600 ;

   EMIFA_Config emifaCfg0 = {
0x000520C4,         /*  Global Control Reg. (GBLCTL)   */
    0x44148444,        /*  CE0 Space Control Reg. (CECTL0)   *///0x2172c523  //0x000520A4,
    0x2172c543,        /*  C1 Space Control Reg. (CECTL1)   */
    0xFFFFFF23,        /*  CE2 Space Control Reg. (CECTL2)   */
    0xFFFFFF23,        /*  CE3 Space Control Reg. (CECTL3)   */
    0x0348F000,        /*  SDRAM Control Reg.(SDCTL)   */
    0x005DC5DC,        /*  SDRAM Timing Reg.(SDTIM)   */
    0x00175F3F,        /*  SDRAM Extended Reg.(SDEXT)   */
    0x00000063,        /*  CE0 Space Secondary Control Reg. (CESEC0)  */
    0x00000063,        /*  CE1 Space Secondary Control Reg. (CESEC1)  */  //0x00000060
    0x00000002,        /*  CE2 Space Secondary Control Reg. (CESEC2)  */
    0x00000002         /*  CE3 Space Secondary Control Reg. (CESEC3)  */
};






}
好像是因为没有声明就开始使用EMIFA_Config这个变量了,该怎么解决呢? 大家可以集思广益!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值