<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: A building project problem. in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354711#M16693</link>
    <description>&lt;P&gt;I have it included - /${ProjName}/phy.&lt;/P&gt;&lt;P&gt;I ported an example project from SDK - &lt;STRONG&gt;evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm4&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Checked - all paths like&amp;nbsp;/${ProjName}/... are present&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I build it I get some errors also related to LWIP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Description Resource Path Location Type&lt;BR /&gt;request for member 'autoNeg' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 82 C/C++ Problem&lt;BR /&gt;request for member 'mdioHandle' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 84 C/C++ Problem&lt;BR /&gt;request for member 'mdioHandle' in something not a structure or union enet_ethernetif_kinetis.c /MIMXRT1166_EVK_Project/lwip/port line 386 C/C++ Problem&lt;BR /&gt;request for member 'phyAddr' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 81 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_GetLinkSpeedDuplex' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 119 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_GetLinkStatus' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 102 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_Init' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 90 C/C++ Problem&lt;BR /&gt;unknown type name 'phy_config_t'; did you mean 'enet_config_t'? enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 74 C/C++ Problem&lt;/P&gt;&lt;P&gt;unknown type name 'phy_handle_t' enet_ethernetif.h /MIMXRT1166_EVK_Project/lwip/port line 89 C/C++ Problem&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;It's not my first project in MCUXpresso. I've build some projects in the past&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDKs.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158962i1EB000BDEF65FB13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDKs.png" alt="SDKs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; In MKV58F1M0xxx24 I also have LWIP and it compiles OK.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 07:33:35 GMT</pubDate>
    <dc:creator>john71</dc:creator>
    <dc:date>2021-10-13T07:33:35Z</dc:date>
    <item>
      <title>A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354167#M16675</link>
      <description>&lt;P&gt;I created a project in MCUXpresso IDE v11.4.1_6260. Then I exported a SDK for i.MX RT1160 MCU (SDK_2_10_0_MIMXRT1166xxxxx.zip).&lt;/P&gt;&lt;P&gt;Then I successfully build an empty project.&lt;/P&gt;&lt;P&gt;Now I try to work with LWIP library – Ethernet.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*******************************************************************************
 * Includes
 ******************************************************************************/

#include "lwip/opt.h"

#include "fsl_phy.h"

#include "lwip/apps/httpd.h"
#include "lwip/timeouts.h"
#include "lwip/init.h"
#include "netif/ethernet.h"
#include "enet_ethernetif.h"

#include "ksdk_mbedtls.h"

#include "fsl_phyksz8081.h"

#include "fsl_enet_mdio.h"
#include "fsl_gpio.h"
#include "fsl_iomuxc.h"
#include "fsl_cache.h"
#include "fsl_enet.h"

/*******************************************************************************
 * Definitions
 ******************************************************************************/

#define USE_100M_ENET_PORT  1

/*! @brief The ENET0 PHY address. */
#define BOARD_ENET0_PHY_ADDRESS (0x02U) /* Phy address of enet port 0. */

/*! @brief The ENET1 PHY address. */
#define BOARD_ENET1_PHY_ADDRESS (0x01U) /* Phy address of enet port 1. */

/* IP address configuration. */
#define configIP_ADDR0 192
#define configIP_ADDR1 168
#define configIP_ADDR2 0
#define configIP_ADDR3 102

/* Netmask configuration. */
#define configNET_MASK0 255
#define configNET_MASK1 255
#define configNET_MASK2 255
#define configNET_MASK3 0

/* Gateway address configuration. */
#define configGW_ADDR0 192
#define configGW_ADDR1 168
#define configGW_ADDR2 0
#define configGW_ADDR3 100

/* MAC address configuration. */
#define configMAC_ADDR {0x02, 0x12, 0x13, 0x10, 0x15, 0x11}

/* Address of PHY interface. */
#define EXAMPLE_PHY_ADDRESS BOARD_ENET0_PHY_ADDRESS
/* PHY operations. */
#define EXAMPLE_PHY_OPS phyksz8081_ops
/* ENET instance select. */
#define EXAMPLE_NETIF_INIT_FN ethernetif0_init

/* MDIO operations. */
#define EXAMPLE_MDIO_OPS enet_ops


/*******************************************************************************
 * Variables
 ******************************************************************************/

