Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

IP initialization problem

LeninReborn
Beginner
265 Views
Hello to all.

Wrote an application to exchange packets between FPGA and PC using TCP / IP NicheStack. FPGA is using Cyclone III and the whole program runs from external SRAM. The project starts successfully when loaded via JTAG. The problem appears when the application is copied from flash memory to external memory and starts working from it.

IP address initialization error




MAC post-initialization: MD _CONFIG=0x04000203
[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created
IP INIT ERROR: can't alloc route table
ip
exit: calling func 0x222eac
netclose: closing iface Altera TSE MAC ethernet
ip_exit: calling func 0x22ae64
inet startup error: unable to initialize IP
panic: IP
dtrap-1.
[alt_exit.c] Calling ALT_OS_ STOP()
[alt_exit.c] Calling ALT_SIM_HALT ()
needs breakpoint
ip_exit: calling func exe
lip_exit: calling func exe
[alt exit. c] Spinning forever



Refers to the fact that I could not allocate memory from the ip.c file




#ifdef IP_ROUTING 

/* alloc space for the route table */ 

rt_mib = (struct RtMib*)RT_ALLOC(ipRoutes * sizeof(struct RtMib)); 

if (!rt_mib) 

# ifdef NPDEBUG 

dprintf("IP_INIT ERROR: can't alloc route table\n"); 

# endif /* NPDEBUG */ 

return(ENP_NOMEM); 
}




How to increase the amount of memory and from what memory is allocated for initialization?
0 Kudos
1 Reply
Lenin_Reborn
Beginner
238 Views
Found an error due to which memory was not allocated.

Everything boots successfully now. There is just one problem. Nios will only start if you run nios2-terminal. Doesn't work without a terminal. What could be the reason?
Reply