[go: up one dir, main page]

0% found this document useful (0 votes)
61 views11 pages

Roadmap and Career Options

The document outlines a comprehensive curriculum for courses focused on embedded systems, firmware engineering, and C programming, aimed at college graduates and industry newcomers. It covers topics from basic concepts of embedded systems and firmware to advanced programming techniques in C, including hands-on projects and practical applications. Additional sections delve into ARM Cortex architectures, FreeRTOS, Git, and Linux device drivers, providing a thorough foundation for aspiring embedded engineers.

Uploaded by

pramodhullur2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views11 pages

Roadmap and Career Options

The document outlines a comprehensive curriculum for courses focused on embedded systems, firmware engineering, and C programming, aimed at college graduates and industry newcomers. It covers topics from basic concepts of embedded systems and firmware to advanced programming techniques in C, including hands-on projects and practical applications. Additional sections delve into ARM Cortex architectures, FreeRTOS, Git, and Linux device drivers, providing a thorough foundation for aspiring embedded engineers.

Uploaded by

pramodhullur2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

Roadmap and Career Options

This short course focuses on orienting the college graduates and those new to the
industry on what the usual roles, responsibilities are and what opportunities they
can expect.

Understanding Embedded Systems


what is embedded systems and how it relates to EE, ECE and CS
What is firmware and Systems Engineering
Firmware Engineering
Understanding What Firmware engineering is
Memory Map and the Programmer's model
State Machines and OS Primitives
Roles and Exploring job listing
Systems Software Engineering
HLOS, Application Grade CPU and Virtual Memory
Roles and Skills
Exploring Opportunities and Skillset

Low Level with Pyjama Brah! (Public Draft)


We are writing a book to teach C by understanding the CPU/Memory programmers model,
exploring the ISA for RISC-V, the assembly, writing baremetal firmware/driver, and
ends with printing “Hello, World!” on the UART. The book covers lot more than just
C. Things like Assembly, Makefile, GDB based Debugging, Linker Scripts, C, Driver
Writing etc… The public draft is available for FREE for online reading. Table of
contents is as follows -

Part I - Mental Models


C: History and Relevance
Computer System Model
Storage Model
CPU Model
Instruction Set (RISC-V)
Setup - Virtual Lab
Part II - Assembly
Text to 0s and 1s
Assembly Language
Directives and Generated Assembly
Build Process
Part III - C Language
Keywords
Anatomy of Code
Not C Keywords!
C: Pointers
C: More Pointers
The power of structs
Object Oriented Approach
Part IV - Programming Embedded Systems
Mixing Assembly & C
CPU Boot Process
Code and Data Placement
C: Address Map and Struct
Interacting with Qemu UART
Where to Next?
The C Language
This course dives into the practical applications of the C language, emphasizing
hands-on learning to solidify key concepts. Delivered in an engaging and
unconventional style, the lessons go beyond theory, equipping you with the skills
to apply C programming in real-world scenarios. By the end of the course, you’ll
feel confident in your mastery of the C language, adept at using it alongside the
tools and utilities professional C programmers rely on daily.

