All posts by Brad

Lint and static analysis

One static source code analysis tool I have used in the embedded environment is PC-Lint from Gimpel Software. It is a great tool for embedded development supporting a wide range of compilers. Compared to its Flexelint offering for *nix platforms, PC-Lint is priced under $400 U.S.

Together with library and environment options files, it features author options files for linting code by MISRA C/C++ guidelines (safety critical systems) for example. Tune the options files according to code review and unit test requirements to produce useful report results.

In its 9.0.0L release it is gradually moving to full support of C++11/14.

I have used the tool with a Python filter fed into asciidoc to neatly sort through lint results and present them in HTML format.

There are many other enterprise class tools in the marketplace designed for team support ( Klocwork, PVS-Studio ) as well as dynamic analysis tools ( VectorCAST ).

Examine both multi-language and C/C++ free and open source tools https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis .

Use of lint ought to be built in to the build and release process or at minimum in the code review process.

NVIDIA CUDA Development

If you have interest in parallel programming, games with high end graphics, embedded development or professional graphics, investigate NVIDIA CUDA Development. The first step is to become a registered developer so you can fully peruse the available resources.

My interest is specific to parallel programming with NVIDIA’s line of CUDA GPUs.

My current development platform is the GeForce GTX 970 and the Tesla K40. The K40s are used in a pair of airborne, high performance servers under development for surveillance applications.

NVIDIA provides a CUDA Toolkit supported on Windows, Linux x86, Linux POWER8 and MacOS platforms.

Of special interest to developers are the NVIDIA System Management Interface and CUDA Code Samples present in the toolkit.

If you are a Visual Studio 2010/2012/2013 developer, don’t miss the presence of the CUDA project template and template_runtime. This is extremely valuable for creating your own Visual Studio based CUDA projects because it will redeem you from the pit of Visual Studio properties should you decide to create a Visual Studio 201x plus NVIDIA Nsight project from “scratch”.

Enjoy!

SmartSVN, Ubuntu & dream biceps

I’m a VMware Fusion Professional fan. I use it on a MacBook Pro to host various operating systems (Solaris, Ubuntu, Slackware, LFS, Win7) used in my projects.

A recent project requires rolling my own LFS distro on Ubuntu. Back to command line Subversion or find a suitable GUI client? Once you are spoiled on TortoiseSVN, TortoiseGit or SmartSVN for Windows hosted development, doing without on Linux is out of the question.

The short answer is: cancel that gym membership you’re not using and then buy some real tools – like SmartSVN. I know this goes against your inner cheapskate (but lavishly wasting money on good intentions for bigger biceps?!), but you will thank me in the long run.
Efficiency.

Reduced stress. No version 0.1 GUI client experiments. No command line.

I once knew a seasoned assembly language developer in the late 80s that coded using DOS edlin. I’m not making this up. Well, about that time a cool full screen editor came on the scene named Brief by UnderWare, Inc. A few of us installed it on the developer’s machine while he was on smoking break and pulled up some of his code on screen. A short time later we heard shouts from his office, “I can see it all! I can see it all!”. Most of us did not recover from ROTFL until later that day. Don’t be that developer.

Cisco Unified Computing System

I attended the “Cisco UCS Hands-On Workshop and Data Center Tour” today at the Data Center in Allen, TX.
See on-line documentation for Cisco UCS Manager and related products here.

The Data Center tour is quite impressive. I’m from a telecom background, so redundancy is a familiar concept but the careful planning and thought behind this center’s design is truly remarkable. For example, the class learned it is a great place to escape the non-stop allergens of Texas air or the onslaught of an occasional EF5 tornado.

What a great experience! I’m looking forward to more seminars or training sessions at this facility. The staff is Texas friendly and expert in all things data.

STM32CubeMX and STM32F series MCU

Since the release of STMicroelectronics the STM32CubeMX V4.2 app on April 30, users have capability to create a Cube project based on an evaluation board (I use STM324x9I_EVAL1 and STM32F429I-DISCO boards). This is a fantastic capability for prototyping where users must contend with an existing board design where many MCU pins are already allocated to on board devices (Ethernet, SDIO, USB OTG HS, USB OTG FS).

I have created some example projects using code generated directly from the tool that specialize some of the example projects bundled with the STM32_Cube_FW_F4_V1.1.0 firmware package.

Each example bundled with the STM32CubeF4 firmware contains a readme.txt file with a detailed description. Any waveforms produced by the example may be viewed on a oscilloscope or a logic analyzer (I use a Saleae Logic 16).

One of my current projects involves generating configurable PWM outputs using synchronized timers in a master-slave configuration (a common task). I call the project dual phased PWM (TIM_PWMDualPhased.ioc). It is a baseline project that may be extended for any number of uses such as lighting control, motor control, parametric testing and so on.

As noted in the ST forums, the learning curve for this microprocessor is a bit steep (I’ve used TI MSP430 & CodeComposer as well as Microchip PIC MPLAB 8.x & MPLABX – and agree).

Even if you are experienced with embedded MCUs, plan on a couple of weeks to digest the user guides and datasheets and self train on STM32CubeMX. It is best to work through as many examples as possible, then attempt a project based on a STM32CubeMX evaluation board baseline configuration that is extended to meet prototype needs.

Before designing a prototype, be sure to spend sufficient time with the STM32CubeMX pin assignment and IP configuration.

Consider peripheral clock speed needs on both the high speed and low speed peripheral bus. The STM32F429NIH part (STM324x9I_EVAL) may operate SYSCLK at up to 180MHz. If the APB Prescaler is set to divide by 2, this presents very high clock speeds to devices on the low speed peripheral bus that may exceed some peripherals’ operating limits.

Users may code directly to the HAL library API, but in prototyping it is much more efficient to use the STM32CubeMX tool. Generated code may contain bracketed user code sections that are preserved as configuration changes are made and code is regenerated.