• Complain

Stephen Oualline - Bare Metal C: Embedded Programming for the Real World

Here you can read online Stephen Oualline - Bare Metal C: Embedded Programming for the Real World full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: No Starch Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Stephen Oualline Bare Metal C: Embedded Programming for the Real World
  • Book:
    Bare Metal C: Embedded Programming for the Real World
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2022
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Bare Metal C: Embedded Programming for the Real World: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Bare Metal C: Embedded Programming for the Real World" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Bare Metal C teaches you to program embedded systems with the C programming language. Youll learn how embedded programs interact with bare hardware directly, go behind the scenes with the compiler and linker, and learn C features that are important for programming regular computers.
Bare Metal C will teach you how to program embedded devices with the C programming language. For embedded system programmers who want precise and complete control over the system they are using, this book pulls back the curtain on what the compiler is doing for you so that you can see all the details of whats happening with your program.
The first part of the book teaches C basics with the aid of a low-cost, widely available bare metal system (the Nucleo Arm evaluation system), which gives you all the tools needed to perform basic embedded programming. As you progress through the book youll learn how to integrate serial input/output (I/O) and interrupts into your programs. Youll also learn what the C compiler and linker do behind the scenes, so that youll be better able to write more efficient programs that maximize limited memory. Finally, youll learn how to use more complex, memory hungry C features like dynamic memory, file I/O, and floating-point numbers.
Topic coverage includes:
  • The basic program creation process
  • Simple GPIO programming (blink an LED)
  • Writing serial device drivers
  • The C linker and preprocessor
  • Decision and control statements
  • Numbers, arrays, pointers, strings, and complex data types
  • Local variables and procedures
  • Dynamic memory
  • File and raw I/O
  • Floating-point numbers
  • Modular programming

Stephen Oualline: author's other books


Who wrote Bare Metal C: Embedded Programming for the Real World? Find out the surname, the name of the author of the book and a list of all author's works by series.

Bare Metal C: Embedded Programming for the Real World — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Bare Metal C: Embedded Programming for the Real World" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Bare Metal C Embedded Programming for the Real World by Steve Oualline BARE - photo 1
Bare Metal C
Embedded Programming for the Real World

by Steve Oualline

BARE METAL C Copyright 2022 by Stephen Oualline All rights reserved No part - photo 2

BARE METAL C. Copyright 2022 by Stephen Oualline.

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

First printing

26 25 24 23 22 1 2 3 4 5

ISBN-13: 978-1-7185-0162-1 (print)
ISBN-13: 978-1-7185-0163-8 (ebook)

Publisher: William Pollock
Managing Editor: Jill Franklin
Production Manager: Rachel Monaghan
Production Editor: Jennifer Kepler
Developmental Editors: Jill Franklin and Frances Saux
Cover Illustrator: Gina Redman
Interior Design: Octopod Studios
Technical Reviewer: Frank Duignan
Copyeditor: Bart Reed
Compositor: Ashley McKevitt, Happenstance Type-O-Rama
Proofreader: Rachel Head

For information on distribution, bulk sales, corporate sales, or translations, please contact No Starch Press, Inc. directly at info@nostarch.com or:

No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900
www.nostarch.com

Library of Congress Cataloging-in-Publication Data

Names: Oualline, Steve, author.
Title: Bare metal C : embedded programming for the real world / Stephen Oualline.
Description: San Francisco : No Starch Press, [2022] | Includes index.
Identifiers: LCCN 2021049830 (print) | LCCN 2021049831 (ebook) | ISBN 9781718501621 (paperback) |
ISBN 9781718501638 (ebook)
Subjects: LCSH: C (Computer program language) | Embedded computer systems--Programming.
Classification: LCC QA76.73.C15 O835 2022 (print) | LCC QA76.73.C15 (ebook) | DDC 005.13/3--dc23/
eng/20211105
LC record available at https://lccn.loc.gov/2021049830
LC ebook record available at https://lccn.loc.gov/2021049831

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