C Language Tour
Roadmap and Mindset
Sandbox Environment and Basic C Program
Keep an Eye on Functions, Pointers and Structs
Example of the RAW power - Functions, Struct and Pointers
Mental Models to brain tattoo
Mental Model of the System
The mental model of the CPU
The mental model of the Memory
From Text to Binary
Instruction Encoding and the rv32i ISA
A tour of Toolchain, QEMU, GDB
Demo - assembly to binary, QEMU and GDB
Instruction Encoder Decoder, Makefile and GDB Dashboard
Dwelling in the World of Assembly
Anatomy of Assembly Program, writing code, debugging in GDB
Decomposing C to Assembly and the relation
C Keywords - Data Types
Getting CPU from assembly to jump to C program
Introducing the C Keywords
Data types, Variables and Integers
Datatypes - float and double
Exploring sizes of data types and location in memory
How integers are stored - 2s complement
floating point number encoding and few examples
more floating point - float and double
signed and unsigned
const and volatile
demo - const and volatile
void, c standard and gnu C manual
typedef and sizeof
structs and unions
enums as named numbers
C Keywords - Branching and Looping
if, else, switch, case, default, do, while, for, continue and break
goto and return
Demo - if, else if and else effects at assembly level
Demo - switch case and effects at assembly level
Demo - loops - for, do, while, continue and effects at assembly level
Demo - goto and jumps across functions
auto, register, extern and static
Demo - auto keyword7
Demo - register keyword
Demo - extern keyword
Demo - static keyword
Variables and Functions
Introduction to Variables and Functions
definition vs declaration
Demo - variable and function names
Arithmetic operations and pitfalls
Project-1: Calculator in C
Problem statement
Problem statement walkthrough
Setup, variables and I/O
Using conditions, switch and loops
debugging scanf issue and cleaning up the code
guarding against bad inputs and concluding the project
Strings, Array and Pointers
Strings and concept of array and pointers
Defining and Assigning Arrays
Arrays and out of bound access
Strings and Character arrays
Introduction to the concept of pointers
Syntax related to Pointers
Demo - introduction to working with data pointers
Detour - Endianness
Demo - Difference between array and pointers
Project-2: Generating Digital Audio
Generating Digital Audio - walkthrough
Math concepts and sampling
Generating samples and file operations
Demo - Playing the Digital Audio
User Defined Data types
Revisiting types of data types
Structures - Sneak peak
Anatomy of Struct and examples
Demo - structs
unions and how they defer from struct
Demo - union
Enums and fun experiments
Enum and Scope
Project-3: Embedded Sensor Management
Problem Statement
Introduction and Walkthrough
Converting specification to data structure
The case for union and saving memory
Accessing elements with nested union and structs
more being uploaded...
C Pointers
C pointers are crucial in Firmware and System Software (based on the C language)
design. Linux, Unix, FreeRTOs, Zephyr, ThreadX etc kernels use C pointers heavily.
This Course dives into the mental models and inner workings of pointers!

Mental Models, Motivation and Reasoning about pointers


What to Imagine?
What is a pointer?
Why pointers?
Pointers - Syntax and Code
Environment Setup
Declaring|Defining a Pointer
Pointer Variable and Address
* and & in relation to pointer variable
Multi-level Pointers
Use of * and &
Array and Pointers - Similarity and differences
Many *s and Many &s
Pointer to pointer
Array of pointers
Different types of Pointers
Pointer to Data
Pointing to data with a Data type
Pointer to a struct, *, . and ->
Pointer Arithmetic
Memory model and pointer to data
Pointer to Code - Function Pointers or Callbacks
What is a function pointer?
Function pointers syntax
typedef and function pointers
Example - function pointer array
Void Pointers
What is a void pointer?
What is NULL and NULL pointer?
void pointers in - Linux source code
Pointers, Dynamic Allocation and Problems
heap/ malloc() and free()
Allocation failure
Memory Leak
Dangling Pointer
Double free()
pointer manipulation and unowned memory
Open Source Code and Pointers
Baremetal Code
FreeRTOS
Linux
C - Mastering Bit Manipulation
A short course on how to think about and do bit manipulation in the C Language

The idea behind bit manipulation


Operators and practical aspects of Bit Manipulation
Bit Masking, Setting and Clearing Bits
Data Structures (in C)
A short course on understanding, implementing and using data structures in C.

Introduction
Need of DSA in Embedded Programming
Setup and work environment
Review of concepts in C
Three essential concepts in C
One dimensional array
Visualizing and working with multi-dimensional array

The concept of structs


Everything you should know about struct
Pointers and Addresses
Pointers to struct
Abstract Data Types and Vocabulary
Abstract Data Types and Operations
Space and Time complexity
Linked Lists
Visualising Linked List
Code to represent a node and initialisation
Adding nodes and Traversing the list
Adding nodes at the end and reasoning about time
Testing the Runtime for insertion
Searching for given data
Deleting data
Insert operation
Shipping the code as static Library
Queues
The concept of Queue and why we use it
Implementing the add interface
Improving run time of the add operation
Fetching the first entry in the Queue
more lectures to be added in this section
Stacks
Lectures are being recorded and be released over the weekend.
Graphs
Lectures are being recorded and be released over the weekend.
Trees
Lectures are being recorded and be released over the weekend.
ARM Cortex-M (101) - Understanding the Processor
An introductory course on the ARM Cortex-M CPUs. How to go about learning them.

