我想使用命令Xhwicap_cfginitialize初始化Xhwicap,但是当到达汇编代码中的某些特定地址时,它会意外停止调试。
*************************************************** ********************************* /
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;
}
/ ************************************************** ********************************** / / ** * 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 训练 博客 关于 * /