Forum Discussion
Altera_Forum
Honored Contributor
14 years agoRats. I suppose that would have been too easy... Will keep working on that with the hardware guy.
I do have another interesting issue. If I run the SSS under the debugger, the system initializes fine (find the PHY, negotiates GigE speed, etc). However, if I download and run without the debugger it never gets in to tse_mac_init, nor does it create any tasks or say 'prepped 1 interface, initializing...' as it does when I run in the debugger and do breakpoints and such (log of that available if anyone cares. I won't attach it unless someone wants to see it). (It does get in to prep_tse_mac, and it does figure out my MAC address (which I will admit to having hacked (hard-coded) a temporary mac address into)) Quality time in debugger: I set my first breakpoint at tcpport.c line 60 (which says ' e = nptcp_init(); /* call the NetPort init in nptcp.c */'), load the elf for SSS (using 'nios2-download --tcpport 2323 sss.elf'), connect with debugger once download done, and then say 'continue'. It stops there (line 60), and then I say 'next' until I get to 'allports.c' line 402. At that point, I've succeeded in finding the PHY! Is there some sort of minimum time between loading the elf and letting it run that I need to obey??? If anyone has seen any of this and/or has any ideas I'd appreciate hearing them! Thanks again! Rusty (By the way - for anyone else trying to debug the TSE - beware! If you try to single step line 213 of altera_avalon_sgdma.c which says: /* wait for the descriptor (chain) to complete */ while ( (IORD_ALTERA_AVALON_SGDMA_STATUS(dev->base) & ALTERA_AVALON_SGDMA_STATUS_BUSY_MSK) ) ; Note that you WILL lock up your gdb session until that while terminates. Should the chain never complete your debugger is frozen and you have to kill the download process to get it back. Just consider it a feature, not a bug, since I've just documented it! ;-)