Introduction
ARM CPU Architectures

Micro Architecture Vs Architecture


How to Learn and Master CPUs
Mental model of CPU Memory interactions
How to master CPU - Different models to learn
Mental Models and How to use them
Programmers model - Register Set
Modes and Privileges
CPU boot-up and Register Set
CPU boot up and Vector Table
Exploring Cortex-M3 registers using QEMU
Conclusion
where to next.... Invitation
ARM Cortex-M (102) - Scheduler Design using Assembly
Learn the assembly programming for ARM Cortex-M CPUs by writing a scheduler from
scratch, without using any IDE, SDK or boiler plate code. Course is under
development. Content will be added when it's ready.

Environment Setup
End Goal
Environment Setup
How the ARM M-class CPUs Work
Mental Model of the CPU, Systems and the Cortex M Controller
From bit to the Programmers model and NVIC
Various ARM Architecture and CPUs - M0, M3, M23 etc.
Programmers model for the M Class CPUs
Privilege and Modes of operation
Boot up process
Exception Handling and Register Save/Restore
Assembly Programming
Booting the Processor and First Assembly Program

Instructions, Encoding and binary dump


Anatomy of assembly file
Cortex m3 instructions and experiments
Stack manipulation instructions
Implementing the Scheduler - Theory
How can Single CPU run multiple processes?
Anatomy of a Task
Trick to Context Switching and Scheduling
Exception Entry, Exit and SysTick timer
Implementing the Scheduler - Hands on
Programming SysTick and confirming the exception
saving and restoring CPU context
Setting up the tasks and the stack and trying to round robin
Round robin and switching between processes
Conclusion
Things to be mindful of
FreeRTOS - the struggle to get to context switching
GNU Make and Automation
Make is a build automation tool that automatically updates files in your project
based on their dependencies. It's primarily used for compiling source code, but can
also be used to run other commands or perform tasks.

The Basics
Setup and Quick Introduction
First makefile and basic rules
Dependencies and when make misbehaves
Dependencies and Variables
Resolving dependencies - target as a dependency
A better example and variables
Pattern Rules and some internal variables
Variable for target, pattern substitution, functions and debugging makefile
Executing shell commands and assigning value to variable
Simple Project
Organising the source code and use of shell function
Discovering the header paths
Generating the path to headers and targets without recipe
Other Features
Different names for Makefile and including other makefiles
Passing values form commandline, ?= and +=
macros
GNU Linker Script
This hands-on course dives into the details of writing linker scripts (based on GNU
LD). Linker scripts are a must-have skill for firmware and systems engineers who
have to deal with scenarios where the placement of various sections (code, data,
etc) in the memory needs granular control. Engineers who work on Bootrom,
Firmwares, Bootloaders, or otherwise are involved in lower-level systems code.

Introduction and Setup


Environment Setup
Opening and Closing the Codespace Environment
Compilation Process, Linker and the linkerscript
Demo - Resolving addresses and Merging sections
C Code and Allocation in Memory
Diagnostic Tools
Our own Linker Script
Goal
Anatomy, Memory details, Sections
Sneaky linker and linking multiple objects
Including and discarding sections from same file
Discarding and wildcard
Two memory systems
.rodata, problems with Single memory bank
Defining two memories and the problem with .data section
Introducing VMA and LMA
Copying .data section from ROM to RAM
Current location counter, variables and destination info
Address of .data section in the ROM
Code to copy .data section from ROM to RAM
Zero Initialising the .bss section
Creating custom sections and placing them
Linker command language
What is the linker command language
Linker Script and Statement
Expressions
Values
Symbol Names and naming rules
Location Counter
Expression Evaluation
Assignment operation
Assignment statement placement - relative and absolute addresses
Symbol types - Absolute and Relocatable
FreeRTOS - Teardown and Porting
Learn FreeRTOS kernel by tearing it down to it's bare minimum and doing a port for
a new target from scratch. This includes booting the CPU from scratch and placing
the code in memory manually.

Introduction and Setup


