This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSv4: XDC runtime error .... diags_USER1 is sealed - what does that mean?

Other Parts Discussed in Thread: SYSBIOS

Hi

I am switching our project over to LOG_print and was setting the .cfg file "xdc.runtime" tab for xdc.runtime.LoggerBuf diags_USER1 from ALWAYS_OFF to ALWAYS_ON. I get the pop-up that says

XDC runtime error: ti.sysbios.knl.Task\common$: diags_USER1 is sealed.

Is this because my tasks are declared dynamically? If so, how does one turn on the LOG_print for the task if you can't use the GUI?

Cheers

  • Do you happen to be using the DA830 with BIOS in ROM?

  • Hi

    Using the C6472. BIOS in RAM.

    Cheers

  • Are you trying to enable diags_USER1 for the Task module or for the xdc.runtime.LoggerBuf module? I think it could make sense that it wouldn't allow you to modify the diags settings for xdc.runtime.LoggerBuf, since enabling entry trace on LoggerBuf, for example, could cause an infinite cycle of logging.

    It sounds like you're trying to enable Task logging, but from what you wrote it also seems like you might be trying to do that by enabling diags_USER1 for the xdc.runtime.LoggerBuf module?

    Also, if you're trying to enable BIOS logging for RTA in CCSv4, then all you need to do is include the ti.sysbios.rta.Agent module in your application. See the BIOS RTA stairstep example as an example of configuring your application for RTA. The RTA Agent will automatically configure BIOS logging for you to support RTA, and you don't need to worry about doing it yourself.

    Thanks,

    Chris

     

  • Hi

    Chris McCormick said:
    It sounds like you're trying to enable Task logging, but from what you wrote it also seems like you might be trying to do that by enabling diags_USER1 for the xdc.runtime.LoggerBuf module?

    Yes, this is what I am doing.

    I think I may have solved the problem by adding my xdc.runtime.LoggerBuf instance (named "instLoggerBuf0") to the xdc.runtime.Defaults "logger" entry.  Then I was able to change the xdc.runtime.Diags diags_USER1 entry to ALWAYS_ON without that strange popup window thingy.

    But I may have also fixed it by adding the xdc.runtime.Diags module. Unfortunately I changed several things before realizing it worked.

    Now I can see the log in the RTA - Printf Logs tab.

    But you say

    Chris McCormick said:
    you're trying to enable BIOS logging for RTA in CCSv4, then all you need to do is include the ti.sysbios.rta.Agent module in your application

    Will including the rta agent setup RTDX so that I see the logs output as the application runs? Currently, I only see logs when I stop the app.

    Cheers
    Eddie

     

  • That's correct,  including the RTA Agent will setup RTDX for your application so that you see records come up while the target is running.

    Thanks,

    Chris

  • Hi Chris

    BIOS 6.30...

    I added the RTA agent and then got the error about rtdx0 not available when downloading my application to the target (C6472). I found an old forum question I posted awhile ago

    ti.sdo.io.Stream: line 375: E_notFound: /rtdx0 name not found
    xdc.runtime.Error.raise: terminating execution

    http://e2e.ti.com/support/embedded/f/355/p/40601/141900.aspx#141900

    So I changed the transport from Transport_USER to Transport_RTDX as I did way back then.

    But now I get the same error this fellow has

    "you have enabled RTDX on more CPUs than there are RTDX host buffers"

    http://e2e.ti.com/support/embedded/f/355/p/74403/271488.aspx#271488

    Whats the magic I have to do to add the agent without causing these errors?

    I'll study the above post so more, but this process seems rampant with gotcha's.

    Cheers

     

     

  • In more recent versions of BIOS 6, the default transport has been changed to RTDX, so that should address your first issue.

    Are you getting the RTDX error intermittently or consistently? It's possible that, since you're running on a six-core device, this error message is accurate.

    Are you running all six cores? If you are, is it the same image on all six cores? Would it be possible to try adding the Agent to just one of the cores and see if that makes this go away?

    Thanks,

    Chris

  • Hi Chris

    Chris McCormick said:
    Are you getting the RTDX error intermittently or consistently? It's possible that, since you're running on a six-core device, this error message is accurate.

    The error consistently happens during code download. The window pops up when the "Loading" progress bar is active.

    Chris McCormick said:
    Are you running all six cores? If you are, is it the same image on all six cores? Would it be possible to try adding the Agent to just one of the cores and see if that makes this go away?

    yes, same image on all 6 cores. I'll try to figure out how to get the agent instantiated on one core. Stay tuned.....

    We are currently on BIOS 6.21 due to another issue

    http://e2e.ti.com/support/embedded/f/355/p/74746/272598.aspx#272598

    Cheers

  • Chris McCormick said:
    Are you running all six cores? If you are, is it the same image on all six cores? Would it be possible to try adding the Agent to just one of the cores and see if that makes this go away?

    It doesn't appear from the ti.sysbios.rta.agent help info that this can be easily done using the .cfg file. Do I have to create a separate image for the CPU whoe's job is to periodically send the records to the host?

    Cheers

  • Note that the current RTA doesn't support correlation of events from multiple cores. RTA operates on each core separately, and the RTA views will only show the data received from the currently selected core (in the CCS debug manager).

    So what I'm suggesting here is that you create one image with RTA and load it on core 0, then create another image without RTA and load that on cores 1 - 5.

    If RTA works (on core 0) in this setup, I think that tells us that there really aren't enough RTDX buffers on the host to support running RTDX on all six cores simultaneously.

    Thanks,

    Chris

  • Chris35513 said:
    Also, if you're trying to enable BIOS logging for RTA in CCSv4, then all you need to do is include the ti.sysbios.rta.Agent module in your application.

    Since I can't use the RTA agent in a one image multicore system, I removed the agent by right clicking on the Agent package and selected "stop using agent". I assumed this would get me back to my old system state where the Log_prints were working. Not. Now I don't get any Log_prints or even any raw logs.

    Next I recovered my previous working .cfg from clearcase, rebuilt, and now Log_prints dont work. Arg!

    What luck!

     

  • You can still use the Agent without RTDX by selecting 'STOP_MODE_ONLY' as the transport.

    In order to see Log_prints, you will need to create a LoggerBuf instance and assign it to the xdc.runtime.Main module, and enable the appropriate diags bits for the xdc.runtime.Main module.

  • Hi Chris

    I "think" I found out why what worked before stopped working after I added - and then removed - the RTA Agent. CCS had crashed and when I restarted it, the "Stream RTA Data" button on the RTA Printf Logs tab was de-selected.

    In "help->BIOS 6.30...->ti->sysbios->rta->Agent" it states

    "To support the RTA GUI in CCS 4, all of the relevant BIOS modules must log their events to a LoggerBuf with the name 'RTASystemLog'. This parameter enables the Agent to automatically perform this configuration for the user."

    Could it be that running RTDX is not possible since I have the logger not named "RTASystemLog"?

    Or could it be that because I followed the Log example, and added the logger buffer myself, the RTA is configured incorrectly?

    Or have you confirmed that RTDX won't work on a single image multi-core system?

    Cheers

  • I was able to reproduce the "not enough RTDX buffers" error on the evm6472. Though I did receive this error, after I clicked "OK" the .out files loaded successfully and I was able to use RTA. Was that your experience, or did it fail to load the .out files for you?

    Anyway, I dug into the RTDX configuration a little bit, and it looks like the default number of RTDX buffers is 4, and that error message seems to imply that there needs to be at least one buffer per core running RTDX.

    I've attached a script for re-configuring RTDX to use 6 buffers, this appears to resolve the RTDX error.

    6558.initRtdx.txt

    You can run this script after launching your debug session and connecting the target, but before loading the programs.

    1. Save this file to C:/initRtdx.js
    2. Launch your debug session and connect the target, but don't load your .out file yet.
    3. Opening the 'Scripting Console' under Window -> Show View -> Scripting Console.
    4. At the prompt, type the following and hit enter

    loadJSFile C:/initRtdx.js


    This should execute the script and configure RTDX for 6 buffers.

    After doing this, I was able to run RTA on multiple cores. The first core worked immediately, but the other cores I needed to enable the 'Stream RTA data' button because it was initially disabled.

    Give that a shot and hopefully you'll be good to go.

    Thanks,

    Chris

  • Hi Chris

    Thats great news (and thanks for delving into this issue). I'll give it a try.

    Would it be possible for you to also zip your C6472 evm project and post it? It would be nice to have an RTA RTDX example to reference.

    Cheers

  • Are you familiar with creating a BIOS example project through the CCS project wizard?

    I just built and ran the BIOS stairstep example. It's called the stairstep example because it generates a stairstep-shaped CPU load graph in RTA. It's a good demonstration of RTA configuration and of the RTA tools.

    Thanks,

    Chris

  • Hi

    Chris McCormick said:
    It's called the stairstep example because it generates a stairstep-shaped CPU load graph in RTA.

    I'm familiar with the BIOS examples, but the name "stairstep" didn't catch my attention as being an RTA example.

    Thanks for pointing it to me. I'll give it a try.

    Cheers

    Eddie

  •  

    Chris McCormick said:
    I've attached a script for re-configuring RTDX to use 6 buffers, this appears to resolve the RTDX error.

    Hi Chris

    I built the BIOS staircase example and downloaded it to the 6 C6472 cores. I got the "not enough RTDX buffers" error twice. I pressed OK for each error and finished the download. Then I ran your script which output

    Configuring RTDX to use 6 buffers...
    Number of configured RTDX buffers: 6
    Size of RTDX buffers: 64600 bytes

    Then I clicked the CCS reload button CCS hung (nothing happened). I tried shutting it down but got the never ending "saving workspace" window. I killed it with the task manager.

    From a fresh CCS startup, I ran your script first. Then loaded all cores. The popup windows were gone. Yeah!

    I also clicked the "Stream RTA Data" button for 3 of the cores. Then ran all 6 cores. The log_prints when to 25% load and then stopped.

    When I stopped each core, the Printf Logs window updated with the buffered log_prints.

    Does this mean that the log_prints won't work with RTDX if the load is more than 25%? (based on the observation that they stopped RTDXing to the GUI when 25% was hit).

    Where does one enable Diags_USER X? I see from the staircase example that its done in xdc.runtime.Main and ti.sysbios.knl.Task, but why not in xdc.runtime.LoggerBuf, xdc.runtime.Diags and ti.sysbios.rta.Agent. You'd think it would at least have to be RUNTIME_ON in ti.sysbios.rta.Agent for the log_prints to work.

    Cheers

  • Eddie said:

    Does this mean that the log_prints won't work with RTDX if the load is more than 25%?

    No. The RTA Agent does need to run on the target for RTA to work, but you shouldn't have any issues on the stairstep example. RTDX can be flaky--if you relaunch CCS, does it get farther, or is it failing every time? If you halt the target, you should see the load graph fill out more.

    Eddie said:

    Where does one enable Diags_USER X? I see from the staircase example that its done in xdc.runtime.Main and ti.sysbios.knl.Task, but why not in xdc.runtime.LoggerBuf, xdc.runtime.Diags and ti.sysbios.rta.Agent. You'd think it would at least have to be RUNTIME_ON in ti.sysbios.rta.Agent for the log_prints to work.

    You need to enable that bit only for the modules which actually do the logging. Records are logged to a LoggerBuf instance, but the LoggerBuf module itself doesn't have any records to log. Similarly, the Agent is responsible for moving records to the host, but you don't need to enable any of its diags bits for it to work.

    You can read up on logging here:

    http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Logging#TOC

    Here's the first example: http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Logging/Example_1

    All the Log_print statements you write in your .c code will be associated with the xdc.runtime.Main module. So if you want to do a Log_print(Diags_USER1, "Hello world!"); in your .c code, then you will need to create a LoggerBuf instance and assign it to xdc.runtime.Main and enable Diags_USER1 for xdc.runtime.Main.

    In XGCONF, if you select a module and click on the 'xdc.runtime' tab, under the 'Diagnostics' node you can select the module's logger and enable any of the diags bits.

    Hope that helps.

    Chris

     

     

  • Chris McCormick said:
    does it get farther, or is it failing every time? If you halt the target, you should see the load graph fill out more.

    What I was observing is the log prints for teh stairstep example. Here is what I've observed

    1) If I run the experiment on one C6472 core, the prints output at about 0.2 Hz (1 line per 5 seconds).

    2) If I restart the experiment and run on two cores, the output rate reduces to about 0.1 Hz.

    3) As I increase the number of cores running the staircase example, the log print output drops to almost zero Hz.

    4) When I stop the cores, additional log prints are output.

    So whats interesting to me is that RTA can't keep up to a log print rate of 0.2 Hz. Thats pretty lame for an XDS510PLUS or XDS560. I'm using a brand new 6 core PC. USB is 2.1 is 480 Mbps. So where's the bottleneck?

    HSRTDX claimed 2 mbps. It doesn't appear that we're getting anywhere near what the old technology could do (CCSv3.0).

    Cheers

  • There are a lot more log records coming up than just those Log_prints. The stairstep example adjusts its load every 5 seconds, and the app does Log_print when that happens. Meanwhile, though, BIOS is logging a ton of events, which are used to populate the Execution Graph.

    Open up the Raw Logs view and you'll see every single record that's coming up.

    If you're not interested in all of the BIOS events, you can disable them by setting the 'configureSystemLog' to false. That should free up plenty of bandwidth for your Log_prints.

    Chris

  • Hi Chris

     

    Chris McCormick said:
    you can disable them by setting the 'configureSystemLog' to false

    I tried this by selecting ti.sysbios.rta.Agent and there is where I found the "configureSystemLog" configuration.

    Doing what you suggested greatly improved the Log_printf performance. Yeah!

    But what didn't make sense to me was disabling a system log and yet still be able to get log prints. I mean, the name says "system log". You'd think disabling this would stop every RTA log.

    Anyhow, I went on a quest to understand what RTSC modules are needed for what type of RTA log I plan to enable. I found this link

    http://rtsc.eclipse.org/docs-tip/Real-Time_Analysis_Tools

    But it really doesn't tell me what module relates to what RTA log.

    For example, what modules do I need to see the execution graph.

    A matrix that shows what modules are needed for what logs would be really handy.

    Cheers

  • The system log records all of the events related to the operating system--Task switches, Hwi / Swi start and end events, Clock ticks, etc.

    If you want to view the BIOS execution graph, you'll want configureSystemLog set to true. The list of modules assigned to the system log is listed in the documentation for the Agent. Or, you can open the Tools -> RTA -> RTA Control Panel and expand the RTASystemLog to see the list of modules which log to it.

    Thanks,

    Chris