MCXE31B: ethernetif.c is not compiled

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

MCXE31B: ethernetif.c is not compiled

1,529 Views
jonasa
Contributor III

Hi, 

I 'm trying to port this example project:
\mcuxsdk\examples\lwip_examples\lwip_ping_enet_qos\bm
board:
\mcuxsdk\examples\_boards\frdmmcxe31b

To my own project for a custom board.

In the prj.conf file I have these lines:

CONFIG_MCUX_COMPONENT_component.silicon_id=y
CONFIG_MCUX_COMPONENT_driver.enet_qos=y
CONFIG_MCUX_COMPONENT_middleware.lwip=y
CONFIG_MCUX_COMPONENT_middleware.lwip.contrib.ping=y
CONFIG_MCUX_COMPONENT_middleware.lwip.enet_ethernetif=y
CONFIG_MCUX_PRJSEG_middleware.lwip.generated_config=y

 

But it seems like the file

\mcuxsdk\middleware\lwip\port\ethernetif.c

is not compiled.

It's not in the generated compile_commands.json file.

and when I build I get this error:

C:/work/mcx/mcuxpresso-sdk/voltra_mcx/apps/voltra_hello_world/voltra_hello_world.c:123:(.text.main+0xbe): undefined reference to `ethernetif_wait_linkup'

 

What do I need to change so that ethernetif.c is built.

In the example project it builds and everything works.

 

Labels (1)
0 Kudos
Reply
3 Replies

1,517 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @jonasa 

May i ask which IDE you are using?

Can you share your project so that i can check it?

BR

Harry

0 Kudos
Reply

1,511 Views
jonasa
Contributor III

I think I solved it, this line was missing in prj.conf:

CONFIG_MCUX_COMPONENT_component.phydp8384x=y

I guess that 
CONFIG_MCUX_COMPONENT_middleware.lwip.enet_ethernetif
is set to  no  if no PHY chip is set?

Are there any documentation of these dependencies between the CONFIG_MCUX_COMPONENT flags?

 

0 Kudos
Reply

1,507 Views
Harry_Zhang
NXP Employee
NXP Employee
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2339854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCXE31B%3A%20ethernetif.c%20is%20not%20compiled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20'm%20trying%20to%20port%20this%20example%20project%3A%3CBR%20%2F%3E%5Cmcuxsdk%5Cexamples%5Clwip_examples%5Clwip_ping_enet_qos%5Cbm%3CBR%20%2F%3Eboard%3A%3CBR%20%2F%3E%5Cmcuxsdk%5Cexamples%5C_boards%5Cfrdmmcxe31b%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3ETo%20my%20own%20project%20for%20a%20custom%20board.%3C%2FP%3E%3CP%3EIn%20the%20prj.conf%20file%20I%20have%20these%20lines%3A%3C%2FP%3E%3CP%3ECONFIG_MCUX_COMPONENT_component.silicon_id%3Dy%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_driver.enet_qos%3Dy%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_middleware.lwip%3Dy%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_middleware.lwip.contrib.ping%3Dy%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_middleware.lwip.enet_ethernetif%3Dy%3CBR%20%2F%3ECONFIG_MCUX_PRJSEG_middleware.lwip.generated_config%3Dy%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EBut%20it%20seems%20like%20the%20file%3C%2FP%3E%3CP%3E%5Cmcuxsdk%5Cmiddleware%5Clwip%5Cport%5Cethernetif.c%3CBR%20%2F%3E%3CBR%20%2F%3Eis%20not%20compiled.%3C%2FP%3E%3CP%3EIt's%20not%20in%20the%20generated%20compile_commands.json%20file.%3C%2FP%3E%3CP%3Eand%20when%20I%20build%20I%20get%20this%20error%3A%3C%2FP%3E%3CP%3EC%3A%2Fwork%2Fmcx%2Fmcuxpresso-sdk%2Fvoltra_mcx%2Fapps%2Fvoltra_hello_world%2Fvoltra_hello_world.c%3A123%3A(.text.main%2B0xbe)%3A%20undefined%20reference%20to%20%60ethernetif_wait_linkup'%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhat%20do%20I%20need%20to%20change%20so%20that%20ethernetif.c%20is%20built.%3C%2FP%3E%3CP%3EIn%20the%20example%20project%20it%20builds%20and%20everything%20works.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2339854%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2340237%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE31B%3A%20ethernetif.c%20is%20not%20compiled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2340237%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F157113%22%20target%3D%22_blank%22%3E%40jonasa%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20you%20can%20refer%20to%20these%20document.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fmcuxsdk%2F25.03.00%2Fhtml%2Fdevelop%2Fsdk%2Fcomponent_development.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ESoftware%20Component%20%E2%80%94%20MCUXpresso%20SDK%20Documentation%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fmcuxsdk%2Flatest%2Fhtml%2Fdevelop%2Fbuild_system%2FSoftware_Componentization.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ESoftware%20Componentization%20%E2%80%94%20MCUXpresso%20SDK%20Documentation%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2339915%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE31B%3A%20ethernetif.c%20is%20not%20compiled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339915%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20think%20I%20solved%20it%2C%20this%20line%20was%20missing%20in%20prj.conf%3A%3CBR%20%2F%3E%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_component.phydp8384x%3Dy%3C%2FP%3E%3CP%3EI%20guess%20that%26nbsp%3B%3CBR%20%2F%3ECONFIG_MCUX_COMPONENT_middleware.lwip.enet_ethernetif%3CBR%20%2F%3Eis%20set%20to%26nbsp%3B%20%3CSTRONG%3E%3CEM%3Eno%3C%2FEM%3E%26nbsp%3B%26nbsp%3B%3C%2FSTRONG%3Eif%20no%20PHY%20chip%20is%20set%3F%3C%2FP%3E%3CP%3EAre%20there%20any%20documentation%20of%20these%20dependencies%20between%20the%26nbsp%3BCONFIG_MCUX_COMPONENT%20flags%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2339911%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE31B%3A%20ethernetif.c%20is%20not%20compiled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339911%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F157113%22%20target%3D%22_blank%22%3E%40jonasa%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMay%20i%20ask%20which%20IDE%20you%20are%20using%3F%3C%2FP%3E%0A%3CP%3ECan%20you%20share%20your%20project%20so%20that%20i%20can%20check%20it%3F%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E