English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 194 lectures (16h 35m) | 4.79 GB
Foundation course on Embedded C programming using STM32 Microcontroller.
This is our new course mainly targeted for absolute beginners to learn microcontroller programming using the ‘C ‘ programming language.
Please note that “Embedded C” is NOT a separate programming language. ‘Embedded C’ is rather embedded target aware programming using traditional ‘C’ programming language.
Some of the critical microcontroller-related ‘C’ concepts such as
- Importance of bitwise operators
- Usage of bit manipulation techniques to program MCU peripheral registers
- accessing memory-mapped registers using pointers
- pointers and casting
- structures, bitfields, unions, and bit extraction techniques
- representing hardware registers details and configuring them using ‘C’ structure definitions
- Usage of const and volatile type qualifiers
- Interpret complex variable definitions involving the combination of const and volatile
- The precise usage of const pointers, const data, volatile const, with pointer and non-pointer variables
- The behavior of the code during compiler optimization and solution using volatile
- Functions and friends
- Data types, variables definitions, storage class specifiers and much more
- Loops: while, for, do. while
- MCU internal architecture and programming peripherals
- Interfacing projects
All these concepts are discussed with clear examples and writing code for the target embedded board.
What you’ll learn
- ‘C’ programming from scratch
- Data types,variables, declarations,
- Importance of Bit-Wise operators in “Embedded” programming
- Bit manipulation techniques using bit-wise operators and examples
- Bit extraction and working with memory mapped peripheral registers
- Other operators of ‘C’ (arithmatic, logical, relation, assignment )
- Functions in ‘C’
- Implicit and explicit casting and its importance
- Pointers and casting
- Pointers arithmetic and importance of pointer datatypes
- Accessing memory mapped peripheral registers using pointers
- Structures and unions
- Importance of structures in peripheral register access
- Structure and bit fields
- Configuring peripheral register addresses using bit fields
- Structures and pointers
- interfacing LEDs, Keypad
- Const and volatile type qualifiers
- importance of volatile during compiler optimization
- const data, const pointer, cont volatile explanation with examples
- Importance of const
- Loops : for, while, do while
Table of Contents
Introduction
1 About the instructor
2 Programming languages for Embedded Systems
3 History of C and standardization
4 Course repository
5 Important Note
IDE installation
6 Downloading IDE
7 Downloading IDE
8 Key features of the STM32CubeIDE
9 Installing STM32CubeIDE
10 Installing STM32CubeIDE on Linux
11 Installing compiler GCC for host
12 Installing compiler GCC for host WINDOWS
13 Installing compiler GCC for host LINUX
14 Installing compiler GCC for host MAC
15 Importing course projects in to workspace
16 Creating a project for the HOST
17 Creating a project for the Target
18 FPU warning fix
19 HardwareSoftware Requirements
20 Meet the embedded target of this course
Your first C program
21 OnlineGDB web tool
22 Printf and Hello World
23 Printf exercise solution
24 Escape sequences in C
25 Printf exercise solution
26 Printf exercise solution
27 Commenting in C
Data types and variables
28 Data types in C
29 C Integer data types and value ranges
30 Char data type and variable definition
31 Variable definition exercise
32 Range calculation for char data type
33 Integer data type short int and value range
34 Integer data type int and long
35 Sizeof
36 Variables naming rules and definition vs declaration
37 Declaration vs definition An illustration
38 Variables scope and illustration
39 Variables scope and illustration contd
40 Summary of local and global variables
Address of variable
41 Address of variables
42 Address of variables contd
Storage classes
43 Storage class specifiers in C
44 Use cases of static with variables
45 Use cases of static with functions
46 Extern storage class specifier
47 ASCII codes
functions
48 Introduction to functions in C
49 Function prototypes
50 Returning data from a function
51 Function exercise
52 Typecasting in C
53 Typecasting in C contd
Microcontroller and Hello World
54 Embedded
55 Testing printf over ARM Cortex M4 ITMSWO line
56 Issues with IDE
57 Testing printf over OpenOCD semihosting
58 Run Sizeof on Embedded Target
59 Sizeof testing
60 Compiler settings on STM32CubeIDE
Build process
61 Embedded project build process
Analyzing Embedded C code
62 What is a Microcontroller
63 Code memory of the microcontroller
64 Code and Data of the program using memory browser
65 Analyzing ELF file using GNU tools
66 Disassembly
67 IDE option for Instruction level debugging
Data types to manipulate floating point data
68 Manipulating decimal numbers in C
69 Single vs double precision
70 Working with float and double variables
Taking input from the user using scanf
71 Scanf introduction
72 Scanf exercise implementation
73 Scanf exercise implementation contd
74 Scanf exercise
75 Scanf exercise implementation
76 Scanf and float with scientific notation
Pointers
77 Pointers in C
78 Pointer variables and pointer data types
79 Pointer variables and initialization
80 Read and Write operation on pointers
81 Pointer exercise implementation
82 Significance of pointer data types
83 Significance of pointer data types
Importance of stdinth
84 Importance of stdinth
Operators
85 Operators in C
86 Unary operator in C
87 Unary operators with pointers
88 Relational operators in C
89 Logical operators in C
decision making
90 if statement
91 if statement exercise
92 if statement exercise solution
93 if and else
94 if and else exercise implementation part
95 if and else exercise implementation part2
96 if and else exercise implementation part
97 if
98 ifelseif ladder exercise
99 ifelseif ladder exercise solution
100 Conditional operator
101 switch case statement in C
102 switch case exercise
103 switch case exercise solution
104 switch case exercise solution contd
Bitwise operators
105 Bitwise operators in C
106 Bitwise AND and bitwise OR
107 Applicability of bitwise operators Testing of bits
108 Finding a number even or odd using testing of bits
109 Applicability of bitwise operators Setting of bits
110 Applicability of bitwise operators Clearing of bits
111 Applicability of bitwise operators xor
Embedded C coding exercise for LED
112 Coding to Turn on an LED
113 Controlling IO pin using software
114 Processor addressable memory regions
115 STM32 memory map
116 Memory mapped peripheral registers and IO access
117 Procedure to turn ON the LED
118 Enabling peripheral clock
119 Calculating peripheral register addresses
120 LED ON exercise coding
Bitwise shift operators
121 Bitwise right shift operator
122 Bitwise left shift operator
123 Applicability of bitwise shift operators
124 Modifying LED on exercise using bitwise shift operators
125 Bit Extraction
Looping
126 Looping in C
127 While loop
128 while loop exercise
129 while loop and semicolon
130 while loop exercise
131 do while loop
132 for loop
133 for loop exercise
134 for loop number pyramid exercise
135 for loop exercise solution
136 modifying LED on with software delay
137 LED toggle using software delay
Type qualifier const
138 const type qualifier
139 placements of const variables in memory
140 const usage and different case studies
141 const usage and different case studies contd
Pinread
142 IO pin read exercise
143 IO pin read exercise implementation
Optimization
144 Compiler optimization and flags
145 Different compiler optimization levels
146 Analyzing pin read exercise disassembly with O0 and O2
volatile type qualifier
147 volatile and effect of optimization
148 When to use volatile qualifier
149 Using volatile to fix issues with the pinread exercise
150 Using volatile with ISR Part1
151 Using volatile with ISR Part
152 Usage of const and volatile together
Structures and Bit fields
153 Introduction to structures
154 Accessing structure member elements
155 Sizeof of a structure
156 Aligned and un
157 Structure padding
158 Calculating structure size manually with and without padding
159 Assembly code analysis of packed and non packed structure
160 Typedef and structure
161 Structures and pointers
162 Structure exercise
163 Structure exercise implementation
164 Structure and bit fields
165 Structure and bit fields contd
Unions
166 Unions
167 Applicability of unions
Usage of bitfields in embedded code
168 Bit
169 Bit
170 Bit
171 Modifying led toggle exercise with structures and bit fields
172 Testing
Keypad interfacing
173 Keypad interfacing
174 Why pull
175 Detecting key press event
176 Flow chart for implementation
177 Keypad key read code implementation
178 Delay analysis
Arrays
179 Arrays in C
180 Read
181 Passing array to a function
182 Swapping of arrays
183 Swapping of arrays contd
Strings
184 Strings in C
185 String literal
186 String variable Vs string literal
187 Inputting a string
188 Scanf and scanset
189 Exercise
PreProcessor directives in C
190 Pre
191 Conditional compilation directives
192 defined operator
193 Modifying led toggle exercise with macros
194 BONUS LECTURE
Resolve the captcha to access the links!