static mdio_handle_t mdioHandle = {.ops = &amp;amp;EXAMPLE_MDIO_OPS};
static phy_handle_t phyHandle   = {.phyAddr = EXAMPLE_PHY_ADDRESS, .mdioHandle = &amp;amp;mdioHandle, .ops = &amp;amp;EXAMPLE_PHY_OPS};

struct netif netif;
int ret;

ip4_addr_t netif_ipaddr, netif_netmask, netif_gw;

ethernetif_config_t enet_config = {
        .phyHandle  = &amp;amp;phyHandle,
        .macAddress = configMAC_ADDR,
    };

gpio_pin_config_t gpio_config = {kGPIO_DigitalOutput, 0, kGPIO_NoIntmode};


/*******************************************************************************
 * Functions
 ******************************************************************************/

static inline void BOARD_InitModuleClock(void)
{
    const clock_sys_pll1_config_t sysPll1Config = {
        .pllDiv2En = true,
    };
    CLOCK_InitSysPll1(&amp;amp;sysPll1Config);

#if USE_100M_ENET_PORT
    clock_root_config_t rootCfg = {.mux = 4, .div = 10}; /* Generate 50M root clock. */
    CLOCK_SetRootClock(kCLOCK_Root_Enet1, &amp;amp;rootCfg);
#else
    clock_root_config_t rootCfg = {.mux = 4, .div = 4}; /* Generate 125M root clock. */
    CLOCK_SetRootClock(kCLOCK_Root_Enet2, &amp;amp;rootCfg);
#endif

    /* Select syspll2pfd3, 528*18/24 = 396M */
    CLOCK_InitPfd(kCLOCK_PllSys2, kCLOCK_Pfd3, 24);
    rootCfg.mux = 7;
    rootCfg.div = 2;
    CLOCK_SetRootClock(kCLOCK_Root_Bus, &amp;amp;rootCfg); /* Generate 198M bus clock. */
}

static inline void IOMUXC_SelectENETClock(void)
{
#if USE_100M_ENET_PORT
    IOMUXC_GPR-&amp;gt;GPR4 |= 0x3; /* 50M ENET_REF_CLOCK output to PHY and ENET module. */
#else
    IOMUXC_GPR-&amp;gt;GPR5 |= IOMUXC_GPR_GPR5_ENET1G_RGMII_EN_MASK; /* bit1:iomuxc_gpr_enet_clk_dir
                                                                 bit0:GPR_ENET_TX_CLK_SEL(internal or OSC) */
#endif
}

void BOARD_ENETFlexibleConfigure(enet_config_t *config)
{
#if USE_100M_ENET_PORT
    config-&amp;gt;miiMode = kENET_RmiiMode;
#else
    config-&amp;gt;miiMode = kENET_RgmiiMode;
#endif
}


void ETH_Init(void)
{
	 BOARD_InitModuleClock();
     IOMUXC_SelectENETClock();


}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But while building I get some errors&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\lwip\port/enet_ethernetif.h:89:5: error: unknown type name 'phy_handle_t'&lt;/P&gt;&lt;P&gt;D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\phy/fsl_phyksz8081.h:40:14: error: unknown type name 'phy_operations_t'&lt;/P&gt;&lt;P&gt;D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\phy/fsl_phyksz8081.h:66:27: error: unknown type name 'phy_handle_t'; did you mean 'enet_handle_t'?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;phy_handle_t is defined in fsl_phy.h however I see&lt;/P&gt;&lt;P&gt;unknown type name 'phy_handle_t' I see in lwip/port/enet_ethernetif.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can be wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:19:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354167#M16675</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2021-10-12T11:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354621#M16689</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/134631"&gt;@john71&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Do you also add the path in the MCUXPresso project? Seems you lack the path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;BTW, do you test the SDK code project directly for the lwip, that SDK project works OK, you can refer to the SDK project directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 04:59:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354621#M16689</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-10-13T04:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354642#M16690</link>
      <description>&lt;P&gt;Hi Kerry&lt;/P&gt;&lt;P&gt;How do I add the path? In Settings-&amp;gt;Includes I see all the paths to libraries.&lt;/P&gt;&lt;P&gt;If I exclude my code from the project I get some errors in LWIP library any way&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;../lwip/port/enet_ethernetif.c:119:9: error: too few arguments to function 'PHY_GetLinkSpeedDuplex'&lt;/P&gt;&lt;P&gt;../lwip/port/enet_ethernetif.h:89:5: error: unknown type name 'phy_handle_t'&lt;/P&gt;&lt;P&gt;../lwip/port/enet_ethernetif_kinetis.c:386:43: error: request for member 'mdioHandle' in something not a structure or union&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 05:45:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354642#M16690</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2021-10-13T05:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354677#M16691</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/134631"&gt;@john71&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Please run the SDK project directly:&lt;/P&gt;
