Software development

Debugging of MCU applications

After a microcontroller application is specified and the code is written, the next step is to test the code in the target system. A good environment for development tools is important to reduce overall development time and costs. Users want to debug their application program under conditions that match the actual setup of their system. For this reason, the ability to debug a user program in a real target system is required.

Many microcontroller manufacturers such as Freescale implement a so-called Background Debug Mode (BDM) for this purpose, which can be accessed via a simple interface (usually JTAG) and enables in-circuit debugging functions in microcontrollers.

Debug mode allows full control of processor operation, regardless of whether the processor has already been programmed. For example, a controlling application can access the memory from the CPU’s point of view. Such a programme can, for example, load and execute code and send results back to the PC. The BDM host can issue commands with parameters to the target. Some commands enable the reading or writing of blocks of the target memory, individual registers in the CPU or registers that are not available to the target. Test routines can use debug mode to perform tests on the target hardware.

The increasing complexity of today’s software and hardware designs leads to new requirements for debugging. Silicon manufacturers are therefore offering more and more on-chip debugging functions for troubleshooting new processors. To access this function, which is implemented in various processor families under the name Background Debug Mode (BDM) or On-Chip In-Circuit Debugging, a hardware component is required to establish a connection between the PC and the microcontroller. eVision Systems offers the Multilink series for this purpose, which enables debugging via the BDM.

Why test the application code?

By using debug functions, the test application can control on-chip and off-chip circuits and then observe the operating results of these functions. The product itself can be connected to other electronic devices to allow a full functional test while being controlled/observed via the debug mode. The primary goal is comprehensive testing on the real processor with the highest possible test coverage. Furthermore, it should be easy to identify the error as quickly as possible in the event of a failure. The advantage of debug mode is that the processor does not have to execute application code for the test to run. This prevents the test from being prevented by an error that can hinder the execution of the final application in the product (e.g. an addressing/data line error). In addition, it is much easier to design a test application on the PC in debug mode than to create a test that is run in the product. A PC test application can also record and display test results and integrate with other test and control applications.

Multilink Series

PEmicro’s USB Multilink Universal FX is a high-speed all-in-one development interface that allows a PC to access Background Debug Mode (BDM-) via the JTAG interface and is compatible with all ARM architecture devices. Moreover, the debugger and programmer supports NXP, Renesas, STMicro, Infineon (Tricore) and many other micro-controller families.

Cyclone Series

The Cyclone series is a standalone programmer for small to medium batch production. Like the Multilink series, the devices support a variety of microcontroller architectures.

Software for MCU applications

Our partner P&E Microcomputer Systems Inc. Provides a free software package for creating custom applications that can interact with and debug an ARM® Cortex™-M based system (ACMP) via the Multilink Series. The software package consists of an interface library (Windows DLL and Linux .SO) and sample code. It contains both C/C++ and Delphi sample routines and detailed calling information for the DLL/SO. The C and Delphi modules in the ACMP Hardware Interface Library Routines are used as source code interfaces to the hardware with a DLL/SO. The ACMP Hardware Interface Routines library is handy for creating your own custom application to handle functions such as product testing, calibration and updating. The demo programmes included in the package show you how to initialise the interface, programme registers, download code into the RAM and step-by-code. Starting with these programmes, it is easy to adapt them to your specific needs. Applications are created with the 32-bit supplied. DLL will also run on the 64-bit operating systems listed below under System Requirements.

The tools and methods provided here by eVision Systems help you to reduce the complexity of product testing. Using the advanced features leads to a more effective testing process that gives you higher reliability, enables faster time-to-market and reduces development costs by shortening the time it takes to find bugs. We offer reliable solutions for other applications.