Hello everyone,
I followed this guide to create a porting for the network interface for a custom interface. I wrote the a C library with the xNetworkInterfaceInitialise, the xNetworkInterfaceOutput and the ISR functions to interact with the interface. However it’s not clear how do I have to tell to FreeRTOS to use such interface for networking. Do I have to call a specific function in the main?
Thank you in advance
This is a good tutorial about how to use FreeRTOS+TCP - TCP networking tutorial
You can also look at this example - FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator at main · FreeRTOS/FreeRTOS · GitHub
Thanks for your quick reply, however I still do not understand how to solve my issue.
Where do I have to put my driver code? I generated the project using the Xilinx SDK and is organized as follows:
- application:
- main.c
- platform_config.h
- bsp:
- code
- include
- lib
- libsrc
Where do my driver has to be placed?
That is up to you. You can place it anywhere - you just need to ensure that it is compiled in your project. May be create a separate folder FreeRTOS+TCP
?
Thanks, but then who will call the xNetworkInterfaceInitialise()? Actually, my driver is in a separate folder in the application folder. I’m thinking about how it works in Linux where I may create a module and then register it to the kernel. Is here the same?
It is called from here -https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/FreeRTOS_IP.c#L1760
So, if I understood correctly if I include in my application the FreeRTOS-Plus-TCP folder and I add in the portable/NetworkInterface / folder my interface. Then it will automatically call my interface? Or do I have to specify which interface to use?
Correct - you do not need to explicitly call xNetworkInterfaceInitialise. You need to call FreeRTOS_IPInit and handle network connect and disconnect events:
- FreeRTOS/main.c at main · FreeRTOS/FreeRTOS · GitHub
- FreeRTOS/main.c at main · FreeRTOS/FreeRTOS · GitHub
Thanks.
Thanks, but how it is specified the interface to use?
Which interface do you mean ? ethernet HW interface or network driver interface (API) ?
BTW multiple ethernet interfaces will be supported by upcoming TCP (IPv6) stack.
See GitHub - FreeRTOS/FreeRTOS-Plus-TCP at labs/ipv6_multi
Do you mean how will it call your network interface implementation? If so, that would happen because you’ll compile your NetworkInterface.c
file. Or are you asking something else?
Exactly, well, I’ll complile my NetworkInterface.c file, but in the portable/NetworkInterface folder there are dozens of such implementations. Do I have to remove the others or there is a clean way to specify which one to use maybe through a define?
That depends on your toolchain and I’d recommend looking at the toolchain documentation. In general, if you are using an IDE, do not add other files to your project. If you are using CMake or Make, do not compile other files.
Very thanks,
I downloaded the source code of FreeRTOS+TCP (from here) and I deleted all the existing portables in the portables folder, leaving just mine. However, I get lots of errors while compiling (I’m using Xilinx SDK 2019.1) such as …/src/FreeRTOS-Plus-TCP/tools/tcp_utilities/tcp_netstat.c:52:12: error: conflicting types for ‘vGetMetrics’.
I’m missing something?
Do not compile the files in the tools folder. Follow these instructions to include FreeRTOS+TCP in your project - TCP networking tutorial - Adding the source files into an RTOS project
Thanks,
I followed the instructions; however now I get some strange errors with linker:
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.o: in function
xCheckLoopback': /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1203: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1203:(.text+0x1288): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolvLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.o: in function
FreeRTOS_PrintARPCache’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1227: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1227:(.text+0x1464): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1241: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c:1241:(.text+0x1498): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.o: in functionvDHCPProcess': /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:354: undefined reference to
xApplicationGetRandomNumber’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:354:(.text+0x2d4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolxApplicationGetRandomNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:532: undefined reference to
xApplicationGetRandomNumber’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:532:(.text+0x4f8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolxApplicationGetRandomNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:559: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:559:(.text+0x57c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolvLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.o: in function
prvInitialiseDHCP’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:670: undefined reference toxApplicationGetRandomNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:670:(.text+0x760): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
xApplicationGetRandomNumber’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.o: in functionprvProcessDHCPReplies': /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:974: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c:974:(.text+0xd7c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbolvLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.o: in function
prvPrepareLookup’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:539: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:539:(.text+0x15c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:580: undefined reference toxApplicationGetRandomNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:580:(.text+0x1b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
xApplicationGetRandomNumber’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.o: in functionprvParseDNSReply': /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:1408: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:1408:(.text+0xe40): additional relocation overflows omitted from the output
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:1462: undefined reference toxApplicationDNSQueryHook' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.o: in function
prvTreatNBNS’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c:1659: undefined reference toxApplicationDNSQueryHook' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in function
prvProcessNetworkDownEvent’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:1745: undefined reference tovApplicationIPNetworkEventHook' makefile:44: recipe for target 'Eth_Guest_FreeRTOS_Driver.elf' failed /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in function
vIPNetworkUpCalls’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:1795: undefined reference tovApplicationIPNetworkEventHook' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in function
prvAllowIPPacket’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:2151: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in function
xCheckSizeFields’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:2668: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in function
usGenerateProtocolChecksum’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:2871: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3011: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o: in functionvPrintResourceStats': /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3289: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_IP.o:/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3309: more undefined references tovLoggingPrintf' follow /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.o: in function
prvGetPrivatePortNumber’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:2176: undefined reference toxApplicationGetRandomNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.o: in function
FreeRTOS_inet_pton4’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:2684: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.o: in function
vTCPNetStat’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:4758: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:4764: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:4791: undefined reference tovLoggingPrintf' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:4809: undefined reference to
vLoggingPrintf’
/opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/…/lib/gcc/aarch64-none-elf/8.2.0/…/…/…/…/aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.o:/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c:4814: more undefined references tovLoggingPrintf' follow /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.o: in function
prvTCPPrepareConnect’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c:1211: undefined reference toulApplicationGetNextSequenceNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: ./src/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.o: in function
prvHandleListen’:
/home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/…/src/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c:3846: undefined reference toulApplicationGetNextSequenceNumber' /opt/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin/../lib/gcc/aarch64-none-elf/8.2.0/../../../../aarch64-none-elf/bin/ld: /home/nborgioli/Documents/docker-petalinux/etc/workspace/Eth_Guest_FreeRTOS_Driver/Debug/../src/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c:3877: undefined reference to
vLoggingPrintf’
collect2: error: ld returned 1 exit status
make: *** [Eth_Guest_FreeRTOS_Driver.elf] Error 1
What’s wrong?
In my main.c file I include “FreeRTOS_IP.h” other than libraries used by the application, while in the NetworkInterface.c file I include:
#include “FreeRTOS_IP.h”
#include “FreeRTOS_Sockets.h”
#include “FreeRTOS_IP_Private.h”
#include “NetworkBufferManagement.h”
#include “NetworkInterface.h”
Is this correct?
The error is pretty explanatory - vLoggingPrintf
is missing. You must be defining some printf to vLoggingPrintf
in your config file. Can you share your FreeRTOSConfig.h and FreeRTOSIPConfig.h?
Sure, as FreeRTOSIPConfig.h I have copied one of the sample ones:
FreeRTOSIPConfig.h (15.7 KB)
In my project there is no FreeRTOSConfig.h file, I assume default values are used
Change ipconfigHAS_PRINTF
to 0:
#define ipconfigHAS_PRINTF 0
You’ll need to map it to your version of printf later to get logs from FreeRTOS+TCP.
Thanks.