Thanks for the feedback. We have a SAM4E demo already, is the SAMV7 MAC
compatible with the SAM4E?
I would be grateful if you could post your code (at least the driver
level, if the application cannot be posted) to the FreeRTOS Interactive
site. We are aware of people using FreeRTOS+TCP on various chips and
would like to create a library of such things, but people seem to
‘forget’ to post their code:
http://interactive.freertos.org/forums/21211265-FreeRTOS-TCP
Comments below:
- configMACINTERRUPTPRIORITY needs to be defined in FreeRTOSConfig.h
in order to build, but it’s not clear how to set this (relative to
other priorities used by +TCP).
You can use the SAM4E example as a reference here. In most cases you
would want to use
the highest
priority from which FreeRTOS API functions can be called, but it is
somewhat application dependent as the network might not be your highest
priority. The SAM4E demo has it set to
configLIBRARY
MAXSYSCALL
INTERRUPTPRIORITY.
- FreeRTOS upgrade issues: configMAXPRIORITIES needs to be an integer
(with no casting [with older FreeRTOS it was ((unsigned
portBASETYPE) 5) and that bonks]). If you want to use vTaskList(),
you now need to set a new configUSESTATSFORMATTING_FUNCTIONS to 1.
That cast is often getting in the way now, normally when the definition
is used in a pre-processor directive which doesn’t understand the cast.
- If you have certain warnings enabled in GCC, you’ll get hundreds of
warnings about packed structs causing inefficient alignment. Under
most circumstances these warnings are helpful, but not here. May I
suggest using portable/Compiler/GCC/packstructstart.h to do this:
|/* disable warnings about inefficient alignment caused by packed
(they are deliberate here) / #pragma GCC diagnostic push #pragma
GCC diagnostic ignored “-Wattributes” #pragma GCC diagnostic
ignored “-Wpacked”|
and at the end of pack_struct_end.h this:
|/ restore diagnostics */ #pragma GCC diagnostic pop|
Right. In this case packed structures is a necessity.
- The code has a number of multiple declarations (FreeRTOS_netstat(),
etc…) : it may be helpful to compile with -Wredundant-decls (in
GCC) to find and eliminate them.
Not sure about this one and will have to follow your suggestion to see.
- FreeRTOS_Sockets.h erroneously uses |#if __cplusplus| instead of
|#ifdef __cplusplus|.
Fixed – thanks.