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 188.8.131.52MCSDK PDK TMS320C6678 184.108.40.206NDK 220.127.116.11IPC 18.104.22.168
I also put the code in a paste bin:mheLogger.c : http://pastebin.com/jX1iThU2mheLogger.h : http://pastebin.com/Z5rt9ZDtmheLogger.cfg : http://pastebin.com/YxUVnWSv
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.
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.
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?
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.
Use htonl instead of htons
addr.s_addr = htons(0xc0a80265);
addr.s_addr = htonl(0xc0a80265);
Also use sendto() for connectionless-mode socket (e.g. UDP).
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?
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.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.