News for hackers. Stuff that matters.
Re:GERT: Run Go on Bare Metal ARMv7 by zzalpha on Monday June 19, 2017 @07:48PM (#14591246)
I'm really not sure the drive for garbage collected languages in memory constrained systems with no user recoverability. Seems like a recipe for a device that just stops working from time to time.

J2ME would like to have a word with you...

Re:GERT: Run Go on Bare Metal ARMv7 by sp0ck on Tuesday June 20, 2017 @03:50AM (#14592820)
J2ME is nowhere near being hard real-time. Minimal Java ME Embedded configuration: 32-bit MCU, 130 KB RAM, 350 KB Flash/ROM. This is close to border where systems have MMU and is considered very "big" configuration in realm of embedded systems. 10-20 kB RAM/64kB flash is a lot for many many applications. Rust seems to be on a good path to be the real C competitor in general bare-metal development. Right now Cortex-M* family support is on level when you can start writing some apps in it. I'm not considering Ada to be mainstream.
Re:GERT: Run Go on Bare Metal ARMv7 by pjmlp on Tuesday June 20, 2017 @04:47AM (#14593012)
J2ME is not the only game in town for embedded Java, check Aonix and Aicas offerings instead.

As another example, MicroEJ is targeted at Cortex-M CPUs.

And there is also Astrobe selling Oberon-07 compilers for M3 and M4 processors.

> 32-bit MCU, 130 KB RAM, 350 KB Flash/ROM

Anything less than this is most certainly some kind of PIC, not everyone is using them for embedded real-time deployments.

Re:GERT: Run Go on Bare Metal ARMv7 by sp0ck on Tuesday June 20, 2017 @05:05AM (#14593069)
Correct me if I'm wrong: Aonix is not existing - it was bought by PTC. Their real time Java is now targeting only x64/x86 systems.

You are wrong about "anything less" Anything less is probably 90% of market. You will find 130kB RAM, 350kB flash only in high end products from NXP(LCP family), Kinetis(KL family) or STI( STM family). You only need so much RAM for JAVA :)

Re:GERT: Run Go on Bare Metal ARMv7 by nickpsecurity on Tuesday June 20, 2017 @01:39PM (#14596692)
I believe his point was they implemented hard-real-time, embedded Java with GC on some components that was fielded successfully. That refutes any objection to whether it can be done. At that point, we're talking whether the new project can pull that off on what kind of hardware with what constraints.

EDIT to clear up two sub-conversations here: what Aonix pulled off for hard-real-time Java; that there's also hard-real-time GC's for embedded. Example of latter.

http://michaelrbernste.in/2013/06/03/real-time-garbage-colle...

Re:GERT: Run Go on Bare Metal ARMv7 by pjmlp on Tuesday June 20, 2017 @05:24AM (#14593156)
Yes, they were bought by PTC.

However I don't know what they have done with the PicoJava offerings, since PTC isn't as friendly as Aonix regarding the making the documentation available.

As for the market, it depends on which one the products built with those CPUs are actually being sold to.

My Cisco phone and the Ricoh printer around the corner both are running some form of embedded Java.

Maybe you think they are part of the remaining 10%, however Cisco and Ricoh though it was worthwhile for their sales.

Re:GERT: Run Go on Bare Metal ARMv7 by sp0ck on Tuesday June 20, 2017 @12:36PM (#14596059)
I believe we have different definition of embedded system. There are a lot of them, for me simplest definition is CPU/uC system without MMU. Those Cisco Ricoh gear have Linux running inside (at least for phone I have it's some 200MHz MIPS)
Re:GERT: Run Go on Bare Metal ARMv7 by nickpsecurity on Tuesday June 20, 2017 @01:43PM (#14596744)
"I believe we have different definition of embedded system. "

Counterpoint:

http://www.atmel.com/Images/45107A-Choosing-a-MCU-Fredriksen...

The 32-bit market was at $6 billion by 2014 per Amtel's report. There's also a huge amount of sales for Windows Embedded and embedded Linux's. That represents a significant chunk of a massive market. So, it's quite worthwhile to call even a 32-bit-targeted, hard-real-time GC useful for "embedded" systems. As he said, it's part of the standard definition used in the embedded sector. The 32-bit side is going up rapidly, too, due to decreasing cost and power usage.

EDIT: The specs on them are also starting to look like the desktops of old. Actually, started to do that quite a while ago.

https://cache.freescale.com/files/32bit/doc/fact_sheet/IMX7S...

Re:GERT: Run Go on Bare Metal ARMv7 by pjmlp on Tuesday June 20, 2017 @12:56PM (#14596247)
My definition is the market definition, it doesn't single out to one specific architecture design.

The market goes all the way from something like the PIC10 to something ARM v8 64 bit.

It is all a matter of what a company is targeting as customer market, and how much it is willing to spend.

Just because a given language is not able to target 100% of the market, it doesn't make it invalid to such market.

If that was the case, C wouldn't be a valid language for embedded development as well, given that many CPU/uC aren't able to cope with straigh ANSI C compliant compilers and require either a C dialect or pure Assembly.

Re:GERT: Run Go on Bare Metal ARMv7 by zzalpha on Tuesday June 20, 2017 @09:49AM (#14594563)
J2ME is nowhere near being hard real-time.

...and?

Believe it or not, not every embedded application has a hard real-time requirement.

You're just moving the OP's goalposts to make a point, here.

Re:GERT: Run Go on Bare Metal ARMv7 by HeyLaughingBoy on Tuesday June 20, 2017 @02:02PM (#14596944)
No, he's making the point that the latency introduced by a GC is most important in the case of a hard real-time system. If J2ME isn't one, then using it as an example is specious.
Re:GERT: Run Go on Bare Metal ARMv7 by arcticbull on Monday June 19, 2017 @07:53PM (#14591266)
Hah, that's a fair point, actually. Maybe I'm using a different definition of 'embedded system'. To me, anything that's a general purpose application processor these days (i.e. capable of running Linux) barely fits the definition. I wouldn't really call the iPhone CPU an 'embedded system' although, I guess, it kind of is.
Re:GERT: Run Go on Bare Metal ARMv7 by zzalpha on Monday June 19, 2017 @07:56PM (#14591278)
Hah, that's a fair point, actually. Maybe I'm using a different definition of 'embedded system'. To me, anything that's a general purpose application processor these days (i.e. capable of running Linux) barely fits the definition.

I'd say that's a bit myopic.

There's a huge range of devices between "a few kilobytes of memory" and "smartphone" that would be well-served by something like this.

Re:GERT: Run Go on Bare Metal ARMv7 by gok on Monday June 19, 2017 @07:59PM (#14591283)
I agree with you that there's many device in that range, but why are they not well served by using an operating system? When is a device large enough to run the whole Go runtime but too small for (say) Linux?
Re:GERT: Run Go on Bare Metal ARMv7 by zzalpha on Tuesday June 20, 2017 @12:06AM (#14592129)
Compared to a complete Linux kernel, the Go runtime is pretty tiny.

Buy to your point there is no magic answer. The question is rather: when is the capabilities of a full OS kernel like Linux worth the resources needed to run it? And the answer is ultimately: it depends.

Re:GERT: Run Go on Bare Metal ARMv7 by taneq on Tuesday June 20, 2017 @01:06AM (#14592335)
J2ME would like to have a wo

...

....

...

.....

rd with you.

Re:GERT: Run Go on Bare Metal ARMv7 by pjmlp on Tuesday June 20, 2017 @01:54AM (#14592471)
It appears you are running on DalvikVM instead.
Re:GERT: Run Go on Bare Metal ARMv7 by josefx on Tuesday June 20, 2017 @07:29AM (#14593665)
He just compiled it with gcj. It offers the best of both worlds: The performance of an interpreted language with the standard library of C.
Re:GERT: Run Go on Bare Metal ARMv7 by josefx on Tuesday June 20, 2017 @07:21AM (#14593617)
and JavaCard 1.0 wants to know what a GC is. No need to throw away perfectly fine objects.
Re:GERT: Run Go on Bare Metal ARMv7 by nickpsecurity on Tuesday June 20, 2017 @01:51PM (#14596842)
A few of it's family members will even proof mathematically that they won't throw those objects away.

https://www.commoncriteriaportal.org/iccc/9iccc/pdf/B2404.pd...

http://www.cs.nott.ac.uk/~pszgmh/appsem-slides/barthe.pdf