&lt;P&gt;SDK_2_10_0_MIMXRT1160-EVK\boards\evkmimxrt1160\lwip_examples&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kerryzhou_0-1634107318445.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158954i1715C64048A36A18/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kerryzhou_0-1634107318445.png" alt="kerryzhou_0-1634107318445.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The SDK project also has your mentioned&amp;nbsp;&lt;SPAN&gt;phy_handle_t, so please check your path, you need to add phy path.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 06:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354677#M16691</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-10-13T06:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354711#M16693</link>
      <description>&lt;P&gt;I have it included - /${ProjName}/phy.&lt;/P&gt;&lt;P&gt;I ported an example project from SDK - &lt;STRONG&gt;evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm4&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Checked - all paths like&amp;nbsp;/${ProjName}/... are present&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I build it I get some errors also related to LWIP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Description Resource Path Location Type&lt;BR /&gt;request for member 'autoNeg' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 82 C/C++ Problem&lt;BR /&gt;request for member 'mdioHandle' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 84 C/C++ Problem&lt;BR /&gt;request for member 'mdioHandle' in something not a structure or union enet_ethernetif_kinetis.c /MIMXRT1166_EVK_Project/lwip/port line 386 C/C++ Problem&lt;BR /&gt;request for member 'phyAddr' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 81 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_GetLinkSpeedDuplex' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 119 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_GetLinkStatus' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 102 C/C++ Problem&lt;BR /&gt;too few arguments to function 'PHY_Init' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 90 C/C++ Problem&lt;BR /&gt;unknown type name 'phy_config_t'; did you mean 'enet_config_t'? enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 74 C/C++ Problem&lt;/P&gt;&lt;P&gt;unknown type name 'phy_handle_t' enet_ethernetif.h /MIMXRT1166_EVK_Project/lwip/port line 89 C/C++ Problem&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;It's not my first project in MCUXpresso. I've build some projects in the past&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDKs.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/158962i1EB000BDEF65FB13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDKs.png" alt="SDKs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; In MKV58F1M0xxx24 I also have LWIP and it compiles OK.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:33:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1354711#M16693</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2021-10-13T07:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355709#M16716</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/134631"&gt;@john71&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please use the cm7 project instead of the CM4, as to the RT1160, CM7 is the master core.&lt;/P&gt;
&lt;P&gt;evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm7.&lt;/P&gt;
&lt;P&gt;But, even you use the&amp;nbsp;evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm4, you should still can build it:&lt;/P&gt;
&lt;P&gt;This is my build result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kerryzhou_0-1634201415025.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159106i740AC1E69A945D69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kerryzhou_0-1634201415025.png" alt="kerryzhou_0-1634201415025.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you want to create a new project?&lt;/P&gt;
&lt;P&gt;If yes, I recommend you based on&amp;nbsp;evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm7 directly, if you build this without issues, then you can copy past, or rename the project to your own project name, then based on it.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 08:51:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355709#M16716</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-10-14T08:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355754#M16717</link>
      <description>&lt;P&gt;Well..I ported SDK_2_9_0 instead of SDK_2_10_0 and now it's OK.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 09:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355754#M16717</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2021-10-14T09:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: A building project problem.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355760#M16718</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/134631"&gt;@john71&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your updated information.&lt;/P&gt;
&lt;P&gt;If your issue is solved, please help to mark the correct answer, just to close this case, thanks.&lt;/P&gt;
&lt;P&gt;Any new issues, welcome to create the new case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:01:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/A-building-project-problem/m-p/1355760#M16718</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2021-10-14T10:01:21Z</dc:date>
    </item>
  </channel>
</rss>

