Embedded Programming for the Real World
Steve Oualline

#C_programming
#GPIO
#LED
#STM
👨💻 کتاب Bare Metal C بهت یاد میده چطوری با زبان برنامهنویسی C برای سیستمهای امبدد کد بزنی. توی این کتاب یاد میگیری که برنامههای امبدد چطوری مستقیماً با سختافزار ارتباط برقرار میکنن، پشت صحنه کامپایلر و لینکر چه خبره و اون دسته از ویژگیهای C که برای برنامهنویسی کامپیوترهای معمولی هم مهم هستن رو عمیقاً درک میکنی.
کتاب Bare Metal C برای اون دسته از برنامهنویسهای سیستمهای امبدد طراحی شده که میخوان کنترل دقیق و کاملی روی سیستمی که استفاده میکنن داشته باشن. این کتاب پردهها رو کنار میزنه و نشونت میده که کامپایلر دقیقاً برات چیکار میکنه تا بتونی تمام جزئیات اتفاقاتی که برای برنامهات میافته رو ببینی.
بخش اول کتاب مبانی C رو به کمک یه سیستم ارزانقیمت و در دسترس (برد Nucleo Arm) آموزش میده که تمام ابزارهای لازم برای برنامهنویسی مقدماتی امبدد رو در اختیارت میذاره. همونطور که با کتاب جلو میری، یاد میگیری چطوری ورودی/خروجی (I/O) سریال و اینتراپتها (Interrupts) رو توی برنامههات پیادهسازی کنی. همچنین یاد میگیری که کامپایلر و لینکر C پشت صحنه چیکار میکنن تا بتونی برنامههای بهینهتری بنویسی که از حافظه محدود سیستم، بیشترین استفاده رو ببره. در نهایت، با ویژگیهای پیچیدهتر و سنگینتر C مثل حافظه پویا (Dynamic Memory)، فایل I/O و اعداد ممیز شناور (Floating-point) آشنا میشی.
📑 فهرست مطالب
بخش ۱: برنامهنویسی امبدد
۱. سلام دنیا
۲. مقدمهای بر محیط توسعه یکپارچه (IDE)
۳. برنامهنویسی میکروکنترلر
۴. اعداد و متغیرها
۵. دستورات شرطی و کنترلی
۶. آرایهها، پوینترها و رشتهها
۷. متغیرهای محلی و پروسیجرها
۸. انواع دادههای پیچیده
۹. خروجی سریال روی STM
۱۰. اینتراپتها
۱۱. لینکر (Linker)
۱۲. پیشپردازنده (Preprocessor)
بخش ۲: C برای ماشینهای بزرگ
۱۳. حافظه پویا
۱۴. فایل I/O بافر شده
۱۵. آرگومانهای خط فرمان و I/O خام
۱۶. اعداد ممیز شناور
۱۷. برنامهنویسی ماژولار
🚀 ویژگیهای کلیدی
• فرآیند پایه ساخت برنامه
• برنامهنویسی ساده GPIO (چشمکزن LED)
• نوشتن درایورهای دستگاههای سریال
• کار با لینکر و پیشپردازنده C
• دستورات تصمیمگیری و کنترلی
• اعداد، آرایهها، پوینترها، رشتهها و انواع دادههای پیچیده
• متغیرهای محلی و پروسیجرها
• حافظه پویا (Dynamic Memory)
• فایل I/O و ورودی/خروجی خام
• اعداد ممیز شناور
• برنامهنویسی ماژولار
👨🏫 درباره نویسنده
استیو اوالاین اولین برنامهاش رو وقتی ۱۱ سالش بود نوشت، اون هم برای یه سیستم امبدد! اون از همون موقع تا الان مشغول برنامهنویسی و طراحی متدولوژیهایی برای برنامهنویسی قابل اطمینانه. استیو مدرک کارشناسی ارشدش رو از دانشگاه USC گرفته و کتابهای زیادی برای انتشارات No Starch Press و O’Reilly نوشته.
Bare Metal C teaches you to program embedded systems with the C programming language. You’ll 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 what's 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 you’ll learn how to integrate serial input/output (I/O) and interrupts into your programs. You’ll also learn what the C compiler and linker do behind the scenes, so that you’ll be better able to write more efficient programs that maximize limited memory. Finally, you’ll learn how to use more complex, memory hungry C features like dynamic memory, file I/O, and floating-point numbers.
Topic coverage includes:
Table of Contents
Part I: Embedded Programming
Chapter 1: Hello World
Chapter 2: Introduction to the Integrated Development Environment
Chapter 3: Programming the Microcontroller
Chapter 4: Numbers and Variables
Chapter 5: Decision and Control Statements
Chapter 6: Arrays, Pointers, and Strings
Chapter 7: Local Variables and Procedures
Chapter 8: Complex Data Types
Chapter 9: Serial Output on the STM
Chapter 10: Interrupts
Chapter 11: The Linker
Chapter 12: The Preprocessor
Part II: C for Big Machines
Chapter 13: Dynamic Memory
Chapter 14: Buffered File I/O
Chapter 15: Command Line Arguments and Raw I/O
Chapter 16: Floating-Point Numbers
Chapter 17: Modular Programming
Steve Oualline wrote his first program when he was 11. It was for an
embedded system. He has been programming and designing
methodologies for reliable programming ever since. He has a Master of Science from USC and has written many books for both No Starch Press and O’Reilly.









