Course Highlights
  • '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
Skills you will learn!
Curriculum

5 Topics
About the instructor
Programming languages for Embedded Systems
History of 'C' and standardization
Course repository
Important Note

15 Topics
Downloading IDE
Downloading IDE
Key features of the STM32CubeIDE
Installing STM32CubeIDE
Installing STM32CubeIDE on Linux
Installing compiler (GCC) for host
Installing compiler (GCC) for host (WINDOWS)
Installing compiler (GCC) for host (LINUX)
Installing compiler (GCC) for host (MAC)
Importing course projects in to workspace
Creating a project for the HOST
Creating a project for the Target
FPU warning fix
Hardware/Software Requirements
Meet the embedded target of this course

7 Topics
OnlineGDB web tool
Printf and Hello World
Printf exercise solution
Escape sequences in 'C'
Printf exercise solution
Printf exercise solution
Commenting in 'C'

13 Topics
Data types in 'C'
'C' Integer data types and value ranges
Char data type and variable definition
Variable definition exercise
Range calculation for 'char' data type
Integer data type 'short int' and value range
Integer data type 'int' and 'long'
Sizeof
Variables naming rules and definition vs declaration
Declaration vs definition : An illustration
Variables scope and illustration
Variables scope and illustration contd
Summary of local and global variables

2 Topics
Address of variables
Address of variables contd.

5 Topics
Storage class specifiers in 'C'
Use cases of 'static' with variables
Use cases of 'static' with functions
'Extern' storage class specifier
ASCII codes

6 Topics
Introduction to functions in 'C'
Function prototypes
Returning data from a function
Function exercise
Typecasting in 'C'
Typecasting in 'C' contd

7 Topics
Embedded - 'Hello World'
Testing printf over ARM Cortex M4 ITM+SWO line
Issues with IDE
Testing printf over OpenOCD semihosting
Run Sizeof on Embedded Target
Sizeof testing
Compiler settings on STM32CubeIDE

1 Topic
Embedded project build process

6 Topics
What is a Microcontroller ?
Code memory of the microcontroller
Code and Data of the program using memory browser
Analyzing ELF file using GNU tools
Disassembly
IDE option for Instruction level debugging

3 Topics
Manipulating decimal numbers in 'C'
Single vs double precision
Working with float and double variables

6 Topics
Scanf introduction
Scanf exercise implementation
Scanf exercise implementation contd.
Scanf exercise
Scanf exercise implementation
Scanf and float with scientific notation

7 Topics
Pointers in 'C'
Pointer variables and pointer data types
Pointer variables and initialization
Read and Write operation on pointers
Pointer exercise implementation
Significance of pointer data types
Significance of pointer data types

1 Topic
Importance of <stdint.h>

5 Topics
Operators in 'C'
Unary operator in 'C'
Unary operators with pointers
Relational operators in 'C'
Logical operators in 'C'

15 Topics
'if' statement
if statement exercise
'if' statement exercise solution
'if' and 'else'
'if' and 'else' exercise implementation part-1
'if' and 'else' exercise implementation part-2
'if' and 'else' exercise implementation part-3
'if -else-if' ladder statements
'if-else-if' ladder exercise
'if-else-if' ladder exercise solution
Conditional operator
switch case statement in 'C'
switch case exercise
switch case exercise solution
switch case exercise solution contd.

7 Topics
Bitwise operators in 'C'
Bitwise AND and bitwise OR
Applicability of bitwise operators : Testing of bits
Finding a number even or odd using testing of bits
Applicability of bitwise operators : Setting of bits
Applicability of bitwise operators : Clearing of bits
Applicability of bitwise operators : xor

9 Topics
Coding to Turn on an LED
Controlling IO pin using software
Processor addressable memory regions
STM32 memory map
Memory mapped peripheral registers and IO access
Procedure to turn ON the LED
Enabling peripheral clock
Calculating peripheral register addresses
LED ON exercise coding

5 Topics
Bitwise right shift operator
Bitwise left shift operator
Applicability of bitwise shift operators
Modifying LED on exercise using bitwise shift operators
Bit Extraction

12 Topics
Looping in 'C'
While loop
while loop exercise
while loop and semicolon
while loop exercise
'do while' loop
'for' loop
'for' loop exercise
'for' loop number pyramid exercise
'for' loop exercise solution
modifying LED on with software delay
LED toggle using software delay

4 Topics
'const' type qualifier
placements of 'const' variables in memory
'const' usage and different case studies
'const' usage and different case studies contd

2 Topics
IO pin read exercise
IO pin read exercise implementation

3 Topics
Compiler optimization and flags
Different compiler optimization levels
Analyzing pin read exercise disassembly with O0 and O2

6 Topics
volatile and effect of optimization
When to use volatile qualifier ?
Using volatile to fix issues with the pin-read exercise
Using 'volatile' with ISR Part-1
Using 'volatile' with ISR Part-2
Usage of const and volatile together

13 Topics
Introduction to structures
Accessing structure member elements
Sizeof of a structure
Aligned and un-aligned data storage
Structure padding
Calculating structure size manually with and without padding
Assembly code analysis of packed and non packed structure
Typedef and structure
Structures and pointers
Structure exercise
Structure exercise implementation
Structure and bit fields
Structure and bit fields contd.

2 Topics
Unions
Applicability of unions

5 Topics
Bit-field exercise : Creating bit-field structure for peripheral registers
Bit-field structure for RCC_AHB1ENR
Bit-field structure for GPIOx_ODR
Modifying led toggle exercise with structures and bit fields
Testing

6 Topics
Keypad interfacing
Why pull-up resistors?
Detecting key press event
Flow chart for implementation
Keypad key read code implementation
Delay analysis

5 Topics
Arrays in 'C'
Read-Write operation on an array
Passing array to a function
Swapping of arrays
Swapping of arrays contd.

6 Topics
Strings in 'C'
String literal
String variable Vs string literal
Inputting a string
Scanf and scanset
Exercise

5 Topics
Pre-Processor directives in 'C'
Conditional compilation directives
'defined' operator
Modifying led toggle exercise with macros
BONUS LECTURE

  Write a Review

Microcontroller Embedded C Programming: Absolute Beginners

Go to Paid Course