Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Hands-On RTOS with Microcontrollers
  • Table Of Contents Toc
  • Feedback & Rating feedback
Hands-On RTOS with Microcontrollers

Hands-On RTOS with Microcontrollers

By : Brian Amos
4.6 (20)
close
close
Hands-On RTOS with Microcontrollers

Hands-On RTOS with Microcontrollers

4.6 (20)
By: Brian Amos

Overview of this book

A real-time operating system (RTOS) is used to develop systems that respond to events within strict timelines. Real-time embedded systems have applications in various industries, from automotive and aerospace through to laboratory test equipment and consumer electronics. These systems provide consistent and reliable timing and are designed to run without intervention for years. This microcontrollers book starts by introducing you to the concept of RTOS and compares some other alternative methods for achieving real-time performance. Once you've understood the fundamentals, such as tasks, queues, mutexes, and semaphores, you'll learn what to look for when selecting a microcontroller and development environment. By working through examples that use an STM32F7 Nucleo board, the STM32CubeIDE, and SEGGER debug tools, including SEGGER J-Link, Ozone, and SystemView, you'll gain an understanding of preemptive scheduling policies and task communication. The book will then help you develop highly efficient low-level drivers and analyze their real-time performance and CPU utilization. Finally, you'll cover tips for troubleshooting and be able to take your new-found skills to the next level. By the end, you'll have built on your embedded system skills and will be able to create real-time systems using microcontrollers and FreeRTOS.
Table of Contents (24 chapters)
close
close
1
Section 1: Introduction and RTOS Concepts
5
Section 2: Toolchain Setup
9
Section 3: RTOS Application Examples
13
Section 4: Advanced RTOS Techniques

To get the most out of this book

For many readers, hands-on use of the book’s example programs will be invaluable for gaining skills. This includes using the debugging tools to observe and analyze the programs’ behavior. Hands-on use requires having the dev-board, installing the development tools, and downloading the example programs.

Conversely, for experienced engineers, it may be most efficient to simply read the book and not run the example programs.

The book explains the example programs’ primary parts. As you read the book, it’s also helpful to have the IDE available, to view the full code-listings and explore the example programs in more detail.

To master the material in this book, we recommend two approaches:

  • Experiment with modifying the example programs.
  • Create your own FreeRTOS-based programs from scratch, using the FreeRTOS features from the book. Appendix C shows how to create an IDE-project for the dev-board and install FreeRTOS.

Download the example code files

The example-programs for the book are hosted on GitHub at https://github.com/PacktPublishing/Hands-On-RTOS-with-Microcontrollers-Second-Edition. Instructions for downloading, installing, and using these programs are provided in chapter 3.

We also have code bundles from our catalog of books and videos available at https://github.com/PacktPublishing. Check them out!

The Hardware and Development Tools

To run the example-programs, an STM32 Nucleo-F767ZI dev-board is needed. In the future, if additional hardware is supported, it will be described in the book’s GitHub repository:

https://github.com/PacktPublishing/Hands-On-RTOS-with-Microcontrollers-Second-Edition.

The development-tools and how to use them are presented in Chapter 3, Introducing the Development Tools. In writing the book, the Windows 11 versions of the tools were used. The tools are also available for macOS and Linux, and those versions are expected to work adequately with the book, though we have not fully tested them.

The example-programs can be downloaded from the book’s GitHub repository. This is also described in chapter 3.

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781803237725.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “both globalVar and staticVar are located in static memory”

A block of code is set as follows:

void vApplicationStackOverflowHook( void )
{
    __disable_irq();
    while(1);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in highlighted:

void vcpTransmitComplete( void )
{
    portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
    // Give the semaphore, to indicate the transmit completed
    xSemaphoreGiveFromISRvcpTransmitCompleteSemaphore( ,
                          &xHigherPriorityTaskWoken);
    portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}

Any command-line input or output is written as follows:

Disabled output of control characters
SEGGER Ozone - The J-Link Debugger V3.38f
J-Link software found at: C:/Program Files/SEGGER/Ozone V3.38f/JLink_x64.dll

Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Open the STM32CubeIDE, and the example-programs’ workspace.”

Warnings or important notes appear like this.

Tips and tricks appear like this.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Hands-On RTOS with Microcontrollers
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon