<div dir="ltr">I didn't want to enable optimization because I was afraid of new mistakes. <div>So, I enabled -Os and now I have:</div><div><div>_Terminate (the_source=the_source@entry=INTERNAL_ERROR_CORE, the_error=the_error@entry=3)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:44</div><div>44        _CPU_Fatal_halt( the_source, the_error );</div><div>(gdb) i s</div><div>#0  _Terminate (the_source=the_source@entry=INTERNAL_ERROR_CORE, the_error=the_error@entry=3)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:44</div><div>#1  0x20401672 in _Internal_error (core_error=core_error@entry=INTERNAL_ERROR_WORKSPACE_ALLOCATION)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/interr.c:51</div><div>#2  0x20404968 in _Workspace_Allocate_or_fatal_error (size=<optimized out>) at ../../cpukit/../../../hifive1/lib/include/rtems/score/heapimpl.h:137</div><div>#3  0x20401f76 in _Objects_Extend_information (information=0x80000ad4 <_RTEMS_tasks_Information>)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/objectextendinformation.c:70</div><div>#4  0x20402110 in _Objects_Do_initialize_information (information=information@entry=0x80000ad4 <_RTEMS_tasks_Information>, the_api=the_api@entry=OBJECTS_CLASSIC_API, </div><div>    the_class=<optimized out>, maximum=maximum@entry=124, size=<optimized out>, is_string=<optimized out>, maximum_name_length=maximum_name_length@entry=4)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/objectinitializeinformation.c:118</div><div>#5  0x20402e3a in _Thread_Initialize_information (information=information@entry=0x80000ad4 <_RTEMS_tasks_Information>, the_api=the_api@entry=OBJECTS_CLASSIC_API, </div><div>    the_class=the_class@entry=1, maximum=124, is_string=is_string@entry=false, maximum_name_length=maximum_name_length@entry=4)</div><div>    at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/score/src/thread.c:57</div><div>#6  0x20400ff8 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>#7  0x2040112e in rtems_initialize_executive () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/exinit.c:92</div><div>#8  0x20400496 in boot_card (cmdline=<optimized out>) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/../../shared/bootcard.c:78</div><div><br></div><div>Though, the size of executable is much lower (almost two times),</div><div>but I get this mistake. And as for now I can't understand do I have the error</div><div>due to optimization or has the optimization revealed another issue?</div><div><br></div>-- <br><div class="gmail_signature">Regards, Denis Obrezkov</div>
</div></div>