Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- In altera_avalon_tse.h try changing the# define for ALTERA_CHECKLINK_TIMEOUT_THRESHOLD to 5000000 I think perhaps it's timing out before it negotiates? You can also try increasing the other timeouts in this header file (in the same location of the file). Bill --- Quote End --- I too would like to change the# define to something smaller so my code will not hang so long without a cable attached. Later on in the code, I will periodically jump into tse_mac_init() to negotiate the link and initialize properly instead of blocking in a while loop at the beginning. The problem is the# define is buried in the altera source libraries. This is not a problem if the change is only on my machine, but in my work environment where we're doing configuration management, others have to be able to rebuild the project without modifying their owen altera libraries. I've tried defining ALTERA_CHECKLINK_TIMEOUT_THRESHOLD 250000 as a symbol in the Properties/C++ Build / Tool Settings / NIOS II Compiler / Preprocessor GUI, hoping it would override the value in altera_avalon_tse.h. This didn't work. I tried a# undef in one of my local project source files but that didnt' work either. I suppose I could make a local copy of altera_avalon_tse.c & .h in my local project folder and modify as needed. I was just hoping there was some simple pre-processor "override" capability I was missing. Any tips to modify this# define without touching the original source and not make a local copy of altera_avalon_tse.c & .h?