5 ms·
To be fair on microcontrollers there aren't many other options. (Don't say Rust.)
by IshKebab 10y ago
To be fair on microcontrollers there aren't many other options. (Don't say Rust.)
- fulafel 10y agoThis is not bleeding edge stuff, some systems in the 70s with fraction of the RAM and CPU power had memory safety. Eg see here about running Ada on the same Cortex M4: http://www.ganssle.com/video/episode9-ada-on-a-microcontroller.html http://www.ganssle.com/video/episode9-ada-on-a-microcontroll...
- pjmlp 10y agoAda, Pascal, Basic, Oberon, Java. On the phone now, but can easily provide links to vendors selling compilers targeting microcontrollers, for all those languages.
- qb45 10y agoAre there really commercial BASIC and Oberon compilers targeting ARM microcontrollers? It seems the world is a much richer place then I have ever imagined :)
- pjmlp 10y agoYes there are. MikroElectronica sells Basic and Pascal compilers. https://www.mikroe.com/ https://www.mikroe.com/ Astrobe sells Oberon compilers http://www.astrobe.com/default.htm http://www.astrobe.com/default.htm
- IshKebab 10y agoJava please. There's absolutely no way that can run on the kind of microcontroller we're talking about. Did you read the part about having 300 bytes spare?!
- pjmlp 10y agoI am on the phone right now, but I can gladly post later a few links of commercial JVMs for microcontrollers. There is a Java life beyond OpenJDK. Unless you want to discuss PICs and then I give you reason.
- fulafel 10y agoI think you are reading too much into the ROM containing "less than 300 unused bytes". It's probably not a coincidence that it just happened to fit in the possible space so snugly! Anyway, there are commercial Java supporting microcontrollers with smaller hardware (memory & cpu power) than this ARM microcontroller. Eg. MicroEJ.
- IshKebab 10y agoAm I? Did you read the bit about how they reclaim memory used for initialisation and convert it to heap space? How is that going to work with Java?! I tried to find information about MicroEJ but their website doesn't really tell you anything. I assume it supports something like Java Card rather than actual Java.
- fulafel 10y agoThese kind of space restrictions have forces from 2 sides that meet in the middle: (1) sizing the space, for cost reasons (2) spending engineering effort on space usage. 768 kB of RAM (on top of the ROM holding program data) holds a lot of state. There exist TCP/IP stacks and JS interpreters with RAM requirements of 2 kB, ~3 orders of magnitude less. About jettisoning init code and data, I don't know specifics here but Java the language supports heap space recycling and code (class) unloading very well.