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.31MCSDK PDK TMS320C6678 1.0.0.18NDK 2.20.6.35IPC 1.24.2.27
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
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
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);
should be
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?
Brenden
4810.uart_logging.7z
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.