Development Tools
Development Tools
Development tools consist of a set of programs and interfaces (IDEs) that allow projects to be
carried out as quickly and efficiently as possible. The main tools to support the development of
microcontroller-based systems are described below.
Assembler
Assembly language programming can be a bit difficult for beginners, but it allows for the
development of very efficient programs, as it gives the programmer absolute control over the
system. Manufacturers usually provide the assembler program for free and in any case you can
always find a free version for the most popular microcontrollers.
Compiler
Programming in a high-level language (such as C or Basic) allows you to reduce the development
time of a product and if you are also familiar with C or Basic it is a good option. However, when
the compiler converts the program code to assembly language, each line of high-level language
program code will have generated significantly more lines of assembly language code, usually in a
ratio of one to three. This means that to use a high-level language we will need a microcontroller
with a relatively large memory capacity. If the program we are developing needs to use numbers
with decimals, or with scientific notation or complex operations are used, such as trigonometric
operations, it is almost mandatory to use a high-level language. But if what you are going to do is
manipulate bits in registers, inputs, outputs and simple calculations, assembly language is the best
option. The most powerful versions of compilers are usually very expensive, although for the most
popular microcontrollers limited demo versions and even free compilers can be found. As a free
compiler you can use the GNU C compiler, which is an open source C compiler that is as good as
the commercial C compilers but however has a not so easy installation process. In addition, you
need to check what microcontroller architectures it supports. Some of which are TI's MSP430,
Atmel's AVR and Motorola's HC11.
Simulator/Debugger
This is software that is capable of running applications developed for the microcontroller on a PC.
These allow absolute control over the execution of the application, making them ideal for
debugging. Its major drawback is that it is generally impossible to simulate the input signals
(especially analog signals) to the microcontroller. They also do not take into account possible noise
at the inputs, but at least they allow the physical step of the implementation in a safer and less
expensive way, since we will save on chip recordings for the on-site test.
Demo boards
These are small systems with a microcontroller already mounted and which are usually connected
to a PC from which the programs that run on the microcontroller are loaded. Boards typically
include visual indicators, LCDs, keypads, easy access to I/O pins, etc. They may include a control
program or operating system called a monitor program. The monitor program on some demo
boards, apart from allowing programs and data to be loaded into the microcontroller's memory,
can allow step-by-step execution (debug) at any time, monitor the status of the microcontroller or
modify the values stored in its registers.
In-circuit emulators
It is an instrument that is placed between the host PC and the socket on the printed circuit board
where the final microcontroller will be housed. The program is executed from the PC, but for the
application board it is as if it were done by the same microcontroller that will then be in the
socket. It displays all the information on the screen just as it will happen when the capsule is
placed.
Programmer
It is a device that, when connected to a PC, allows the developed program to be recorded in the
microcontroller. Some can be made by yourself and are very inexpensive. There is also free
software for programming not only microcontrollers but also other devices, such as memories.
Currently, the tendency is to do programming on the user board itself using ISP, In System
Programming or ICSP, In Circuit Serial Programming. This way the microcontroller can be
programmed once it is mounted on the circuit board using a two, three or four terminal
connection. To use this technique, a programmer is used, which is usually very simple and in some
cases can be built by oneself.
Another possibility is to use a "bootloader", very useful during the development stage of a
program. A bootloader is a small program on the microcontroller that is mounted on the circuit
board being developed and can communicate with the development tools (which will be used to
write the application program code) over a serial link such as RS232, USB, I2C or a CAN bus. The
bootloader program must interpret commands to read, write, and erase the portion of memory
reserved for the application program. When you want to verify the program being developed,
communication is initiated with the bootloader program, which loads the program code into the
microcontroller's program memory. The bootloader program then transfers control to the loaded
program and the loaded program can then be executed and verified. This loading and testing
operation can be performed as many times as necessary.
Enough program memory to accommodate both the bootloader and the development
program.
For example, the Philips LPC210x microcontroller includes an integrated serial bootloader that is
located in the first 8K of its Flash memory. With terminal P0.14 grounded and generating a reset,
the LPC210x executes the bootloader program. Using a free PC program from Philips and a serial
cable connected between the PC and the UART of the LPC210x microcontroller (through a
TTL/RS232 converter like the one in the kit) MAX232) can be used to program the microcontroller.
Also interesting is the JTAG interface (which the LPC210x microcontroller has, for example), which
can be used to program the device and to debug a program while it is running on the
microcontroller. To use the JTAG interface, a JTAG debug interface module is required, which
connects between the microcontroller development system and the PC hosting it. There are
various commercial JTAG interface modules on the market, but others can also be found on the
Internet.