<div dir="ltr"><div>Hello all,</div><div><br></div>I was able to proceed further via setting rtems_minimum_stack_size manually to 0x200.<div>Now I have another error, my backtrace:</div><div>#0 0x20403728 in _Internal_error (core_error=INTERNAL_ERROR_WORKSPACE_ALLOCATION)</div><div> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:44</div><div>#1 0x2040ec40 in _Workspace_Allocate_or_fatal_error (size=2976696) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/wkspace.c:163</div><div>#2 0x2040f0e6 in _Freechain_Initialize (freechain=0x80000c3c <_RTEMS_tasks_Information+60>, allocator=0x2040ec16 <_Workspace_Allocate_or_fatal_error>, number_nodes=41343, node_size=72)</div><div> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/freechain.c:31</div><div>#3 0x20409346 in _Thread_Initialize_information (information=0x80000c00 <_RTEMS_tasks_Information>, the_api=OBJECTS_CLASSIC_API, the_class=1, maximum=3908149631, is_string=false, </div><div> maximum_name_length=4) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/thread.c:68</div><div>#4 0x20401dac in _RTEMS_tasks_Manager_initialization () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/rtems/src/tasks.c:72</div><div>#5 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>#6 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>#7 0xffffcd98 in ?? ()</div><div><br></div><div>Is RTEMS trying to allocate 2976696 bytes?</div><div>It seems to me, that .data region is not properly initialized. What do you think about this?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-18 1:31 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5"><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="m_84867270467022566gmail-"><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="m_84867270467022566gmail-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="m_84867270467022566gmail-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="m_84867270467022566gmail-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="m_84867270467022566gmail-m_-2047280018615527811gmail-m_6960512681043459996HOEnZb"><font color="#888888"><div><div></div>-- <br><div class="m_84867270467022566gmail-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/newli<wbr>b/libc/string/memset.c:62</div><div class="gmail_extra">#1 0x20403168 in _Heap_Initialize (heap=0xb98a0641, heap_area_begin_ptr=0x80002456<wbr>, heap_area_size=7082, page_size=8)</div><div class="gmail_extra"> at /home/reprofy/Projects/riscv/r<wbr>tems/development/rtems/kernel/<wbr>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/r<wbr>tems/development/rtems/kernel/<wbr>rtems-riscv/c/src/../../<wbr>cpukit/libcsupport/src/malloc_<wbr>initialize.c:40</div><div class="gmail_extra">#3 0x20400378 in bsp_work_area_initialize_defau<wbr>lt (area_begin=0x80000e10, area_size=12784) at ../../../../../.././hifive1/li<wbr>b/include/bsp/bootcard.h:158</div><div class="gmail_extra">#4 0x204003c0 in bsp_work_area_initialize () at /home/reprofy/Projects/riscv/r<wbr>tems/development/rtems/kernel/<wbr>rtems-riscv/c/src/lib/libbsp/<wbr>riscv32/hifive1/../../shared/<wbr>bspgetworkarea.c:61</div><div class="gmail_extra">#5 0x204021bc in rtems_initialize_executive () at /home/reprofy/Projects/riscv/r<wbr>tems/development/rtems/kernel/<wbr>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/r<wbr>tems/development/rtems/kernel/<wbr>rtems-riscv/c/src/lib/libbsp/<wbr>riscv32/hifive1/../../shared/<wbr>bootcard.c:76</div><div class="gmail_extra">#7 0x20400064 in _end_clear_bss () at /home/reprofy/Projects/riscv/r<wbr>tems/development/rtems/kernel/<wbr>rtems-riscv/c/src/lib/libbsp/<wbr>riscv32/hifive1/start/start.S:<wbr>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="m_84867270467022566gmail-HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div class="m_84867270467022566gmail-m_-2047280018615527811gmail_signature">Regards, Denis Obrezkov</div>
</font></span></div></div>
</blockquote></div><br></div></div>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/<wbr>lib/include/rtems/score/<wbr>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_<wbr>FORWARD) at ../../cpukit/../../../hifive1/<wbr>lib/include/rtems/score/<wbr>chainimpl.h:1049</div><div>#2 0x2040de90 in _User_extensions_Iterate (arg=0x80003f18, visitor=0x2040dd48 <_User_extensions_Fatal_<wbr>visitor>, direction=CHAIN_ITERATOR_<wbr>FORWARD)</div><div> at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/score/src/<wbr>userextiterate.c:174</div><div>#3 0x204036c4 in _User_extensions_Fatal (source=INTERNAL_ERROR_CORE, error=4) at ../../cpukit/../../../hifive1/<wbr>lib/include/rtems/score/<wbr>userextimpl.h:307</div><div>#4 0x204036e8 in _Terminate (the_source=INTERNAL_ERROR_<wbr>CORE, the_error=4) at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/score/src/interr.c:35</div><div>#5 0x20403730 in _Internal_error (core_error=INTERNAL_ERROR_<wbr>INTERRUPT_STACK_TOO_SMALL)</div><div> at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/score/src/interr.c:44</div><div>#6 0x20403824 in _ISR_Handler_initialization () at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/score/src/isr.c:51</div><div>#7 0x20402170 in rtems_initialize_data_<wbr>structures () at /home/reprofy/Projects/riscv/<wbr>rtems/development/rtems/<wbr>kernel/rtems-riscv/c/src/../..<wbr>/cpukit/sapi/src/exinit.c:82</div><div>#8 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>#9 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>#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><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_84867270467022566gmail_signature">Regards, Denis Obrezkov</div>
</font></span></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>