Keywords: XIo_Dcr , XPAR_XIO_DCR_TEXT_SPACE, DOCM, IOCM, Processor IP
When I use the mfdcr macro, the program works. When I use the XIo_DcrIn function, an illegal instruction exception occurs.
When running the XIo_Dcr functions from OCM, the "XPAR_XIO_DCR_TEXT_SPACE" flag needs to be set in the compiler's command line. The system appears to have DOCM and IOCM. If this true, when the project is compiled, there needs to be a flag defined on the compiler command line for the libraries. The flag is "XPAR_XIO_DCR_TEXT_SPACE". By default, the driver constructs the function table in the data area of the code image. Defining the above flag forces the compiler to construct the function table in text space and since the memory space is split in the OCM system, this flag is required.