In response to my own problem from near the end...
I have a lot of reading to do to see if any of these will work for me but I have found several possibilities for automated unit testing of embedded c code. Check (http://check.sourceforge.net/) is a framework and decent set of tutorials for doing unit testing in C. Even better they link to all the other frameworks they know of, so if check doesn't cut it for me, they've already given me a list for further research.
@DaveWR, Thanks. WE are just at the beginning of needing to clean up our code. I walked into a project with a >10,000 line file. Some case statements in that file are >200 lines each inside functions that are >2,000 lines. Yikes! (And I'd just love to know what kind of cyclomatic number it comes up with. My guess: >10. ;-) )
@TOCARD: I only use metrics on large projects. In the last few years they have not been useful. I cleaned up our code and design. End of of problem. ;-) However I occasionally run them to make sure we are on track still.
Added bug - in the book "mythical man-month" they describe a situation where fixing a bug causes something else to break and a point is reached for a given large code base there is a irreducible number of bugs per number of lines. While this is depressing pessimistic it does point to the value of a good test suite (perhaps automated so using it is painless) and discipline to use it.
I have been tasked before to review a application and analysed 1. the number of different programmers and the number of major patches that were made to the code. That's why I push for coding standards on my projects.
@StephT The problem tends to be that most of the code in my systems drivers HW. It seems liek to automate I need to either write a SW simulator of componets we've bought from their 500 page data sheet, or build something that can analyze the output past the 3rd party HW or as a standin for the HW
@dgkohler, A manager might ask programmers to document minimalist code by writing it out in a more understandable way, then commenting out the expanded method. That way, the elite genius gets his way while passing on the intent.
Question: Does the Cyclomatic Complexity have any correlation to code's readability? You previously mentioned people to take pride in reducing their codes to minimalistic lines that are very difficult to discern the intent of... It appears that is out of the scope of CC.
So unit testing on embedded systems could be done with tools like cpputest or even scripting tools. The level of testing is often decided based on the product you are developing. Odds are a toothbrush is being unit tested
Testing completeness can be measured a number of ways but one way is a % of paths and branches within the software that is covered. Some IDE's will let you run your code in debug, interact with the system and then provide you with the report of what was executed, what wasn't, etc. Pretty neat.
No, not formally. I've played around with Understand by Scitools for one more complex project - it has cyclomatic complexity among many other useful things. cc etc. did help me understand (hehe) my code better and see what were the hairiest parts.
I may not intensionally used Cyclomatic Complexity testing. But I have done manual exhaustive Testing of all possible control paths. Especially for small embedded software projects. Never used any tools for such testing.
We generate the test cases multiple ways. QA first generated test cases for all commands with varies parameters per our command specification. Firmware also recommends test cases based off of inside knowledge of code which will drive the execution of code normally not executed.
We used fault based testing. Test cases are written against the requirements and product features. A combination of white and black box testing is accomplished. This is all done by our software quality group.
Nope continuous integration. Hard to think and answer question when the presentation goes right on after asking question. Our size of embedded systems rarely involve more than one developer, and simply compiling catches some errors. Automated regression etc. testing would be nice but may be more work than it's worth, at least until the firmware is close to complete.
All three cycles: we find the lowest cost solution is Unit testing while Integration is more costly and System testing is the most expensive solution. Failures discoverd during system testing are difficult to identify and harder to resolve.
Hi everyone - We will be going live 15 minutes early so that you all can test your audio stream prior to the start of the class at 11 PST/2 EST. You should see the audio bar at the top of the screen soon and please hit the play button. You should hear music playing.
You are eligible to earn IEEE Professional Development Hours by attending these courses and participating in the chat function. Additionally, we are no longer using the points system, offering "graduation", or giving grades. The IEEE hours are taking the place of that. There are some important things for you to know about earning the hours. The most important ones are that you need to attend these courses live, you need to attend a minimum of two of them per semester, you need to fill out a course evaluation form within 2 weeks of the end of the class, you need to attend 4 out of the 5 classes per course, and you need to participate in the chat function every day you attend. Please click on the link at the top of this page that says "How do I earn IEEE professional development hours" to read all of these important details and more.
Please join our Digi-Key Continuing Education Center LinkedIn Group at http://linkd.in/yoNGeY and be sure to follow @designnews and @DigiKeyCEC on Twitter for the latest class information. We encourage you to tweet about today's class using #DigiKeyCEC.
The streaming audio player will appear at the top of this web page when the show starts at 2 PM Eastern time today. When you see it, click on the play button to start the audio. Note however, that some companies block live audio streams. If when the show starts, the audio bar doesn't appear or you don't hear any audio, try refreshing your browser. If that doesn't work, try using Firefox or Google Chrome as your browser. Some users experience audio interruptions with IE. Also, make sure your flash player is updated with the current version. If that doesn't work, the class will be archived immediately following our live taping. You shouldn't experience any problems with the audio when listening on-demand.
Some cars are more reliable than others, but even the vehicles at the bottom of this year’s Consumer Reports reliability survey are vastly better than those of 20 years ago in the key areas of powertrain and hardware, experts said this week.
Many of the materials in this slideshow are resins or elastomers, plus reinforced materials, styrenics, and PLA masterbatches. Applications range from automotive and aerospace to industrial, consumer electronics and wearables, consumer goods, medical and healthcare, as well as sporting goods, and materials for protecting food and beverages.
While many larger companies are still reluctant to rely on wireless networks to transmit important information in industrial settings, there is an increasing acceptance rate of the newer, more robust wireless options that are now available.
Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.