Typical microcontrollers firmware development cycle, which involves:
Writing the code
Translating the code
Debugging the code with the help of debugging tools, including emulators
Programminga Flash or OTP version of the microcontroller to built up a first functional prototype of your system
1. Writing Microcontroller Code
Software Code for a microcontroller is written in a programming language of choice (often Assembler or C). This source code is written with a standard ASCII text editor and saved as an ASCII text file.
2. Translating the Code
Next the source code needs to be translated into instructions the microcontroller can actually execute. A microcontroller's instruction set is represented by "op codes".
Assemblers, Compilers, Linkers and Librarians
Assemblers or (C-) Compilers translate the human readable source code into "hex code" that represents the machine instructions (op codes).
Linkers, link code modules saved in different files together into a single final program. At the same time they take care of a chip's memory allocation by assigning each instruction to a microcontroller memory addresses in such a way that different modules do not overlap.
Librarians help you to manage, organize and revision control a library of re-usable code modules.
3. Debugging the Code
A debugger is a piece of software running on the PC, which has to be tightly integrated with the emulator that you use to validate your code.
Debugging Tools
When it comes to debugging your code and testing your application there are several different tools you can utilize that differ greatly in terms of development time spend and debugging features available.
Simulators
Simulators try to model the behavior of the complete microcontroller in software. Some simulators go even a step further and include the whole system (simulation of peripherals outside of the microcontroller).
Microcontroller Starter Kits
Starter Kits, commonly bundle a hardware board and in-system programmer with some software components (assembler, linker, debugger, sometimes an IDE and a code-size limited "evaluation" version of a compiler)
Emulators
An emulator is a piece of hardware that ideally behaves exactly like the real microcontroller chip with all its integrated functionality.
4. OTP and Flash Programming
It can't be stretched enough: A starter kit or emulator is no substitute for a production grade programmer. Using the microcontroller sockets on starter kit boards is ok to program one or two samples in the lab
Out-of-Circuit Programming
OTP microcontrollers are typically programmed out-of-circuit. That means the microcontroller is programmed before being soldered on the target board. For that purpose production grade programmers offer a choice of optional, high quality, expensive, zero-insertion-force (ZIF) pin adapters to support different package flavors.
In-System Programming (ISP)
FLASH microcontrollers can be programmed both in-circuit (in-system) and out-of-circuit.
With in-circuit programming the microcontroller is already soldered into the target system and can be programmed via one of its communication interfaces (UART, SPI).
Report (0) (0) |
1 year ago