使用Hwicap的初始化问题

时间:2019-02-01 19:04:10

标签: c#

我想使用命令Xhwicap_cfginitialize初始化Xhwicap,但是当到达汇编代码中的某些特定地址时,它会意外停止调试。

*************************************************** ********************************* /

ifndef TESTAPP_GEN

int main(void) {     int状态; <​​/ p>

/*
 * Run the HwIcap Example, specify the Device ID generated in
 * xparameters.h
 */
Status = HwIcapTestAppExample(HWICAP_DEVICE_ID);
if (Status != XST_SUCCESS) {
    xil_printf("Hwicap testapp Example Failed\r\n");
    return XST_FAILURE;
}

xil_printf("Successfully ran Hwicap testapp Example\r\n");
return XST_SUCCESS;

}

endif

/ ************************************************** ********************************** / / ** * int HwIcapTestAppExample(u16 HwIcapDeviceId) {     int状态; <​​/ p>

XHwIcap_Config *ConfigPtr;
u32 ConfigRegData;

/*
 * Initialize the HwIcap driver.
 */
ConfigPtr = XHwIcap_LookupConfig(HwIcapDeviceId);
if (ConfigPtr == NULL) {
    return XST_FAILURE;
}

Status = XHwIcap_CfgInitialize(&HwIcap, ConfigPtr,
            ConfigPtr->BaseAddress);
if (Status != XST_SUCCESS) {
    print("initialization failed");
    return XST_FAILURE;
}


/*
 * Perform a self-test to ensure that the hardware was built correctly.
 */
Status = XHwIcap_SelfTest(&HwIcap);
if (Status != XST_SUCCESS) {
    return XST_FAILURE;
}


/*
 * Read the ID Code register inside the FPGA.
 */
Status = XHwIcap_GetConfigReg(&HwIcap, XHI_IDCODE, &ConfigRegData);
if (Status != XST_SUCCESS) {
    return XST_FAILURE;
}


return XST_SUCCESS;

} / *©2019 GitHub,Inc. 条款 隐私 安全 状态 救命 联系GitHub 价钱 API 训练 博客 关于 * /

0 个答案:

没有答案