Cypress技术william hill官网
直播中

潘琳

7年用户 180经验值
私信 关注
[问答]

使用Eclipse IDE编译错误

你好!全部的
我正在尝试编译我的GPIO(LodO/off)的例子。
但是,编译错误来了…
这里留言
----------------------------------------------------------------------------------------------------------------------------------------
在文件包括C: Cypress公司EZ-USB FX3 SDK 1.2固件 u3p_firmware 公司/ cyu3system。H:27:0,从/ sdtech。C:47:C: Cypress公司EZ-USB FX3 SDK 1.2固件 u3p_firmware 公司/ cyu3dma。H:738:16:错误:场锁“不完全型C: Cypress公司EZ-USB FX3 SDK 1.2固件 u3p_firmware 公司/ cyu3dma。H:739:16:错误:场“旗子”的不完全型C: Cypress公司EZ-USB FX3 SDK 1.2固件 u3p_firmware 公司/ cyu3dma。H:818:16:错误:现场“锁定”已不完全型C: Cypress公司EZ-USB FX3 SDK 1.2固件 u3p_firmware 公司/ cyu3dma。H:819:16:错误:场“旗子”不完全型:*** [ sdtech。错误1
----------------------------------------------------------------------------------------------------------------------------------------
DOE为什么会出现这样的错误?
注意,我正在使用SDK1.2,然后升级1.2.1。
-缺省源
#包括<;cyu3system。H & gt;#包括<;cyu3os。H & gt;#包括<;cyu3error。H & gt;#包括<;cyu3gpio。H & gt;#包括<;cyu3uart。H & gt;
int main(void){ cyu3piomatrixconfig_t io_cfg;cyu3preturnstatus_t状态= cy_u3p_success;
/*初始化设备* /状态= cyu3pdeviceinit(0);如果(状态!= CyuU3pIn成功){GOTO HANDLY-FATALL错误;}
*初始化缓存。同时启用指令和数据缓存。* /状态= cyu3pdevicecachecontrol(cytrue,cytrue,CyTrue);如果(状态!= cy_u3p_success){去handle_fatal_error;}
/*配置IO矩阵装置。在FX3地板,* COM端口连接到IO(53:56)。这意味着,无论是dq32模式应选择或lppmode应设置* uart_only。在这里,我们选择uart_only配置。* / cyu3pmemset((uint8_t *)&;io_cfg,0,sizeof(io_cfg));io_cfg.isdq32bit = cyfalse;io_cfg.useuart = cytrue;io_cfg.usei2c = cyfalse;io_cfg.usei2s = cyfalse;io_cfg.usespi = cyfalse;io_cfg.lppmode = cy_u3p_io_matrix_lpp_uart_only;io_cfg。gpiosimpleen [ 0 ] = 0;io_cfg。gpiosimpleen [ 1 ] =0;/ GPIOs 50、51、52作为复杂的GPIO。* / io_cfg。gpiocomplexen [ 0 ] = 0;io_cfg。gpiocomplexen [ 1 ] = 0x001c0000;状态= cyu3pdeviceconfigureiomatrix(&;io_cfg);如果(状态!= cy_u3p_success){去handle_fatal_error;}
/*这是初始化的RTOS内核* / cyu3pkernelentry非可回收的叫();
/ *假让编译器快乐* /返回0;
handle_fatal_error:/ *无法恢复的错误。* /(1);}
/*[]

以上来自于百度翻译


     以下为原文
  hi! all
    I´m trying to compile my Examples for GPIO(LEDon/off)
    but,a compilation error comes....
    here message
    ----------------------------------------------------------------------------------------------------------------------------------------
    in file included from C:CypressEZ-USB FX3 SDK1.2firmwareu3p_firmwareinc/cyu3system.h:27:0,
                  from ../sdtech.c:47:
C:CypressEZ-USB FX3 SDK1.2firmwareu3p_firmwareinc/cyu3dma.h:738:16: error: field 'lock' has incomplete type
C:CypressEZ-USB FX3 SDK1.2firmwareu3p_firmwareinc/cyu3dma.h:739:16: error: field 'flags' has incomplete type
C:CypressEZ-USB FX3 SDK1.2firmwareu3p_firmwareinc/cyu3dma.h:818:16: error: field 'lock' has incomplete type
C:CypressEZ-USB FX3 SDK1.2firmwareu3p_firmwareinc/cyu3dma.h:819:16: error: field 'flags' has incomplete type
cs-make: *** [sdtech.o] Error 1
    ----------------------------------------------------------------------------------------------------------------------------------------
    Doe get why this error?
    Note That i'm using SDK1.2 and then the 1.2.1 upgrade.
     - default source -
    #include
#include
#include
#include
#include
    int
main (void)
{
     CyU3PIoMatrixConfig_t io_cfg;
     CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
        /* Initialize the device */
     status = CyU3PDeviceInit (0);
     if (status != CY_U3P_SUCCESS)
     {
         goto handle_fatal_error;
     }
        /* Initialize the caches. Enable both Instruction and Data Caches. */
     status = CyU3PDeviceCacheControl (CyTrue, CyTrue, CyTrue);
     if (status != CY_U3P_SUCCESS)
     {
         goto handle_fatal_error;
     }
        /* Configure the IO matrix for the device. On the FX3 DVK board,
      * the COM port is connected to the IO(53:56). This means that
      * either DQ32 mode should be selected or lppMode should be set
      * to UART_ONLY. Here we are choosing UART_ONLY configuration. */
     CyU3PMemSet ((uint8_t *)&io_cfg, 0, sizeof(io_cfg));
     io_cfg.isDQ32Bit = CyFalse;
     io_cfg.useUart   = CyTrue;
     io_cfg.useI2C    = CyFalse;
     io_cfg.useI2S    = CyFalse;
     io_cfg.useSpi    = CyFalse;
     io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_UART_ONLY;
     io_cfg.gpioSimpleEn[0]  = 0;
     io_cfg.gpioSimpleEn[1]  = 0;
     /* GPIOs 50, 51 and 52 are used as complex GPIO. */
     io_cfg.gpioComplexEn[0] = 0;
     io_cfg.gpioComplexEn[1] = 0x001C0000;
     status = CyU3PDeviceConfigureIOMatrix (&io_cfg);
     if (status != CY_U3P_SUCCESS)
     {
         goto handle_fatal_error;
     }
        /* This is a non returnable call for initializing the RTOS kernel */
     CyU3PKernelEntry ();
        /* Dummy return to make the compiler happy */
     return 0;
    handle_fatal_error:
     /* Cannot recover from this error. */
     while (1);
}
    /* [ ] */
  

回帖(1)

王建华

2019-2-19 13:30:53
你好,
我真的不知道为什么它失败了,但你是混合使用的SDK发布版本1.2和版本1.2.1。
我建议你卸载SDK所有柏树组件,然后删除所有文件夹中你可以找到程序的组件,程序(x86)和C:柏树,然后安装最新版本的文件,你可以从1.2.1柏树的主页上下载。
HTTP://www. CyPress?COM/?RID=57990
然后删除<;project_name >;。SC文件在您的工作区(.metadata文件夹),它应该工作。在重新安装组件之前,您可以尝试一下。
当做,
隆皮

以上来自于百度翻译


     以下为原文
  Hi,
    I am not really sure why it fails, but you are using a mix of SDK release versions 1.2 and 1.2.1.
    I suggest you to uninstall all cypress components of the SDK, then delete all folders of the components you can find in programs, programms(x86) and c:cypress and then install the latest release files 1.2.1 which you can download from the cypress homepage.
    http://www.cypress.com/?rID=57990
    Then delete the .sc file in your workspace (.metadata folder) and it should work. You may just try this before re-installing the components.
    regards,
    lumpi
举报

更多回帖

发帖
×
20
完善资料,
赚取积分