by randomacct44 on 5/15/16, 11:43 PM with 22 comments
My usual Google skills aren't getting me anywhere on this one :)
by danielvf on 5/16/16, 2:41 AM
2. The automotive industry has a standard for safety critical C code. It's called MISRA C. A few of the rules are stupid, but others will save you worlds of issues. You have to buy the PDF from the committee's website for about 15 bucks, but it's worth reading and mostly following.
3. If you are actually writing medical or flight control software, you cannot depend on a single proccesor or computer. Perfect software is not enough. Airliners have three separate computers, each containing three different processor architecture processors, each processor running code compiled on a different compiler, and all checking each others work. SpaceX runs at least five separate embedded linux computers for any critical systems. These communicate in such a way that they can tolerate even malicious actions by any two computers. Google "byzantine fault tolarance"
by burfog on 5/16/16, 4:02 AM
Get all the tools. There are free tools like "sparse", a tool Linus wrote for his kernel. There are expensive tools like Coverity. Get them all. Use them all.
Build your code with all the warnings enabled. Use multiple compilers, even if they don't compile for your target.
by atomical on 5/16/16, 2:26 AM
by viraptor on 5/16/16, 12:31 AM
Of course a lot of safety critical stuff is still written in C or C++. They may not be perfect, but they're not terrible choices.
by Tomte on 5/16/16, 11:35 AM
In factory automation I have only ever seen C, and AFAIK automotive is the same (they seem to be more open to C++, though).
Most of safety-critical development (as I know it -- again, no satelites or nuclear stuff) is documentation, testing and FMEAs. Quite a bit of "patterns" or procedures, as well, like memory testing in the background, redundant variables, cross checks between controllers, plausibility checks etc.
But very, very little focus on saner programming languages.
by eric_bullington on 5/17/16, 10:20 PM
And it looks like some folks have already been using Ada on the ESP8266, here are instructions: https://github.com/RREE/esp8266-ada/wiki/Steps-for-building-...
by kognate on 5/16/16, 12:43 AM
https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Dev...
The summary would be:
Use vanilla C with some rules about things like memory, testing, and recursion. Testing and static analysis are your friends.
by probinso on 5/16/16, 5:00 AM
by samfisher83 on 5/16/16, 12:48 AM
by technion on 5/16/16, 5:45 AM
The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and microcontroller capability produced by Shanghai-based Chinese manufacturer, Espressif.
Am I alone in the concern that in a safety critical environment, the phrase "low cost" should be more of a concern than the choice of language?by superboum on 5/16/16, 1:04 PM
Unfortunately, I only know their name and never use it.
by spraak on 5/15/16, 11:48 PM
by jotux on 5/16/16, 4:51 PM