…no replies, so I guess nobody reading the thread has anyway.
Porting is quite straight forward, and even more so if Microchip provide their own drivers. Stick to the ‘standard’ rather than ‘zero copy’ interface to start with as it is simpler. If you need the extra performance you can add in the zero copy interface once the standard one is working.
I’m not aware of any PIC24 devices with Ethernet on-board so maybe you are planning on using one of the MAC/PHY devices with an SPI interface - if so then I’m sure you will be able to get some source code from Microchip too.
No replies OR nobody did the job to port FrreRTOS+UDP on Pic24 ! by the way I am using my own board with ENC424J600 from Microchip, so the hardware driver is not a problem with SPI interface, if I understood well I have to concentrate effort on 3 functions to interface with freertos+udp… I will try to do it… if any question comes up, I hope to have little support from here…
1) Concerning pack_struct_end.h and start does this FreeRTOS-Plus/FreeRTOS-Plus-UDP/portable/Compiler/GCC already contains implementations for other compilers that can be used directly, or as a reference when adding new compiler ports is ok for Xc compiler for pic24 ?
2) When compiling I got error that the file demoiptrace.h is missing, I did not find in the available files is this normal ?
pack_struct_start/end.h has definitions for the compilers that have already been used by us. You can add to the files as needed by the compiler you are using.
I think XC is GCC, so it might be that you don’t need to edit the files at all. Although, having a quick look at the XC16 user guide, it seems that you may need to use __pack to pack structures, as in:
…cut from the user guide directly. That means pack_struct_start would contain __pack and pack_struct_end would contain just the semicolon (;).
2)
You can either include the path to the demoiptrace.h header file (which I think is part of FreeRTOS-Plus/Demo, rather than FreeRTOS-Plus/Source) or remove the line:
#include "DemoIPTrace.h"
from the bottom of FreeRTOSIPConfig.h so it does not even try including the header file. The header file in question is just an example of how the UDP trace macros can be used and is not necessary for the UDP stack to function correctly.
Very strange error when compiling, is says The FreeRTOS header file task.h must be included before FreeRTOS_Sockets.h., when looking at task.h the define is like this :
#ifndef INC_TASK_H #define INC_TASK_H
so the error is normal since FreeRTOS_Sockets.his expecting to have TASK_H define instead of INC_TASK_H may be a change in v 7.5.2 ?
Yes - the definition in task.h was changed in V7.5.0 to make it consistent with the other files. What you are seeing is a slight “side effect” ;o) of the change that is in the current release, although it has been corrected in the SVN copy. Just change it manually from TASK_H to INC_TASK_H for now to get you past that.
Looks like it does not know what xNetworkBufferDescriptor_t is. xNetworkBufferDescriptor_t must be defined in a header file. Is the header file being included?
I have only few error at the linking now but very strange error :
build/default/production/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.o(.text+0x2c6): In function `.LSM86’:: undefined reference to `_xQueueCreateCountingSemaphore’
build/default/production/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.o(.text+0xc): In function `.LSM2’:
: undefined reference to `_xQueueCreateCountingSemaphore’
I can not find any trace of this function xQueueCreateCountingSemaphore somewhere !
Set configUSE_COUNTING_SEMAPHORES to 1 in FreeRTOSConfig.h to make the function available.
xQueueCreateCountingSemaphore() is not directly a part of the public API but called indirectly by the xSemaphoreCreateCounting() macro (defined in semphr.h).
I was also oblige to add ping function in order to link correctly, now building is done…
If you set ipconfigSUPPORT_OUTGOING_PINGS to 1 in FreeRTOSIPConfig.h then you need to supply a ping reply hook. If you don’t need that then set ipconfigSUPPORT_OUTGOING_PINGS to 0.