Colin Walls, Mentor Graphics
embedded.com (March 12, 2019)
For any kind of operating system, there is some type of start-up mechanism. Exactly how this works varies from one system to another. It is usual to say that an OS will “boot”. This is an abbreviation for “bootstrap”, which is a description of how a CPU gets from having a memory full of nothing in particular to a stable program execution state. Classically, a small piece of software is loaded into memory; it may simply be held in ROM. In years past, it may have been keyed in from the switches on the front panel of the computer. This “boot loader” would read in a more sophisticated bootstrap program, which, in turn, would load and start the operating system. This is the process whereby a desktop computer gets started today; code in the BIOS seeks bootable devices (hard drives or CD-ROMs) from which a bootstrap and, hence, an OS is loaded.
An OS for an embedded system may also be initialized in this way. Indeed, embedded OSes, which are derived from desktop operating systems, do exactly that. But for most “classic” RTOSes, a much simpler (and hence faster) process is used.
An OS is just a piece of software. If that software is already in memory – in some form of ROM, for example – it is simply a matter of arranging for the CPU’s reset sequence to end up with the execution of the OS’s initialization code. This is how most RTOSes work and Nucleus SE is no exception.
Most embedded software development toolkits include the necessary start-up code to handle a CPU reset and arrive at the entry point to the main() function. The Nucleus SE distribution code does not concern itself with this process, as it is intended to be as portable as possible. Instead, it provides a main() function, which takes control of the CPU and initializes and starts the OS; this is described in detail shortly.
Click here to read more ...