<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>the core services as here explained must be maintained CPU and memory management regardless of any other tasks, I don't think even Gnu/Linux is capable of doing this today:<br>http://www.poppyfields.net/acorn/news/acopress/97-02-10b.shtml<br><br>Core services independent of platform are the top part to maintain available during updates over network, interesting service.<br><br> I would use their RT rather than CM3, which is nice but not for embedded OS kernel, certainly.<br>Never released guess why?<br>Thanks in advance<br><br>--- El <b>sáb, 5/1/13, Darko <i><darko@darko.org></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Darko <darko@darko.org><br>Asunto: Re: [M3devel] Bare Metal Modula-3<br>Para: "Jay K" <jay.krell@cornell.edu><br>CC: "m3devel"
<m3devel@elegosoft.com><br>Fecha: sábado, 5 de enero, 2013 03:24<br><br><div id="yiv1743452549"><div><div>That shouldn't be hard, there's a detailed guide here using GCC:</div><div><br></div><div><a rel="nofollow" target="_blank" href="http://www.state-machine.com/arm/Building_bare-metal_ARM_with_GNU.pdf">http://www.state-machine.com/arm/Building_bare-metal_ARM_with_GNU.pdf</a></div><div><br></div><div>Building an ARM cross compiler will be a bit more involved and although there don't seem to be any fundamental dependencies in the runtime I get the feeling separating the M3 minimalist portion from the OS dependent portion is going to be messy.</div><div> </div><div><br></div><br><div><div>On Jan 4, 2013, at 6:40 PM, Jay K wrote:</div><br class="yiv1743452549Apple-interchange-newline"><blockquote type="cite"><div class="yiv1743452549hmmessage" style="font-size: 12pt; font-family: Calibri;"><div dir="ltr">Get hello world running on your system
first, written in C. Then get back to us. :)<br>Seriously.<br> <br>Ok, maybe not with stdio.<br>At least this:<br> <br>int main()<br>{<br> malloc(1);<br> return 0;<br>}<br> <br> <br> - Jay<br> <br><div><div id="yiv1743452549SkyDrivePlaceholder"></div><hr id="yiv1743452549stopSpelling">Subject: Re: [M3devel] Bare Metal Modula-3<br>From:<span class="yiv1743452549Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:darko@darko.org" target="_blank" href="/mc/compose?to=darko@darko.org">darko@darko.org</a><br>Date: Fri, 4 Jan 2013 16:45:27 -0800<br>CC:<span class="yiv1743452549Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>To:<span class="yiv1743452549Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:jay.krell@cornell.edu" target="_blank"
href="/mc/compose?to=jay.krell@cornell.edu">jay.krell@cornell.edu</a><br><br><div>That's useful to know. It makes implementing memory allocation very straight forward. All I'd need to implement would be some calls for setting aside pages of memory and setting their read/write status, which would be directly supported by the hardware.</div><div><br></div><div>It also occurs to me I'd have to write some sort of loader, which shouldn't be difficult as long as I can link the m3 program into some sort of monolithic "raw" format that I can just copy into a fixed place in memory and start executing.</div><div><br></div><div><br></div><br><div><div>On Jan 4, 2013, at 4:36 PM, Jay K wrote:</div><br class="yiv1743452549ecxApple-interchange-newline"><blockquote><span class="yiv1743452549ecxApple-style-span" style="text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows:
2;"><div class="yiv1743452549ecxhmmessage" style="font-family: Calibri; font-size: 12pt;"><div dir="ltr">Clarification regarding mmap.<br> <br> <br>mmap has two fairly different purposes in Posix.<br> <br> <br> 1) to "map a file" into memory<span class="yiv1743452549ecxApple-converted-space"> </span><br> 2) to "allocate memory", probably with address and size page-aligned, probably for relatively large allocations (i.e. ones you don't mind rounding up to a page size). <span class="yiv1743452549ecxApple-converted-space"> </span><br> <br> #1 is the more obvious probably better known use. The one I knew of. The one it sounds like.<span class="yiv1743452549ecxApple-converted-space"> </span><br> #2 is what we use it for. <span class="yiv1743452549ecxApple-converted-space"> </span><br> <br> <br>If we ever autoconf-m3core, it'd probably be reasonable
to do something like:<br> <br> <br>#if HAS_MMAP<br>return mmap(...);<br> <br>#elif HAS_CALLOC<br> <br>void** p = (void**)calloc(size + sizeof(void*));<br>if (!p) return p;<br>p[0] = p;<br>return p + 1;<br> <br>#else<br>#error<br>#endif<br> <br> <br>#if HAS_MMAP<br>munmap(...);<br> <br>#elif HAS_CALLOC<br> <br>if (p)<br> free(((void**)p)[-1]);<br> <br>#endif<br> <br> <br>alternatively though, look for every directory named "POSIX" and make a copy of it, and modify as needed.<br>Including assert(0) in places.<br>Invent your own value for "OS_TYPE".<br> <br> <br>Maybe<br> #define OS_TYPE_FOO<span class="yiv1743452549ecxApple-converted-space"> </span><br> #include ../POSIX/Foo.c<span class="yiv1743452549ecxApple-converted-space"> </span><br> <br>and #ifndef OS_TYPE_FOO in Foo.c, if it isn't too messy.<br> <br> <br>Sharing code can be good or
bad.<br> <br> <br>We don't actually use "memory protection".<br>Er, well..maybe we do...we might have code that allocates stacks, and makes a page at either end inaccessible.<br>This is nice. It might be required for "safety".<br>It might also be a good idea to have a flag in Target.i3 that says the target needs calls in prologues to check for stack overflow, and use that instead.<br>More portable -- i.e. doesn't require hardware page protection -- but bigger/bloated/slower.<br> <br> <br> <br>Really you need to look at all the POSIX/PTHREAD/WIN32 directories, esp. in m3core and libm3.<br>You make a much different system, you get to do the port.<br>It is neither impossible nor a no-op.<br> <br> <br> - Jay<br><br><br><br><br> <br><div><div id="yiv1743452549ecxSkyDrivePlaceholder"></div><hr id="yiv1743452549ecxstopSpelling">From:<span class="yiv1743452549ecxApple-converted-space"> </span><a rel="nofollow"
ymailto="mailto:darko@darko.org" target="_blank" href="/mc/compose?to=darko@darko.org">darko@darko.org</a><br>Date: Fri, 4 Jan 2013 12:09:26 -0800<br>To:<span class="yiv1743452549ecxApple-converted-space"> </span><a rel="nofollow" ymailto="mailto:dabenavidesd@yahoo.es" target="_blank" href="/mc/compose?to=dabenavidesd@yahoo.es">dabenavidesd@yahoo.es</a><br>CC:<span class="yiv1743452549ecxApple-converted-space"> </span><a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] Bare Metal Modula-3<br><br><div>It's not a realtime system, so that's not a problem. Have a look at my reply to Jay you'll see a fuller description of what I have in mind.</div><div><br></div><br><div><div>On Jan 4, 2013, at 10:46 AM, Daniel Alejandro Benavides D. wrote:</div><br class="yiv1743452549ecxApple-interchange-newline"><blockquote><table border="0"
cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; -x-system-font: none; font-stretch: inherit;" valign="top">Hi all:<br>I think you just need runtime executive on top a machine would be enough.<br>For instance VAXELN.<span class="yiv1743452549ecxApple-converted-space"> </span><br>Problem is you would need realtime core services at the language level (somehow SPIN services with no protection overhead caused by language).<br>Memory managament. and threading are core services in VAXELN as part of system, just need bindings for each language.<br>I guess you need and advanced distributed realtime system. Such was VMS 5 for rtVAX9000:<br><a rel="nofollow" target="_blank"
href="http://books.google.com.co/books?id=TzUXAQAAMAAJ&dq=">http://books.google.com.co/books?id=TzUXAQAAMAAJ&dq=</a>"%2C+in+conjunction+with+VMS.+VAXELN%2C+which+provides+optimal+performance+for"&q="+which+provides+optimal+performance+for"#search_anchor<br><br>My hypothesis is that you can't bring up a realtime application in an embedded device like you want.<br>I know of realtime OS in Modula-3, there must be several ones I guess, based on what I have researched but you can not trust whether they are embedded, that's the problem.<br>Thanks in advance<br><br><br>--- El<span class="yiv1743452549ecxApple-converted-space"> </span><b>vie, 4/1/13, Darko<span class="yiv1743452549ecxApple-converted-space"> </span><i><<a rel="nofollow" ymailto="mailto:darko@darko.org" target="_blank" href="/mc/compose?to=darko@darko.org">darko@darko.org</a>></i></b><span
class="yiv1743452549ecxApple-converted-space"> </span>escribió:<br><blockquote style="padding-left: 5px; margin-left: 5px;"><br>De: Darko <<a rel="nofollow" ymailto="mailto:darko@darko.org" target="_blank" href="/mc/compose?to=darko@darko.org">darko@darko.org</a>><br>Asunto: [M3devel] Bare Metal Modula-3<br>Para: "m3devel developers" <<a rel="nofollow" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="/mc/compose?to=m3devel@elegosoft.com">m3devel@elegosoft.com</a>><br>Fecha: viernes, 4 de enero, 2013 04:16<br><br><div class="yiv1743452549ecxplainMail">I'm interested in deploying M3 into a kind-of embedded environment where efficiency and performance are key and I want to avoid installing an OS beyond a simple supervisor that manages the hardware.<span class="yiv1743452549ecxApple-converted-space"> </span><br><br>The services needed are threading, memory allocation and network access. I'm figuring the first two already
exist in M3 and a network stack can be found.<br><br>The question I have is can all of the OS specific runtime can be removed? Beyond maybe a timer and possibly some memory protection functionality, what does M3 need to run threading and garbage collection?<br><br>- Darko<br><br></div></blockquote></td></tr></tbody></table></blockquote></div><br></div></div></div></span><br class="yiv1743452549ecxApple-interchange-newline"></blockquote></div><br></div></div></div><br class="yiv1743452549Apple-interchange-newline"></blockquote></div><br></div></div></blockquote></td></tr></table>