Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 5 months ago.
Library for ENC28J60 on FRDM KL46Z
Hello, I want use your library for ENC28J60 on my FRDM KL46Z board but I'm getting error message while compiling program: Undefined symbol UIPEthernet (referred from UIPClient.cpp.KL46Z.o)
Is there any chance that this would work on my board? Thank you for your answer.
Question relating to:
1 Answer
8 years, 5 months ago.
Hi Radim,
It means that there is no UIPEthernet
object defined (for the FRDM-KL46Z platform) in your program. Try to import the HTTPServer_Echo_ENC28J60 demo program into the online compiler. For me it worked smoothly after selecting the FRDM-KL46Z platform for the online compiler. The UIPEthernet
object is defined in the following snippet:
#if defined(TARGET_LPC1768) UIPEthernetClass UIPEthernet(p11, p12, p13, p8); // mosi, miso, sck, cs #elif defined(TARGET_NUCLEO_F103RB) || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_F030R8) \ || defined(TARGET_NUCLEO_F401RE) || defined(TARGET_NUCLEO_F302R8) || defined(TARGET_NUCLEO_L053R8) \ || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_F334R8) || defined(TARGET_NUCLEO_F072RB) \ || defined(TARGET_NUCLEO_F091RC) || defined(TARGET_NUCLEO_F303RE) || defined(TARGET_NUCLEO_F070RB) \ || defined(TARGET_KL25Z ) || defined(TARGET_KL46Z) || defined(TARGET_K64F) || defined(TARGET_KL05Z) \ || defined(TARGET_K20D50M) || defined(TARGET_K22F) \ || defined(TARGET_NRF51822) \ || defined(TARGET_RZ_A1H) UIPEthernetClass UIPEthernet(D11, D12, D13, D10); // mosi, miso, sck, cs #endif
Copying it into your program should fix the issue. However, for you it's also sufficient to add just the following single line:
UIPEthernetClass UIPEthernet(D11, D12, D13, D10); // mosi, miso, sck, cs
I hope that helped.
Cheers,
Zoltan