<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-06-17 22:11 GMT+03: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"><span class="gmail-"><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="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-m_-2047280018615527811gmail-"><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"><span class="gmail-m_-2047280018615527811gmail-m_6960512681043459996HOEnZb"><font color="#888888"><div><div><br></div></div></font></span></div></blockquote></span><div>Can you run RTEMS hello world? Or does printf make that too large? If that is</div><div>too large, you need to force the tests to switch to printk(). There is some magic</div><div>in testsuites/<a href="http://configure.ac" target="_blank">configure.ac</a> for that.</div><div><br></div><div>The low ticker examples (especially the last one) will show configure options</div><div>to cut memory use. </div><div><br></div><div>But these are hacks on individual tests. If there is a simulator which has interrupts,</div><div>I would be testing on it since you will be battling the architecture not a RAM limit.</div><div>Your project is the port not to put RTEMS into a tiny memory space. :)</div><span class="gmail-m_-2047280018615527811gmail-HOEnZb"><font color="#888888"><div><br></div><div>--joel </div><div> </div><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"><span class="gmail-m_-2047280018615527811gmail-m_6960512681043459996HOEnZb"><font color="#888888"><div><div></div>-- <br><div class="gmail-m_-2047280018615527811gmail-m_6960512681043459996m_-1531764025284667981gmail_signature">Regards, Denis Obrezkov</div>
</div></font></span></div>
</blockquote></font></span></div><br></div></div>
</blockquote></div></span>I was able to run the low ticker example further than in my earlier attempts.</div><div class="gmail_extra"><br>But now I have a problem with it:</div><div class="gmail_extra"><div class="gmail_extra">#0  memset (m=0xb98a0641, c=0, n=102) at ../../../../../gcc-7.1.0/<wbr>newlib/libc/string/memset.c:62</div><div class="gmail_extra">#1  0x20403168 in _Heap_Initialize (heap=0xb98a0641, heap_area_begin_ptr=<wbr>0x80002456, heap_area_size=7082, page_size=8)</div><div class="gmail_extra">    at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/score/src/heap.c:230</div><div class="gmail_extra">#2  0x20400954 in RTEMS_Malloc_Initialize (areas=0x80003f78, area_count=1, extend=0x0)</div><div class="gmail_extra">    at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/libcsupport/src/<wbr>malloc_initialize.c:40</div><div class="gmail_extra">#3  0x20400378 in bsp_work_area_initialize_<wbr>default (area_begin=0x80000e10, area_size=12784) at ../../../../../.././hifive1/<wbr>lib/include/bsp/bootcard.h:158</div><div class="gmail_extra">#4  0x204003c0 in bsp_work_area_initialize () at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/lib/<wbr>libbsp/riscv32/hifive1/../../<wbr>shared/bspgetworkarea.c:61</div><div class="gmail_extra">#5  0x204021bc in rtems_initialize_executive () at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/sapi/src/exinit.c:95</div><div class="gmail_extra">#6  0x2040031c in boot_card (cmdline=0x0) at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/lib/<wbr>libbsp/riscv32/hifive1/../../<wbr>shared/bootcard.c:76</div><div class="gmail_extra">#7  0x20400064 in _end_clear_bss () at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/lib/<wbr>libbsp/riscv32/hifive1/start/<wbr>start.S:116</div><div><br></div><div>I want to figure out, why it wants to use memset on these addresses, because 0x80004000 is the maximum available address.</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div class="gmail-m_-2047280018615527811gmail_signature">Regards, Denis Obrezkov</div>
</font></span></div></div>
</blockquote></div><br>I was able to proceed further after adding<div>#define CONFIGURE_UNIFIED_WORK_AREAS</div><div>to init.c of low_ticker example.</div><div>Now I get an error:</div><div><div>#0  0x2040d940 in _Chain_Initialize_node (the_node=0x80003ec0) at ../../cpukit/../../../hifive1/lib/include/rtems/score/chainimpl.h:127</div><div>#1  0x2040da82 in _Chain_Iterator_initialize (the_chain=0x80000320 <_User_extensions_List>, the_registry=0x8000032c <_User_extensions_List+12>, the_iterator=0x80003ec0, </div><div>    direction=CHAIN_ITERATOR_FORWARD) at ../../cpukit/../../../hifive1/lib/include/rtems/score/chainimpl.h:1049</div><div>#2  0x2040de90 in _User_extensions_Iterate (arg=0x80003f18, visitor=0x2040dd48 <_User_extensions_Fatal_visitor>, direction=CHAIN_ITERATOR_FORWARD)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/userextiterate.c:174</div><div>#3  0x204036c4 in _User_extensions_Fatal (source=INTERNAL_ERROR_CORE, error=4) at ../../cpukit/../../../hifive1/lib/include/rtems/score/userextimpl.h:307</div><div>#4  0x204036e8 in _Terminate (the_source=INTERNAL_ERROR_CORE, the_error=4) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:35</div><div>#5  0x20403730 in _Internal_error (core_error=INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:44</div><div>#6  0x20403824 in _ISR_Handler_initialization () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/isr.c:51</div><div>#7  0x20402170 in rtems_initialize_data_structures () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/exinit.c:82</div><div>#8  0x204021bc in rtems_initialize_executive () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/exinit.c:95</div><div>#9  0x2040031c in boot_card (cmdline=0x0) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/../../shared/bootcard.c:76</div><div>#10 0xffffcd98 in ?? ()</div><br></div><div>And I found out that rtems_minimum_stack_size variable is 0xab817bb3.</div><div>And I don't know why - in the low ticker example it is set to 512.</div><div><br></div>-- <br><div class="gmail_signature">Regards, Denis Obrezkov</div>
</div></div>