2 The Smart “Things” in IoT
93
and requires fewer wires. However, note that the adapter and ARM microcontroller
support both SWD and JTAG.
Utilizing JTAG and/or SWD requires the use of an adapter (i.e., external board
connecting the computer to the microcontroller). This adapter can also be thought
of as a “USB to JTAG adapter.” JTAG/SWD is the most definitive method used
in programming microcontrollers because it enables powerful features including
built-in debugging functions. Although JTAG/SWD can be more complicated and
expensive due to the need for an adapter, this method is dependable and works
consistently because it is implemented at the hardware level.
2.5.9.2 Bootloader
In the context of embedded systems and microcontrollers, a bootloader is a small
piece of code that is located at the start of the microcontroller’s memory to:
• Program the microcontroller with a compiled program (i.e., user code) that is
received from a communication port (i.e., USB, serial port)
• Execute the received program
The bootloader enables programming of the microcontroller without an adapter,
whereas the bootloader is just meant to load a user code, and it is not as powerful
as a JTAG/SWD adapter. The bootloader does not allow step-by-step debugging
(e.g., single step through code, examine memory). In addition, the bootloader must
be written into the microcontroller once via an adapter. Note that usually in many
microcontrollers which can be purchased, the bootloader has already been installed.
2.5.10 Real-Time Operating System (RTOS)
It is very important to answer the following question: “Is an RTOS really necessary
in my IoT applications”? The answer is Yes and No. In most of IoT applications,
RTOS is not mandatory, and most smart objects (IoT things) are implemented on
“bare metal” without any RTOS. Generally, one should consider an RTOS if the
product needs any of the following components:
• TCP/IP or other complex networking stack
• Complex GUI
• File system
• Multitasking
Some real-life IoT applications run multiple, independent tasks on the same
processor. While CPUs can execute only one task at a time, it appears that multiple
tasks are being executed simultaneously because the processor quickly exchanges
control among multiple tasks. This rapid exchange of control is managed by a
93
and requires fewer wires. However, note that the adapter and ARM microcontroller
support both SWD and JTAG.
Utilizing JTAG and/or SWD requires the use of an adapter (i.e., external board
connecting the computer to the microcontroller). This adapter can also be thought
of as a “USB to JTAG adapter.” JTAG/SWD is the most definitive method used
in programming microcontrollers because it enables powerful features including
built-in debugging functions. Although JTAG/SWD can be more complicated and
expensive due to the need for an adapter, this method is dependable and works
consistently because it is implemented at the hardware level.
2.5.9.2 Bootloader
In the context of embedded systems and microcontrollers, a bootloader is a small
piece of code that is located at the start of the microcontroller’s memory to:
• Program the microcontroller with a compiled program (i.e., user code) that is
received from a communication port (i.e., USB, serial port)
• Execute the received program
The bootloader enables programming of the microcontroller without an adapter,
whereas the bootloader is just meant to load a user code, and it is not as powerful
as a JTAG/SWD adapter. The bootloader does not allow step-by-step debugging
(e.g., single step through code, examine memory). In addition, the bootloader must
be written into the microcontroller once via an adapter. Note that usually in many
microcontrollers which can be purchased, the bootloader has already been installed.
2.5.10 Real-Time Operating System (RTOS)
It is very important to answer the following question: “Is an RTOS really necessary
in my IoT applications”? The answer is Yes and No. In most of IoT applications,
RTOS is not mandatory, and most smart objects (IoT things) are implemented on
“bare metal” without any RTOS. Generally, one should consider an RTOS if the
product needs any of the following components:
• TCP/IP or other complex networking stack
• Complex GUI
• File system
• Multitasking
Some real-life IoT applications run multiple, independent tasks on the same
processor. While CPUs can execute only one task at a time, it appears that multiple
tasks are being executed simultaneously because the processor quickly exchanges
control among multiple tasks. This rapid exchange of control is managed by a
