console doesn't show IP address when using DHCP
-
- Member++
- Posts: 17
- Joined: Tue Jun 18, 2019 11:39 am
console doesn't show IP address when using DHCP
I'm working on a small project consisting sending/receiving data on Ethernet. so I wanted to study "Using XMOS TCP/IP Library for UDP-based Networking" example and run in on my Xcore 200. the problem when I run is the console doesn't show the IP address of my device, which I need to send data from my host PC.
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
Hi. The issue may be due to the example appnote was developed for an earlier kit than what you own. That is, the XCORE-200 (which is the latest kit) will feature different port names / mappings which may be throwing off the original TCP/IP code.
Please review and test the following updated version for XCORE-200 kit as the target:
https://www.xcore.com/viewtopic.php?t=4721
Please post your updates.
Please review and test the following updated version for XCORE-200 kit as the target:
https://www.xcore.com/viewtopic.php?t=4721
Please post your updates.
-
- Member++
- Posts: 17
- Joined: Tue Jun 18, 2019 11:39 am
Thank you and sorry for taking long to reply.mon2 wrote: ↑Thu Jul 11, 2019 2:19 pm Hi. The issue may be due to the example appnote was developed for an earlier kit than what you own. That is, the XCORE-200 (which is the latest kit) will feature different port names / mappings which may be throwing off the original TCP/IP code.
Please review and test the following updated version for XCORE-200 kit as the target:
https://www.xcore.com/viewtopic.php?t=4721
Please post your updates.
so the port mappings will be something like :
Code: Select all
rgmii_ports_t rgmii_ports = on tile[1]: RGMII_PORTS_INITIALIZER;
clock clk = on tile[0]: XS1_CLKBLK_1;
port p_smi_mdio = on tile[1]: XS1_PORT_1C;
port p_smi_mdc = on tile[1]: XS1_PORT_1D;
port p_eth_reset = on tile[1]: XS1_PORT_1N;
Code: Select all
int main(void) {
chan c_xtcp[1];
ethernet_cfg_if i_eth_cfg[NUM_CFG_CLIENTS];
ethernet_rx_if i_eth_rx[NUM_ETH_CLIENTS];
ethernet_tx_if i_eth_tx[NUM_ETH_CLIENTS];
streaming chan c_rgmii_cfg;
smi_if i_smi;
par {
// MII/ethernet driver
on tile[1]: rgmii_ethernet_mac(i_eth_rx, NUM_ETH_CLIENTS, i_eth_tx, NUM_ETH_CLIENTS,
null, null,
c_rgmii_cfg, rgmii_ports,
ETHERNET_DISABLE_SHAPER);
on tile[1].core[0]: rgmii_ethernet_mac_config(i_eth_cfg, NUM_CFG_CLIENTS, c_rgmii_cfg);
// SMI/ethernet phy driver
on tile[1].core[0]: ar8035_phy_driver(i_smi, i_eth_cfg[CFG_TO_PHY_DRIVER]);
on tile[1]: smi(i_smi, p_smi_mdio, p_smi_mdc);
// TCP component
on tile[1]: xtcp(c_xtcp, 1, null,
i_eth_cfg[0], i_eth_rx[0], i_eth_tx[0],
null, ETHERNET_SMI_PHY_ADDRESS,
null, otp_ports, ipconfig);
// The simple udp reflector thread
on tile[0]: udp_reflect(c_xtcp[0]);
}
return 0;
}
I tried to run this project (this), it works but it doesn't show any results (not even the IP configuration I've chosen).C:/Users/Mohammed/workspace/lib_xtcp/src/xtcp.xc: Error: Type of symbol `_Sxtcp_0' has mismatch with previous definition:
-
- Member++
- Posts: 17
- Joined: Tue Jun 18, 2019 11:39 am
update 1:
after cleaning the first code then rebuilding it again everything works just fine, but the console doesn't show any results just like the second code.
I'm not really sure if that is how it supposed to be with Ethernet RGMII interface, unlike the old Ethernet mapping, the console doesn't show the IP address or the IP chosen IP configuration.
update 2:
finally it worked out when I used the debugger instead, I don't know what's the difference, because when I run it as usual the console doesn't show anything.
after cleaning the first code then rebuilding it again everything works just fine, but the console doesn't show any results just like the second code.
I'm not really sure if that is how it supposed to be with Ethernet RGMII interface, unlike the old Ethernet mapping, the console doesn't show the IP address or the IP chosen IP configuration.
update 2:
finally it worked out when I used the debugger instead, I don't know what's the difference, because when I run it as usual the console doesn't show anything.