About the Author

Steve Oualline has been writing reliable, low-bug programs for embedded systems for over 50 years. He has a master of science from the University of Southern California and has written many books for both No Starch Press and OReilly. He is currently a volunteer at the Southern California Railroad Museum, where his most recent project was debugging the computer controller for their Acme Traffic signal. (Ants built a nest inside it and had to be removed.) His website can be found at http://oualline.com.

About the Technical Reviewer

Frank Duignan graduated as an electrical engineer in 1988. Since then he has worked mostly at the interface between hardware and software. He is currently lecturing in electrical/electronic engineering at Technological University Dublin. Franks blog can be found at https://ioprog.com.

Introduction
This book is called Bare Metal C because its for people who get close to the - photo 3

This book is called Bare Metal C because its for people who get close to the hardware. Its not for people who buy their computer in a box and never see the inside. The computer used in this book doesnt even have a box. If you want to use it, youre going to have to connect something to the bare metal of the board.

This book teaches embedded programming. An embedded computer is one that sits inside the machine and you never know its there. Its the device that runs your garage door opener, your microwave, your car, or even your greeting card. But before it can do any of those things, it needs to be programmed. And that is what this book teaches you: how to program an embedded system.

Why C? C gives you precise control over what your program is doing, whereas other languages, such as C++, can do a great deal of things behind your back. Consider the following statement:

a = b;

In C++, this could call a classs assignment operator function, which might result in heap memory being allocated and freed as well as an exception being thrown. What all that means is unimportant right now; the point is that you dont know exactly whats going to happen.

In C, this statement assigns the value b to the variable a with no side effects; its just an assignment, nothing more. This example is simple, but youll see other ways that C does exactly what you tell it throughout the book.

Precise control is important because we are using C to program a low-end system on a chip (SOC) system based on the STM32F030x4 processor (a cheap ARM Cortex-M0-based system) that has 8KB of RAM. Memory management is very important with limited RAM, so we cant afford to have a high-level language like C++ play with memory behind our backs. Precise control is also important because an embedded system doesnt have an operating system and you need to tell the hardware what to do directly. High-level languages dont always let you talk to the hardware, but C does.

The book is designed for people who have a basic knowledge of computers and hardware, but have a limited knowledge of programming. It is for the hardware designer who wants to connect a new piece of hardware to a microcontroller and use it for the first time. It is for the programmer who is interested in low-level programming and wants to get the most out of a 38 chip.


NOTE

The ARM Cortex-M0 is very popular with low-end products because it costs 38 in quantities of 10,000 at the time of writing. Given that we hope to sell millions of whatever embedded system we are making, the difference between a 38 chip and a 56 chip is significant.


To get the most out of your programs, youll need to know what goes on under the hood. The book shows you not only how to write a program, but also how your program is translated into machine code thats used by the ARM chip. Thats important for maximum efficiency. For example, youll learn how much of a performance hit youll get if you change your program from using 16-bit integers to using 32-bit integers. The answer, surprisingly, is that 32-bit integers are more efficient and faster (32 bits is the natural number size for the ARM, and if its forced to do 16-bit arithmetic, it does 32-bit calculations and then throws away 16 bits).

To program and debug an ARM chip, youll need some extra tools: a flash memory programmer (to get your code into the machine), a USB-to-serial converter (because we use the serial line for debugging), and a JTAG debugger. Since almost all developers need this combination of tools, STMicroelectronics makes a board that provides all the hardware youll need, called the NUCLEO-F030R8. As of this writing, a chip shortage has made some boards hard to find. See https://nostarch.com/bare-metal-c for alternate boards. Youll also need a mini USB cable (the one that doesnt fit your phone) so you can plug the board into your computer.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Bare Metal C: Embedded Programming for the Real World»

Look at similar books to Bare Metal C: Embedded Programming for the Real World. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Bare Metal C: Embedded Programming for the Real World»

Discussion, reviews of the book Bare Metal C: Embedded Programming for the Real World and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.