[ ]
 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS Labs FreeRTOS+TCP FreeRTOS+FAT Contact / Enquiries

FreeRTOS+TCP is still in the lab
FreeRTOS+TCP is already used in commercial products and we encourage you to try it yourself. Be aware however that we are still refining its design, and the source code and documentation do not yet meet Real Time Engineers Ltd's strict quality standards.
Please use the forum for support, feedback and ideas, or contact us directly if you have a specific business interest.

Outputting TCP Log Messages via UDP
FreeRTOS+TCP and FreeRTOS+FAT Examples

FreeRTOS_debug_printf() and FreeRTOS_printf() are used to output log messages from within the FreeRTOS+TCP TCP/IP stack, and can be used by the application writer for the same purpose. The UDP logging example demonstrates how to send FreeRTOS_debug_printf() and FreeRTOS_printf() output to a UDP port.

The following settings in FreeRTOSConfig.h configure the UDP logging functionality.

/* If set to 1 then each message sent via the UDP logging facility will end with \r\n. If set to 0 then each message sent via the UDP logging facility will end with \n. */
#define configUDP_LOGGING_NEEDS_CR_LF ( 1 )

/* Sets the maximum length for a string sent via the UDP logging facility. */
#define configUDP_LOGGING_STRING_LENGTH ( 200 )

/* The UDP logging facility buffers messages until the UDP logging task is able to transmit them. configUDP_LOGGING_MAX_MESSAGES_IN_BUFFER sets the maximum number of messages that can be buffered at any one time. */

/* The UDP logging facility creates a task to send buffered messages to the UDP port. configUDP_LOGGING_TASK_STACK_SIZE sets the task's stack size. */
#define configUDP_LOGGING_TASK_STACK_SIZE ( 512 )

/* The UDP logging facility creates a task to send buffered messages to the UDP port. configUDP_LOGGING_TASK_PRIORITY sets the task's priority. It is suggested to give the task a low priority to ensure it does not adversely effect the performance of other TCP/IP stack activity. */
/* The UDP port numbers to use. */
#define configUDP_LOGGING_PORT_LOCAL 1499
#define configUDP_LOGGING_PORT_REMOTE 1500

/* The IP address to which the UDP messages are sent. NOTE: If these settings are omitted then the UDP messages will be sent to the local broadcast address, although broadcast messages can be blocked by switches and routers. */
#define configUDP_LOGGING_ADDR0 192
#define configUDP_LOGGING_ADDR1 168
#define configUDP_LOGGING_ADDR2 0
#define configUDP_LOGGING_ADDR3 3

Logging messages produced by the free RTOS TCP/IP stack
UDP logging output viewed using UDPTerm, from Cinetix

[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS Labs Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.