• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » UDP Logger
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

UDP Logger

This question is answered
Damian Frick
Posted by Damian Frick
on Aug 06 2012 02:15 AM
Prodigy90 points

Hi,

I want to create a simple logger that resides on one (any) of the cores and logs data sent to it (from other cores, by some means) to a PC connected with Ethernet using UDP datagrams. So far I have only been working on the sending of the UDP packets.

I ran into two problems:
Firstly, if the code is not running on core0 the NDK features are never initialized and the networkOpenHook is never called.
Secondly, if the code is running on core0 everything works fine until I call send(...), which throws an error (i.e. return that is not 0) every time I try.

I am using:
SYS/BIOS 6.33.2.31
MCSDK PDK TMS320C6678 1.0.0.18
NDK 2.20.6.35
IPC 1.24.2.27

I also put the code in a paste bin:
mheLogger.c : http://pastebin.com/jX1iThU2
mheLogger.h : http://pastebin.com/Z5rt9ZDt
mheLogger.cfg : http://pastebin.com/YxUVnWSv

C6678 UDP
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 06 2012 10:42 AM
    Genius15570 points

    Hi Damian,

    I have a couple questions.

    1. What is receiving the UDP packets on the PC? System Analyzer in CCS?

    2. Have you looked at the UIA product? The newest version (1.01.01) has a couple loggers (LoggerIdle and LoggerStreamer) that allows you to plug in a function (or two) that sends the data via any transport you want. UIA also has an example where core 0 sends data to CCS via UDP. The other cores data is routed through core 0.

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Damian Frick
    Posted by Damian Frick
    on Aug 08 2012 01:50 AM
    Prodigy90 points

    1. I wrote a short python script that listens to the port and logs all the incoming UDP data.

    2. I have looked at UIA but it turns out that with JTAG I have not enough throughput and when I use Ethernet I loose a lot of packets as well, I suspect that CCS can't keep up with processing the data, since Ethernet should be fast enough and I selected a large enough buffer. Additionally having the logger on any core (specifically not on core0) would be a huge benefit for me if this is possible, since this makes it more modular.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 08 2012 13:22 PM
    Genius15570 points

    OK, I think I understand. You have your own logger and not using the Log module...correct?

    Regarding the first issue: I believe you can run the NDK on each core. I'll confirm this. If you are trying to use a single .out for all cores does complicate it though. Do you have the same for each core or do you have a different one for each core?

    Regarding the second issue: Can you try using sendto() instead?

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Damian Frick
    Posted by Damian Frick
    on Aug 09 2012 02:04 AM
    Prodigy90 points

    Yes, I am not using the Log module. And separate .out files/projects for each core.

    I did try sendto, same issue. Everything up to the send command goes fine but send returns an error.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Aug 09 2012 17:34 PM
    Verified Answer
    Verified by David Friedland
    Genius15570 points

    Hi Damian,

    Use htonl instead of htons

    addr.s_addr = htons(0xc0a80265);

    should be

    addr.s_addr = htonl(0xc0a80265);

    Also use sendto() for connectionless-mode socket (e.g. UDP).

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • brenden lai
    Posted by brenden lai
    on Dec 07 2012 03:22 AM
    Prodigy190 points

    Hi Todd , 

         I try to use LoggerIdle .It seems  the LoggerIdle.transportFxn  is been execute after log_info been called !

         But the transportFxn   paramater1  is not right , I only log "hello world" , but the length is 96 byte(maybe include timestamps and other data , but how to parse?) !!! 

         Is the module LoggerIdle is only for system analyzer ? Can i just use a tera term to get log entry from uart just like LoggerSys output log to SysMin buffer?

    Brenden

    4810.uart_logging.7z

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • ToddMullanix
    Posted by ToddMullanix
    on Dec 07 2012 10:02 AM
    Genius15570 points

    Brenden,

    The data is not ASCII data. It is encoded Log data. System Analyzer knows how to decode it.

    Also, in the future can you start a new thread. When additional questions are added to an existing thread, it becomes hard to manage and track.

    Todd

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use