<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-07-24 8:56 GMT+02:00 Denis Obrezkov <span dir="ltr"><<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="gmail-m_-3906836729038990851m_-138865179110328008h5"><div class="gmail_quote">2017-07-24 8:27 GMT+02:00 Hesham Almatary <span dir="ltr"><<a href="mailto:heshamelmatary@gmail.com" target="_blank">heshamelmatary@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559HOEnZb"><div class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559h5">On Mon, Jul 24, 2017 at 8:27 AM, Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
><br>
><br>
> On Jul 23, 2017 5:15 PM, "Denis Obrezkov" <<a href="mailto:denisobrezkov@gmail.com" target="_blank">denisobrezkov@gmail.com</a>> wrote:<br>
><br>
> 2017-07-23 22:30 GMT+02:00 Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>>:<br>
>><br>
>> Increasing the stack size effectively eliminated a data corruption issue.<br>
>> The memory corrupted likely was an RTEMS internal object structure.<br>
>><br>
>> What is the stack frame size required by each subroutine call?<br>
><br>
> How can I determine it?<br>
><br>
><br>
> If it isn't directly in the CPU's ABI definition, then what is pushed to the<br>
> stack or reserved on each subroutine call. You may see it in terms of stack<br>
> pointer, frame pointer, reserved space, etc.<br>
><br>
> For example, the m68k had a minimum of 4 registers saved and the return<br>
> address. More registers could be saved for complicated methods.<br>
><br>
> I think some risc CPU has a number like 172 bytes reserved for possible<br>
> register saves.<br>
><br>
> So the scheme varies<br>
><br>
>><br>
>> How much stack to call printf()?<br>
>><br>
>> The minimum is an educated guess by the porter that is large enough to run<br>
>> many/most small applications. You should be able to call RTEMS services and<br>
>> do a context switch.<br>
>><br>
>> Hope that helps pick one. :)<br>
><br>
><br>
> As for now, I have increased the minimum stack size and get the following<br>
> output:<br>
><br>
> *** LOW MEMORY CLOCK TICK TEST ***<br>
><br>
> TA1 - rtems_clock_get_tod - 09:00:00 12/31/1988<br>
><br>
> TA2 - rtems_clock_get_tod - 09:00:00 12/31/1988<br>
><br>
> TA3 - rtems_clock_get_tod - 09:00:00 12/31/1988<br>
><br>
> I will try to determine how to proceed further.<br>
><br>
</div></div>Do you configure RISC-V to get timer (or any) interrupts? You might<br>
want to disable all sources of interrupts, and make sure no interrupts<br>
are generated at all, just to figure out if the problem is with<br>
interrupt handling (including context save/restore).<br>
<div class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559HOEnZb"><div class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559h5"><br>
<br>
><br>
><br>
> --<br>
> Regards, Denis Obrezkov<br>
><br>
><br>
><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>
<br>
<br>
<br>
--<br>
</div></div><span class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559HOEnZb"><font color="#888888">Hesham<br>
</font></span></blockquote></div></div></div>Interrupts are disabled.<span class="gmail-m_-3906836729038990851m_-138865179110328008HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-3906836729038990851m_-138865179110328008m_6652407893189251559gmail_signature">Regards, Denis Obrezkov</div>
</font></span></div></div>
</blockquote></div><br>Also, though I did almost everything like in v850sim and RISC-V generic examples, my dummy clock driver</div><div class="gmail_extra">doesn't tick. It seems to me that clock_driver_sim_idle_body just never runs.</div><div class="gmail_extra">Should I try to implement an interrupt driven clock? <br clear="all"><div><br></div>-- <br><div class="gmail-m_-3906836729038990851m_-138865179110328008gmail_signature">Regards, Denis Obrezkov</div>
</div></div>