514

It's running 2.5 million lines of C on a RAD750 processor manufactured by BAE. The JPL has a bit more information but I do suspect many of the details are not publicized. It does appear that the testing scripts were written in Python. The underlying operating system is Wind River's VxWorks RTOS. The RTOS in question can be programmed in C, C++, Ada or Java....


175

The code is based on that of MER (Spirit and Opportunity), which were based off of their first lander, MPF (Sojourner). It's 3.5 million lines of C (much of it autogenerated), running on an RA50 processor manufactured by BAE and the VxWorks operating system. Over a million lines were hand coded. The code is implemented as 150 separate modules, each ...


35

No, not at all ! Abstractions and good practices can of course reduce the risks of errors. For example: language abstractions let the compiler generate code, that you would have to write yourself otherwise. For example, the C++ object model ensures that object constructed are destroyed as they supposed to be, without extra care on your shoulders; these ...


34

I think you are misrepresenting the message of the "Modern C++ in Embedded Systems" video. The point is that there are people in the embedded world that write code and then test it by running the code in the debugger to verify that it does what they think it does. He argues that a better alternative is to use abstractions so that the compiler can verify that ...


22

This question basically boils down to "can you write bug free code the first time every time?” The answer is always going to be no. Yes, there are practices that can help, you can isolate modules. You can compile both for the embedded and desktop, then test and develop on the desktop. You can create hardware abstraction layers that help isolate those ...


22

Your first problem is that you think of the design as "wrong." That's really not the right way to consider things. Rather, different designs make different design trade-offs. Any design has pros and cons that have weighed against each other. If there is a problem with the design it's not that is "wrong" but rather that it makes a poor choice of trade-offs. ...


19

Unless you have at least 3 use-cases where the algorithms will be used with different types and sizes, you are not going to do good job of the genericity anyway. So don't bother too much. I'd recommend writing it in plain C using custom typedefs for all types (except things that are obviously size_t, int or such) and #defines for any relevant sizes. Than ...


19

(Edit: 12/7/2017, a year later, I found an authoritative answer) In an article on software development for NASA space missions. https://www.nasa.gov/pdf/418878main_FSWC_Final_Report.pdf On page 31, the following table is in the graph showing a decent fit to a logarithmic increase in lines of code : (So, my 3K estimate was right on the money.) 1969 Mariner-...


14

This article in Wired makes it clear that the code was written in Fortran 5 and later ported to Fortran 77 and some elements are now in a version of C: The spacecrafts’ original control and analysis software was written in Fortran 5 (later ported to Fortran 77). Some of the software is still in Fortran, though other pieces have now been ported to the ...


12

I agree with you that it's overly pessimistic, but some (potentially historical) reasons: DO-178C Level A code requires Source Code to Object Code Traceability, which is much harder to prove manually with optimized code (and qualified compilers are very expensive) optimised code is harder to debug, which might prohibit scripted debugging opportunities there ...


11

A really good paper comparing the performance of various checksums and CRCs in an embedded context: The Effectiveness of Checksums for Embedded Networks Some quotes from the conclusions (based on their studies of undetected error probabilities): When burst errors dominate XOR, two’s complement addition, and CRC checksums provide better error ...


11

I'm going to make the case that Lua is by far your best bet. You can compile Lua anywhere that C can run and it's one of the lightest scripting languages out there. It's massively flexible as a language and the skills are quite transferable as well. There's even a specifically embedded version of Lua. Addendum: It is apparently possible to get the memory ...


11