What and Why FreeRTOS
Demo walkthrough - End goal and Tools
Codespace Setup
Booting the ARM M CPU from Scratch
Programmers model and Essentials of ARM M CPU
Demo - Booting the CPU
Exploring FreeRTOS Source
Jumping from Assembly code to function in C files
Fixing the problem of function calls in C
Getting the FreeRTOS source code and documentation
Integrating FreeRTOS Kernel
Starting to Integrate the FreeRTOS-Kernel
Finding and fixing the portmacro.h errors
Finding and adding the FreeRTOSConfig.h
Enabling heap for dynamic memory allocation
Setting the Scheduling Rate
Getting the Kernel to compile successfully
Investigating Runtime Instabilities
Running the compiled binary
Investigating why task is not getting created
GDB Investigation - Memory Allocation failure
Correcting the boot-up code and memory init
Debugging and Getting the Scheduler to run
Installing the Exception Handlers
Hunting the cause for the Hard Fault
Getting the Scheduling to work
more lectures being recorded...
Git and Gerrit - the collaboration kit
Git and Gerrit are pivotal tools in the software development industry, each serving
distinct yet complementary roles that enhance collaboration, code quality, and
workflow efficiency.

Orientation, Context and Tour of Git


Introduction and Team Setup
Simulating the real world on local machine
Quick Tour of GIT - why and how
Where to install git from
Git commands
the init command
status and adding files to staging area
commits and git data management
discarding experimental changes with checkout
resetting and discarding commits
more lectures are being recorded...
The ART of Technical Discussions
Organised collection of topics, projects and questions from the web that a Embedded
Engineer should know and be able to reasons about.
Format and Introduction
Introduction and Format of the Course
Key Concepts in C
Key concepts in C
C Program and Memory Layout
.text section and behaviour in freestanding and hosted environment
Stack, the location and what all goes there
Understanding Heap and the need
demo - code analysis
structs and union
volatile and const
bit-manipulation and pointers
General Embedded Systems
Section Introduction
Some History of computing system
CPU, Memory, ISA and IO
The concept of Interrupts
More lectures being recorded...
ARM Cortex-A (101) - Introduction to the 64bit ARM CPUs
Introduction to ARM-A Class CPUs implementing the AARCH64 architecture.

Introduction
Who is ARM as the Company?
A Class CPUs, Architecture and Micro Architecture
CPU, Memory and Mental Models
How to learn CPU - different models
CPU as seen by Software Programmer - Programmers model
Execution Levels and Execution Worlds
Programmers guide and revisiting uArch
Long discussion on Els and Secure/non-secure
Exception Levels
Secure and Non-Secure world
Use cases and Software Execution in different ELs
Use case for Secure World Software Execution
Revisiting the Document
Programmer's Model - Registers
GPRs, QEMU and Demo
Exploring the idea of System Registers, SCTLR as example
Processor State Register - CPSR or PSTATE
Idea of Exceptions and saving CPU state
Special Registers
Case study and Conclusion
Boot process - Single core and Multi Core
Setup and Demo - Glitch at the end
Revisiting the Demo
Next
aarch64 Bare-metal Programming (ARM-A 102)
A short course on programming the ARM-A Class CPU (aarch64 based Cortex-A72) from
scratch using the Raspberry Pi 4B as the platform.

Introduction and Essentials


Course Introduction
Repository and documentation
Tour of Hardware Components
Operating system as development environment
System on Chip (SoC) and Boot Flow
What is System on Chip (SoC)
Getting the RaspberryPI OS and exploring the contents
The Raspberry Pi 4B Boot sequence
The Raspberry Pi 4B Boot Sequence
Files on the SDCard
Preparing the SDCard and booting RaspberryPi
RPI 4b and FT232H connection
Environment Setup for Development and Debug - OpenOCD, JTAG and GDB
The case for hardware debugging
Setting up OpenOCD from source and GDB Dashboard
OpenOCD and GDB in Action
FT232H and Raspberry PI connection for JTAG mode
Compiling first assembly program
debugging our code with OpenOCD and GDB
More lectures are being recorded and will be added soon.
System Components - MMU/SMMU
A Course dedicated to understand the concepts of Virtual memory and the hardware
components that enable it - the Memory Management Unit (MMU) and the System Memory
Management Unit (SMMU).

