你好!全部的
我正在尝试编译我的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 compila
tion 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);
}
/* [ ] */