<p>This fantastic project got Go running on bare metal on a SOC. It has quite a few caveats and so far just one specific ARM architecture is supported:</p>
<p><a href="https://github.com/ycoroneos/G.E.R.T/blob/master/README.md">https://github.com/ycoroneos/G.E.R.T/blob/master/README.md</a></p>
<p>Very interesting project! I must say I don't entirely understand what kept Go from running "natively"? (Why GERT). This is not a low-memory architecture or anything. Can anyone give some additional information about the niche this fills?</p>
<hr/>**评论:**<br/><br/>brokenprogram: <pre><p>At 2GB of RAM and quad-core SoC that looks more like a real computer than embedded environment. The truth about Go and embedded environment is that a GC language can never be a good fit except if your embedded requirements are not real "embedded"(i.e. deterministic, constrained resources etc) at all. Who would run sensors driven by a GC language ? Something exciting is the upcoming Swift 5 with the release of a (opt-in) Cyclone/Rust-inspired memory ownership model. Let's hope that goes well and Go 2 would provide something similar for the poor embedded developers.</p></pre>tty5: <pre><p>Embedded system definition is fairly wide and when size & power draw constraints are not an issue it's fairly common to use general purpose hardware - most ATMs are Windows PCs</p></pre>brokenprogram: <pre><p>Using your definition I'm sure that you can plug-in a fully fledged server and connect it through USB to a bunch of i/o peripherals and call it embedded development.</p></pre>UltraNemesis: <pre><p>The definition of an Embedded system doesn't place any constraints on specs, size, operating system or real time responsiveness. </p>
<p>It is just a computer that is embedded into a larger system and dedicated to perform certain functions efficiently. An Aeroplane or Space vehicle could have multiple embedded systems of varying sizes and power. So yes, a full fledged computer could be an embedded system when its part of a larger system. </p>
<p>Just because we had practical limitations on CPU, memory or size 10~15 years back does not mean that embedded systems have to be all small single board computers with 512k RAM and operating at 100MHz. The average smart phone these days is several times more powerful than super computers from yester years.</p></pre>PaulCapestany: <pre><blockquote>
<p>Who would run sensors driven by a GC language ?</p>
</blockquote>
<p>Hardware n00b question: wouldn’t this matter only if one cared about actual real-time measurements (therefore ruling out any language with undeterministic GC pauses)?</p>
<p>For example, you wouldn’t want to use Go for sensors on SpaceX rockets, but if your sensors don’t need sub-millisecond accuracy/sampling—say, if you’re measuring temp/humidity/etc for weather readings—then Go would be okay I assume? Or am I missing something?</p></pre>tipsqueal: <pre><p>Yeah it'd be fine, it won't be perfect, but often you don't need perfect. I have built a few projects that have used sensors and I was using Python. Was it perfect? No. Did it get the job done and no one was harmed? Absolutely.</p></pre>brokenprogram: <pre><p>If you don't have real time requirements you can use anything you want but most of the time embedded development has soft/hard real-time requirements along with very constrained memory/cpu cycles.
You wouldn't use Go for your sensors on SpaceX b/c Go has a GC which is not deterministic and requires more memory/CPU than a non-GC language.
If you don't have realtime requirements and weight is not a constrain you may just run Go on your PC connect it via USB to SpaceX's i/o peripherals and send it in the space. Something tells me that SpaceX uses non-GC language(s) and most likely the most important parts have some kind of formal verification as well.</p></pre>fmontag451: <pre><p>It is known that their telemetry collection sys is written in Go. Airborne software is always formally verified, and GC doesn't play well with its non-deterministic pauses. The same goes with every non-deterministic aspect of a language, exceptions for example (<a href="http://www.stroustrup.com/JSF-AV-rules.pdf" rel="nofollow">http://www.stroustrup.com/JSF-AV-rules.pdf</a>).</p></pre>brokenprogram: <pre><p>Well, I'm sure they use all kind of languages for different needs though I doubt they are using Go for embedded tasks. I don't think the docking system is using a GC language.</p></pre>metamatic: <pre><p>NASA <a href="http://www.flownet.com/gat/jpl-lisp.html" rel="nofollow">used Common Lisp</a> for the software on <a href="https://www.jpl.nasa.gov/nmp/ds1/index.php" rel="nofollow">Deep Space One</a>. People are using <a href="http://embeddednodejs.com/" rel="nofollow">NodeJS on Arduino</a>.</p>
<p>Real time software is a small subset of embedded. Plenty of embedded software uses languages with automatic memory management.</p></pre>jadbox: <pre><blockquote>
<p>upcoming Swift 5 with the release of a (opt-in) Cyclone/Rust-inspired memory ownership</p>
</blockquote>
<p>So why not just use Rust now?</p></pre>30061992: <pre><p>Swift will probably allow both memory models, Rust only has 1</p></pre>LadyDascalie: <pre><p>This really is impressive</p></pre>ksirutas: <pre><p>Scientists were always asked whether or not they <em>could</em>, but no one stopped to think whether or not they <em>should</em>.</p>
<p>In all seriousness, with GccGo, I imagine all you have to do is either nix the runtime, or severely mangle it to the point that you can fit “Hello World” on a 32kb IAR Workbench free license. It seems like a pretty cool project imo. But I’ll still use C in my day job :P</p></pre>sacrehubert: <pre><blockquote>
<p>Scientists were always asked whether or not they could, but no one stopped to think whether or not they should.</p>
</blockquote>
<p>And the engineer said "don't explore; I won't use it".</p>
<p>"Useless" science feeds engineering, as you surely know.</p></pre>ksirutas: <pre><p>Never said it was useless; my joke wasn’t well received I guess. Embedded systems are difficult to understand to a beginner. Go is an insanely easy language to learn beginner concepts from. The two merging would be great! I was just assuming this would be geared towards Go on an Arduino for this booming IoT phase of commercial electronics, which isn’t really possible.</p></pre>throwawaybeginr: <pre><p>if I read the specs right (I just did a quick google) that board has like 2 GB of RAM. It's a beefy quad-core SoC.</p></pre>ksirutas: <pre><p>That’s not my idea of an “embedded system”. It’s a cool board and a cool project though. I was hoping it was a rewritten runtime sort of like Rusts #[no_std], compiled with gccgo that enables most of the features of Go to be run on a micro controller.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传