<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-07-20 11:48 GMT+02:00 Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</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">On 20/07/17 11:34, Denis Obrezkov wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2017-07-18 14:10 GMT+02:00 Joel Sherrill <<a href="mailto:joel.sherrill@gmail.com" target="_blank">joel.sherrill@gmail.com</a> <mailto:<a href="mailto:joel.sherrill@gmail.com" target="_blank">joel.sherrill@gmail.co<wbr>m</a>>>:<span class="gmail-"><br>
<br>
I am not near a computer to check but is there a section in the<br>
Configuring a System chapter with a low memory example? I know the<br>
individual options are documented but an example configuration<br>
with the safer ones to use might help users.<br>
<br>
Could you point me to the documentation with the Configuration a System chapter?<br>
</span></blockquote>
<br>
For real low memory systems we need self-contained objects and a static initialization.<br>
<br>
<a href="https://lists.rtems.org/pipermail/devel/2017-February/016874.html" rel="noreferrer" target="_blank">https://lists.rtems.org/piperm<wbr>ail/devel/2017-February/016874<wbr>.html</a><br>
<br>
For threads we can use something like this:<br>
<br>
struct my_thread {<br>
Thread_Control thread;<br>
char space_for_thread_control_addon<wbr>s_and_tls_and_stack[N];<br>
} a;<br>
<br>
SYSINIT_THREAD(&a, sizeof(a));<br>
<br>
If sizeof(a) is too small, then issue a fatal error.<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : <a href="tel:%2B49%2089%20189%2047%2041-16" value="+4989189474116" target="_blank">+49 89 189 47 41-16</a><br>
Fax : <a href="tel:%2B49%2089%20189%2047%2041-09" value="+4989189474109" target="_blank">+49 89 189 47 41-09</a><br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brain<wbr>s.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
</font></span></blockquote></div>I also have a mistake, it happens I think due to memory corruption:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">#0 rtems_heap_allocate_aligned_with_boundary (size=541091836, alignment=2147499792, boundary=0)</div><div class="gmail_extra"> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/libcsupport/src/malloc_deferred.c:59</div><div class="gmail_extra">#1 0x20417656 in malloc (size=32) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/libcsupport/src/malloc.c:39</div><div class="gmail_extra">#2 0x20417052 in calloc (nelem=1, elsize=32) at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/libcsupport/src/calloc.c:34</div><div class="gmail_extra">#3 0x20401296 in rtems_termios_device_install (device_file=0x2041fe20 "/dev/console", handler=0x2041fe30 <fe310_uart_handler_polled>, flow=0x0, context=0x80000060 <driver_context>)</div><div class="gmail_extra"> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/libcsupport/src/termios.c:139</div><div class="gmail_extra">#4 0x2040091e in console_initialize (major=0, minor=0, arg=0x0)</div><div class="gmail_extra"> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/lib/libbsp/riscv32/hifive1/console/fe310-uart.c:49</div><div class="gmail_extra">#5 0x20419632 in rtems_io_initialize (major=0, minor=0, argument=0x0)</div><div class="gmail_extra"> at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/ioinitialize.c:36</div><div class="gmail_extra">#6 0x2040893e in _IO_Initialize_all_drivers () at /home/reprofy/Projects/riscv/rtems/development/rtems/kernel/rtems-riscv/c/src/../../cpukit/sapi/src/io.c:33</div><div class="gmail_extra">#7 0x204088e2 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 class="gmail_extra">#8 0x2040045a 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 class="gmail_extra">#9 0xffffd270 in ?? ()</div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Regards, Denis Obrezkov</div>
</div></div>