petalinux 2014.2
freertos 1.00.b (AMP)
lwip140 ver 2.1
Zedboard rev C
I have setup Linux to run on core0 and FreeRTOS on core1.
Ethernet on eth0 works in Linux. It also work in FreeRTOS 1_02_a (not AMP) when FreeRTOS runs on core0 without Linux.
I start by booting up Linux with ethernet enabled, then use remoteproc to fire up FreeRTOS.
FreeRTOS configures lwip, but cannot detect PHY. Still, it continues and is able to autonegotiate speed. I can see that the LED on the port goes down, then up.
NOTE: I had to change:
#define PHY_DETECT_REG 1
to
#define PHY_DETECT_REG 0
to make the autonegotiate to work. Have no idea why.
The debug log from lwip is at the bottom.
At the end both FreeRTOS and Linux hangs. Well, FreeRTOS is probably waiting for a connection (ping), but Linux just hangs. Pinging does not work.
I have also tried to disable Ethernet before starting FreeRTOS. I tried:
ifconfig eth0 down --> then start FreeRTOS
unbind ethernet driver --> then start FreeRTOS
remove eth from dts --> then start FreeRTOS
remove eth driver from kernel --> then start FreeRTOS
For all of the above FrreeRTOS cannot autonegotiate.
My question is: How can I make ethernet0 available to the FreeRTOS, but not to Linux?????
IP setup
netif_set_ipaddr: netif address being changed
netif: IP address of interface set to 10.0.0.3
netif: netmask of interface set to 255.255.255.0
netif: GW address of interface set to 10.0.0.2
XEmacPs detect_phy: No PHY detected. Assuming a PHY at address 0
Start PHY autonegotiation
Waiting for PHY to complete autonegotiation.
autonegotiation complete
link speed: 1000
RxRingPtr: 0x0002aa58
TxRingPtr: 0x0002aa14
rx_bdspace: 0x01100000
tx_bdspace: 0x01110000
netif: added interface te IP addr 10.0.0.3 netmask 255.255.255.0 gw 10.0.0.2
netif: setting default interface te
creating xemacif_input_thread
created xemacif_input_thread
tcpip_thread: API message 0xa30954
tcpip_thread: API message 0xa30954
tcp_bind: bind to port 7
tcpip_thread: API message 0xa3095c