"General purpose" is defined in the license itself. The Java 7 SE license has this: "General Purpose Desktop Computers and Servers" means computers, including desktop and laptop computers, or servers, used for general computing functions under end user control (such as but not specifically limited to email, general purpose Internet browsing, and office ...


11

I could give you some rough guidelines as to how to create the equivalent GUI for a CLI app, design-wise. How you would actually make the calls is out of the scope of this answer. switches like -p -v etc are checkboxes mutually exclusive options are a group of radio buttons parameters that are a filename are a textbox with a "choose" button that shows a ...


11

Where I work, we create embedded systems and are also using scrum for our development. You're looking at things from a technical perspective, not a feature perspective. The first thing you should ask is "Why do we need to implement this?" For example: Why do you need SPI? Is it going to be used for EEPROM so you can store serial numbers? Or maybe hook up ...


11

If you don't provide a way to dispose the object, you are passing a clear message that they have "infinite" lifetime once created. If this makes sense to your application, I say: do it. Glampert is right; there is no need for destructors here. They would just create code bloat and a pitfall for users (using an object after its destructor is called is ...


10

My suggestion is buy one of the arduino kits related to this goal. A few examples: Fuzebox Hackvision Video Game Shield Kit How Do I learn to pick the best board/cpu/controller/GPU/LCD screen/LCD controller etc? Firstly you need know in depth a real machine. The arduinos are a very good option for this because are 100% open source and include ...


10

There are two basic types of software bugs: The code doesn't do what you intended. What you intended was the wrong thing to do. The choice of languages etc may (or may not) have an impact on the first type of bug, but it has no effect at all on the second. Note, by "what you intended" I mean the real-world observable behaviour of the software, not internal ...


10

If you refuse to abstract or change usart_error then consider using whitespace to take mercy on my eyes. if ( usart_error.CRCError || usart_error.DMATransferError || usart_error.FramingError || usart_error.NoiseError || usart_error.OverrunError || usart_error.ParityError ) { //... } This is reminiscent of Haskell style. It's ...


9

What is the simplest operating system or platform upon which we can do Software Engineering in this day and age? None. One of the main activities in Software Engineering is conceptual software design, and making concepts for a software does not necessarily require a specific platform. It can be done with pencil and paper, by drawing UML diagrams, data ...


8

The Software Toolworks C compiler for CP/M came on one 8" SSSD floppy, and compiled most of the language as of about 1982. It required a machine with 56K of memory and one floppy drive. I don't remember how much the resident portion of CP/M required. Turbo Pascal 1.0 required 64K on a CP/M machine, and included an IDE. It was a single-pass compiler, ...


8

With the processors used for embedded devices, there are three possibilities: The processor executes the code directly from flash/ROM. In this case, the code doesn't take any RAM away from the system at all. In this setup, the RAM and flash/ROM are typically mapped to different portions of the address space that the processor can address, so the maximum ...


8

The only thing I'm conscious is that I have to make sure I actually have 1KB of stack free when entering this function. Yes, and that is a strong constraint. You'll better be sure statically than you do have such a large space available on the stack. If the code is small, if you are using a recent GCC to compile your code, see this. BTW, some cheap ...


8

I think you are making a common junior-level programmer error in your judgement here. Because the solution is not the way you would have done it, you want to redesign it. One of the most important things you need to become comfortable with is that whether the design is the way you think it should be doesn't matter. It really, truly doesn't matter at all. ...


7

First of all do it step by step. It's hard to teach old dog new tricks and if you try to implement all at once - nothing will get implemented. Here are some questions that may help you to figure out if you are ready for methodology ;) Code repository (do you use code repository? do you have branching strategy? if I ask you who and when introduced last ...


7

For a small-systems, hardcore embedded OS, the first option is the only really viable one. The problem is that for nearly every chipset, you would have to make small adjustments to the interfacing with the hardware and that gives you a high risk that the OS needs to be re-compiled for the new chipset. So, the first option is not only the easiest for you, ...


7

This is all my experience/opinion, gathered from working in the field pretty close to the metal: "embedded systems" are usually situations where you have significant non-trivial memory or speed constraints as compared to desktop systems. Those embedded situations can include microcontrollers, but can also include x86 systems on a chip, and also systems like ...


7

Generate .a file Build a (web-based) library generator (again one .c and .h file) Neither of these is a good option. The former is, for the reason you covered, platform-specific. The latter leaves anyone wanting to alter the set of modules compiled into their binary dependent on you continuing to run a server that can generate a new version. You ...


7

Immediate questions are: Are TCP sockets and HTTP connections really specific to your Manager::Transport nested class? How will you unit test them if they're not accessible outside Manager? Will anything other than a Manager ever need a Transport? to which at a guess I'd probably answer No, With unnecessary difficulty, and Maybe, respectively. You don't ...


Only top voted, non community-wiki answers of a minimum length are eligible