<div dir="ltr"><div>2017-07-22 21:24 GMT+02:00 Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span>:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><span class="gmail-"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jul 22, 2017 3:01 PM, "Denis Obrezkov" <<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail-m_-2630517832992178285quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello, I am trying to enable a dummy clock driver.<div>I did as Joel suggested like in v850sim BSP.</div><div>But now I have a problem - the driver isn't initialized properly.</div><div>I receive an exception "Illegal instruction" during rtems_io_initialize.</div><div>The line with the exception is /cpukit/sapi/src/ioinitialize.<wbr>c:36:</div><div>return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL<br></div><div><br></div><div>and "p callout" in gdb returns:</div><div>(rtems_device_driver_entry) 0x2040087c <Clock_initialize+34><br></div><div><br></div><div>What could be the reason for such a behavior?</div></div></blockquote></div></div></div><div dir="auto"><br></div></span><div dir="auto">Accidental data overwrite?</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_-2630517832992178285quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font color="#888888"><div><br><span class="gmail-HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div class="gmail-m_-2630517832992178285m_-7900291833434481661gmail_signature">Regards, Denis Obrezkov</div>
</div></font></span></div></font></div><span class="gmail-HOEnZb"><font color="#888888">
<br>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br></font></span></blockquote></div><br></div></div></div>
</blockquote></div><br>I was able to proceed further by enabling a console driver. But I can't create a thread, because of an error.<div>For example, I have a backtrace:</div><div><div>#0  0x20408984 in rtems_task_start (id=2147488832, entry_point=0x80001448, argument=16777216)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/rtems/src/taskstart.c:29</div><div>#1  0x204004c6 in Init (argument=0) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../testsuites/samples/ticker/init.c:59</div><div>#2  0x20410438 in _Thread_Entry_adaptor_idle (executing=0x80000f88)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/threadentryadaptoridle.c:25</div><div>#3  0x2041ba5c in _Thread_Handler () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/threadhandler.c:73</div><div>#4  0x2041b9fa in _User_extensions_Thread_exitted (executing=0x80000f88) at ../../cpukit/../../../hifive1/lib/include/rtems/score/userextimpl.h:298</div><div><br></div><div>But after several steps it is:</div><div><div>#0  0x204104f2 in _Objects_Are_ids_equal (left=541099722, right=2147490432) at ../../cpukit/../../../hifive1/lib/include/rtems/score/objectimpl.h:817</div><div>#1  0x2041057a in _Thread_Get (id=167837697, lock_context=0x80001a58) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/threadget.c:28</div><div>#2  0x204089c0 in rtems_task_start (id=167837697, entry_point=0x204003a4 <Test_task>, argument=1)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/rtems/src/taskstart.c:43</div><div>#3  0x204004c6 in Init (argument=0) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../testsuites/samples/ticker/init.c:59</div><div>#4  0x20410438 in _Thread_Entry_adaptor_idle (executing=0x80000f88)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/threadentryadaptoridle.c:25</div><div>#5  0x2041ba5c in _Thread_Handler () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/threadhandler.c:73</div><div>#6  0x2041b9fa in _User_extensions_Thread_exitted (executing=0x80000f88) at ../../cpukit/../../../hifive1/lib/include/rtems/score/userextimpl.h:298</div><div>Backtrace stopped: frame did not save the PC</div></div><div><br></div><div>You can see that rtems_task_start arguments have been changed. Though it is the same function. </div><div>Also, the value of 'left' in _Objects_Are_ids_equal should be 'id' value from _Thread_Get.</div></div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Regards, Denis Obrezkov</div>
</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-22 21:24 GMT+02:00 Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jul 22, 2017 3:01 PM, "Denis Obrezkov" <<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-2630517832992178285quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, I am trying to enable a dummy clock driver.<div>I did as Joel suggested like in v850sim BSP.</div><div>But now I have a problem - the driver isn't initialized properly.</div><div>I receive an exception "Illegal instruction" during rtems_io_initialize.</div><div>The line with the exception is /cpukit/sapi/src/ioinitialize.<wbr>c:36:</div><div>return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL<br></div><div><br></div><div>and "p callout" in gdb returns:</div><div>(rtems_device_driver_entry) 0x2040087c <Clock_initialize+34><br></div><div><br></div><div>What could be the reason for such a behavior?</div></div></blockquote></div></div></div><div dir="auto"><br></div></span><div dir="auto">Accidental data overwrite?</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_-2630517832992178285quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font color="#888888"><div><br><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div class="m_-2630517832992178285m_-7900291833434481661gmail_signature">Regards, Denis Obrezkov</div>
</div></font></span></div></font></div><span class="HOEnZb"><font color="#888888">
<br>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br></font></span></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards, Denis Obrezkov</div>
</div>