Setting the Background


Problems with multiple processes and physical addresses
Exploring reasons for Memory Management
Imagining Memory Management Unit
Logical Placing of MMU Hardware
Regarding Virtual memory assumption - Small Clarification
MMU's mappings and where are they stored and retrieved
Towards Efficient Desing of MMU mappings
FIrst level optimisations mappings
Continued - One Last Optimisation trick
Linux Device Drivers (101) - Writing and understanding a dummy driver
A hands on Introduction to Linux Device Driver development. Recommended for those
getting started with driver development.

Development Environment
A sandbox to run our experiments
mac-setup
Linux Setup
Windows-setup
Multipass relaunch and installing utilities
Linux Kernel and Roles of Device Drivers
Linux Kernel, System and Bootup

User Space, Kernel Space, system calls and device drivers


Files and File operations, System Calls and Drivers
Basic Loadable Kernel module and utilities
Our first Loadable module - Minimum Code based
Deep Dive - make and Makefile
Using lsmod utility to list loaded Kernel Modules
insmod, module and the kernel
rmmod, kernel and module unloading
modinfo and the mod.c file
Extending the Driver to be user interactable
proc file system, system calls and user interaction
Exploring entries in /proc
creating the /proc file entry and screwing up the kernel
Implementing the read operation
Data Passing
Passing data to user from kernel
User space app example and challenge for you
Conclusion
Quick Revision, What we did not cover and where to next..
Linux Device Drivers (102) - Controlling the Hardware
Course on writing and understanding how the Linux Device Drivers controls real
hardware. In this course, we write a kernel driver for the GPIO port of Raspberry
Pi - 4.

Introduction and Expectations


Hardware and Demo
The generic Boot flow for SoCs
more videos being recorded
Linux Device Drivers: Kernel Facilities & Helper Functions
The Linux kernel doesn't use the Standard C Library and implements the functions as
it's own modern libraries. This course is focused on exploring the facilities and
helper functions the kernel provides to manage data and different activities from
the driver.

Expectations and Getting Started


Introduction and what we will cover
Environment Setup
Browsing the Linux Kernel Source
the container_of() macro
What it is and why care?
Discovering the implementation of container_of()
Implementation in the Kernel
Linked Lists
Linked Lists and how the kernel helps us
the linux/list.h file
Exploring the list_head struct and understanding how lists will work
Initializing head pointer
Adding to the list
Traversing the list
Deleting entries from the list
Be mindful when deleting
The Kernel sleeping mechanism *
wait queue *
static declaration *
dynamic declaration *
blocking declaration *
unblocking declaration *
Example of wait queue *
Standard Timers *
Jiffies vs Hz *
The timer API *
Timer Setup and Initialisation *
Standard timer example *
High-Resolution timers (HRT) *
The API and parameters *
HRT Setup and Initialisation *
Dynamic tick/tickless kernel *
Delays and Sleep in the Kernel *
Atomic Context *
Non-Atomic Context *
Kernel locking mechanism *
the Mutex APIs *
the Spinlock APIs *
Spinlock vs Mutex *
Work deferring mechanism *
Softwirqs and ksoftirqd *
Tasklets - declaring *
Enabling and Disabling a tasklet *
Tasklet scheduling *
Work queues *
Dedicated work queue *
Kernel threads *
Kernel interruption mechanism *
Register an interrupt handler *
Interrupt handler and lock *
Concept of bottom halves *
Limitations and solutions for bottom halves *
Threaded IRQs *
Invoking user space application from the kernel *
Lectures marked with a * are begin recorded and will be available soon.
Python Programming
A quick course on getting up and running with the Python programming language for
Embedded Engineers. The course focuses on enabling C programmers with the important
insights and mental models to be used when working with Python.

Introduction and Setup


Welcome Message
Codespaces Setup and Basics
Setting Dark theme
The Mindset when working with Python
Everything is an Object

Objects, Operations and Loose types


Scripting and feeding files to interpreter
Key Ideas
The Keywords
Scripts and Functions
Function Calls
Splitting code in files and importing
more lectures will be uploaded in due time...

You might also like