A building project problem.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A building project problem.

Jump to solution
1,819 Views
john71
Senior Contributor I

I created a project in MCUXpresso IDE v11.4.1_6260 for i.MX RT1160 MCU (SDK_2_10_0_MIMXRT1166xxxxx.zip).

Then I try to build an empty project.

I get some errors in LWIP library

../lwip/port/enet_ethernetif.h:89:5: error: unknown type name 'phy_handle_t'
89 | phy_handle_t *phyHandle;
| ^~~~~~~~~~~~
-I"D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\device" -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fmerge-constants -fmacro-prefix-map="../lwip/port/"=. -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"lwip/port/enet_ethernetif_kinetis.d" -MT"lwip/port/enet_ethernetif_kinetis.o" -MT"lwip/port/enet_ethernetif_kinetis.d" -o "lwip/port/enet_ethernetif_kinetis.o" "../lwip/port/enet_ethernetif_kinetis.c"
../lwip/port/enet_ethernetif.c: In function 'ethernetif_phy_init':
../lwip/port/enet_ethernetif.c:74:5: error: unknown type name 'phy_config_t'; did you mean 'enet_config_t'?
74 | phy_config_t phyConfig;
| ^~~~~~~~~~~~
| enet_config_t
../lwip/port/enet_ethernetif.c:81:14: error: request for member 'phyAddr' in something not a structure or union
81 | phyConfig.phyAddr = ethernetifConfig->phyHandle->phyAddr;
| ^
../lwip/port/enet_ethernetif.c:81:52: error: request for member 'phyAddr' in something not a structure or union
81 | phyConfig.phyAddr = ethernetifConfig->phyHandle->phyAddr;
| ^~
../lwip/port/enet_ethernetif.c:82:14: error: request for member 'autoNeg' in something not a structure or union
82 | phyConfig.autoNeg = true;
| ^
../lwip/port/enet_ethernetif.c:84:32: error: request for member 'mdioHandle' in something not a structure or union
84 | ethernetifConfig->phyHandle->mdioHandle->resource.base = *ethernetif_enet_ptr(ethernetif);
| ^~
../lwip/port/enet_ethernetif.c:90:43: warning: passing argument 1 of 'PHY_Init' from incompatible pointer type [-Wincompatible-pointer-types]
90 | status = PHY_Init(ethernetifConfig->phyHandle, &phyConfig);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~
| |
| int * const
In file included from ../lwip/port/enet_ethernetif.h:46,
from ../lwip/port/enet_ethernetif.c:58:
D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\board/fsl_phy.h:124:30: note: expected 'ENET_Type *' but argument is of type 'int * const'
124 | status_t PHY_Init(ENET_Type *base, uint32_t phyAddr, uint32_t srcClock_Hz);
| ~~~~~~~~~~~^~~~
../lwip/port/enet_ethernetif.c:90:56: warning: passing argument 2 of 'PHY_Init' makes integer from pointer without a cast [-Wint-conversion]
90 | status = PHY_Init(ethernetifConfig->phyHandle, &phyConfig);
| ^~~~~~~~~~
| |
| int *
In file included from ../lwip/port/enet_ethernetif.h:46,
from ../lwip/port/enet_ethernetif.c:58:
D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\board/fsl_phy.h:124:45: note: expected 'uint32_t' {aka 'unsigned int'} but argument is of type 'int *'
124 | status_t PHY_Init(ENET_Type *base, uint32_t phyAddr, uint32_t srcClock_Hz);
| ~~~~~~~~~^~~~~~~
../lwip/port/enet_ethernetif.c:90:18: error: too few arguments to function 'PHY_Init'
90 | status = PHY_Init(ethernetifConfig->phyHandle, &phyConfig);
| ^~~~~~~~
In file included from ../lwip/port/enet_ethernetif.h:46,
from ../lwip/port/enet_ethernetif.c:58:
D:\Workspace_MCUXpresso_11.4\MIMXRT1166_EVK_Project\board/fsl_phy.h:124:10: note: declared here
124 | status_t PHY_Init(ENET_Type *base, uint32_t phyAddr, uint32_t srcClock_Hz);
| ^~~~~~~~
../lwip/port/enet_ethernetif.c:101:13: warning: implicit declaration of function 'PHY_GetAutoNegotiationStatus' [-Wimplicit-function-declaration]
101 | PHY_GetAutoNegotiationStatus(ethernetifConfig->phyHandle, &autonego);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lwip/port/enet_ethernetif.c:102:47: warning: passing argument 1 of 'PHY_GetLinkStatus' from incompatible pointer type [-Wincompatible-pointer-types]
102 | PHY_GetLinkStatus(ethernetifConfig->phyHandle, &link);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~
| |
| int * const

 And so on.

 

What can be wrong?

Well...I ported an example project from SDK - evkmimxrt1160_lwip_httpssrv_mbedTLS_bm_cm4. When I build it I get some errors also related to LWIP

Description Resource Path Location Type
request for member 'autoNeg' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 82 C/C++ Problem
request for member 'mdioHandle' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 84 C/C++ Problem
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
request for member 'phyAddr' in something not a structure or union enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 81 C/C++ Problem
too few arguments to function 'PHY_GetLinkSpeedDuplex' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 119 C/C++ Problem
too few arguments to function 'PHY_GetLinkStatus' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 102 C/C++ Problem
too few arguments to function 'PHY_Init' enet_ethernetif.c /MIMXRT1166_EVK_Project/lwip/port line 90 C/C++ Problem
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
unknown type name 'phy_handle_t' enet_ethernetif.h /MIMXRT1166_EVK_Project/lwip/port line 89 C/C++ Problem

0 Kudos
1 Solution
1,792 Views
john71
Senior Contributor I

Well..I ported SDK_2_9_0 instead of SDK_2_10_0 and now it's OK.

View solution in original post

0 Kudos
4 Replies
1,793 Views
john71
Senior Contributor I

Well..I ported SDK_2_9_0 instead of SDK_2_10_0 and now it's OK.

0 Kudos
1,804 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @john71 ,

I tried this project, but I didn't find any problem. I use win10, MCUXpresso 10.4.0 and SDK2.10. Can you tell me how you import the project?

You can try to reinstall the SDK and then import the project again.

 

Regards,

Jing

0 Kudos
1,794 Views
john71
Senior Contributor I

I import the project - Import SDK example(s)->Choose eval. board-> Choose an example.

But when I restart the MCUXpresso -the SDK is vanished from Installed SDKs and I have to install it again.

 

0 Kudos
1,775 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Occasionally, installing SDK will have problem. But download and install the SDK again can resolve the problem.

 

Regards,

Jing

0 Kudos