Page 1 of 1

ET_ILLEGAL_RESOURCE when calling xscope_int()

Posted: Fri Oct 14, 2016 1:54 pm
by astewart
Under what circumstances should a call to xscope_int() cause an ET_ILLEGAL_RESOURCE exception?

This is my config.xscope file

Code: Select all

<xSCOPEconfig ioMode="basic" enabled="true">

    <!-- For example: -->
    <!-- <Probe name="Probe Name" type="CONTINUOUS" datatype="UINT" units="Value" enabled="true"/> -->
    <!-- From the target code, call: xscope_int(PROBE_NAME, value); -->
    
    <Probe name="probe1" type="CONTINUOUS" datatype="INT" units="Value" enabled="true"/>

</xSCOPEconfig>
This is the error:

Code: Select all

xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
      [Switching to tile[1] core[1] (dual issue)]
      0x00041a70 in xscope_int ()
The call is simply xscope_int(PROBE1, 1). The file in which the call is made includex xscope.h.
Further, the same call to xscope_int(PROBE1, 1) works as expected when I place it in a different task.

Re: ET_ILLEGAL_RESOURCE when calling xscope_int()

Posted: Fri Oct 14, 2016 3:50 pm
by peter
That is not something I have come across before. If you can provide an example application (ideally a project with source) with this issue then we can get to the bottom of it.

Failing that, can you use xgdb to give a bit more visibility of what is happening. Once the exception has happened then do:

Code: Select all

xgdb <BIN>
attach
info threads
info reg
disass
That will give visibility of what all the threads are doing, with the register contents and the instruction at the time of the exception on tile[1] core[1].

Thanks,

Peter

Re: ET_ILLEGAL_RESOURCE when calling xscope_int()

Posted: Fri Oct 14, 2016 3:58 pm
by astewart
I gave up on it, went on to edit other code, and it now seems to have fixed itself. If I encounter it again, I'll update, but I don't know enough about the circumstances surrounding it to force it to occur again.

After posting, I found that I also saw it occur when I tried using debug_printf() from lib_logging in the same task. As well as doing all this from a different task (meanwhile, it continued to work fine in a third task).

Re: ET_ILLEGAL_RESOURCE when calling xscope_int()

Posted: Tue Apr 10, 2018 3:16 pm
by cjf1699
peter wrote:That is not something I have come across before. If you can provide an example application (ideally a project with source) with this issue then we can get to the bottom of it.

Failing that, can you use xgdb to give a bit more visibility of what is happening. Once the exception has happened then do:

Code: Select all

xgdb <BIN>
attach
info threads
info reg
disass
That will give visibility of what all the threads are doing, with the register contents and the instruction at the time of the exception on tile[1] core[1].

Thanks,

Peter
Hello, I encounter the same problem and I did what you said.
I attached the result. What should I do? Thank you!