Jessica Zhang is Software Engineer at Intel and works on Yocto Application Development Kit (ADT) and its Eclipse plug-in. She presented Yocto Project Eclipse Plug-in at Embedded Linux Conference Europe 2011. Abstract: Yocto project is an open source collaboration project that aims at helping embedded Linux software developers, either for system or application development. The Yocto Eclipse plug-in provides an effective integrated development environment that is based on the widely adopted Eclipse CDT and TCF extensions. It allows user to seamlessly interact with various Yocto project development tools. Yocto 1.0 targeted application developers via cross toolchains and sysroot setup, with remote deploy, debug and analysis. For 1.1, we have added support in the Yocto Eclipse plug-ins for system development through interaction with the bitbake UI interface for a Yocto bitbake commander type project. This talk will demo the end-to-end usage flows of Yocto Eclipse plug-in for both system and application […]
Development Testing with Static Analysis
I’ve recently come across an EE Times article written by Coverity stressing the benefits of static analysis and how it can help finding potential issues in the code early. They mentioned 3 static analysis techniques: Dataflow analysis This technique can find the defect in the listing below during compile time.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
void null_pointer_deref(int x) { char *p; if (x == 0) { p = foo(); } else { p = 0; } if(x != 0) { *p; } else { ... } } |
If value of x passed into the function is not zero, p is assigned a null pointer with p=0. Then, the next conditional check (x!=0) takes a true branch and in the next line p is dereferenced, leading to a null pointer dereference. This type of issue can be detected at compiled time with dataflow analysis. Interprocedural analysis This technique can find defects across function and method boundaries. See listing below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
void *zero_alloc(size_t size) { void *p = malloc(size); if (!p) return NULL; memset(p,0,size); return p; } struct S *create_S(int initial_value) { struct S *s = (struct S *) zero_alloc(sizeof(*s)); if (!s) return NULL; s->field = initial_value; return s; } int example_leak(struct S *s, int value) { struct S *tmp = s; if(!tmp) { tmp = create_S(value); } if(!tmp) return -1; ... return 0; } |
There are 3 functions: example_leak, create_S and zero_alloc. Interprocedural analysis can go through the code and identify the memory leak. The analysis engine has to trace the […]
Select an ARM MCU during Development with Atollic TrueSTUDIO for ARM
Atollic has released the latest version of TrueSTUDIO development tool for ARM, a C/C++ development tool for embedded developer that looks similar to Eclipse. It supports micro-controllers from a number of semiconductor manufacturers, making it possible to switch MCU supplier during the design process. This release of TrueSTUDIO supports several ARM MCU cores such as ARM7, ARM9, Cortex-M0, Cortex-M1, Cortex-M3 and Cortex-M4 processors. It also includes device-specific support for an extensive list of ARM processor-based micro-controller families, including: Atmel AT91SAM, EnergyMicro EFM32, Freescale Kinetis, Fujitsu FM3, STMicroelectronics STM32, Texas Instruments Stellaris and Toshiba TX. As well as an optimizing C/C++ compiler and a multiprocessor-aware debugger, the tool also has serial wire viewer tracing, graphical UML diagram editors for model-based design and architecture, performs code-quality analysis via TrueINSPECTOR and TrueANALYSER and features a test-automation toolbox (TureVERIFIER). There is also an ECLIPSE-based IDE with editor, x86 C/C++ build and debug tools for development of […]
Android Scores Last in Open Governance Index
Vision Mobile recently released a report about different open source projects analyzing their openness via their Open Governance Index. The full report (45-pages) examines: Open source cultural roots and working upstream vs downstream Open source licenses vs governance models Analysis and classification of governance models In-depth reviews of Android, Qt, Symbian, MeeGo, Mozilla, WebKit, Linux and Eclipse Best practices in creating an open source project The governance index is not only based on the percentage of source code that is open, but on the whole software development including the transparency of the decision making-process, the involvement of the community in all aspects of the project, compliance requirements and more. There are a total of 13 metrics accross 4 area of governance: Access: availability of the latest source code, developer support mechanisms, public roadmap, and transparency of decision-making Development: the ability of developers to influence the content and direction of the […]