Forum Discussion
Altera_Forum
Honored Contributor
11 years agoTracked down the problem to the "io.h" include file. It has the following lines.
# ifndef SYSTEM_BUS_WIDTH # error SYSTEM_BUS_WIDTH undefined (this line is marked "error with text") # endif It later makes the following definitions. # define __IO_CALC_ADDRESS_NATIVE(BASE, REGNUM) ((void *)(((alt_u8*)BASE) + ((REGNUM) * (SYSTEM_BUS_WIDTH/8)))) # define IORD(BASE, REGNUM) __builtin_ldwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM))) # define IOWR(BASE, REGNUM, DATA) __builtin_stwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM)), (DATA)) The error I received after reloading in Eclipse is "Function '_builtin_stwio' could not be resolved. I have no idea where SYSTEM_BUS_WIDTH is defined.