SlideShare a Scribd company logo
Embedded platform
choices
Tavish Naruka
BaseApp Systems
Microcontroller or linux platform?
Or both?
When prototyping
OR
System which uses only microcontrollers to
function
System which has a linux cpu (may have
microcontrollers too)
Working with microcontrollers
● First step is component selection
○ Does the controller have all the interfaces required
○ Voltage range, cost, memory sizes(flash and ram)
○ Familiarity with the architecture, supported software,
documentation, even community
○ debugger/programmer, toolchain
○ Is some development kit available? If not, then can
you make a pcb for prototyping yourself? Maybe
someone has published a design using this online
Some popular choices
● AVR is probably most popular due to
arduino.
● PIC family of microcontrollers is also popular
● ST microelectronics
● has a few not too expensive dev kits
● TI MSP
Some dev kits
STM32F4 discovery Olimex PIC32-T79
MSP launchpad
PinguinoPIC32
Parallaxpropeller8core
Firmware
● Most code is in C, or assembly. sometimes
C++
● compilers and chip makers often provides
driver libraries and example code for things
like USB, TCP/IP stack, and other
peripherals
● The reference manual is usually a reference
for a family of similar chips, and the
datasheet is the ultimate reference
ARM Cortex M3 memory map
Peripherals and clocks on an
STM ARM cortex m3 chip
● Input voltages
● Memory layout
● How does it boot
● How do interrupts work in this chip
● System clocks
● Details about any peripherals you want to
use like USB, SPI, serial, DMA, timers etc.
Things to read in the manuals
Difference between bare metal and
hosted programs
● Userspace programs running inside an operating
system are hosted
● Code running on a microcontroller, (and linux kernel)
are compiled for a freestanding environment. You (or
mostly the compiler) provides C ‘runtime’
● C startup =
○ Initialize stack, cannot use variables without it
(mostly), or call functions
○ copy values to Initialized variables’ locations in RAM
○ initialize globals to 0
○ Copy read only data like strings to RAM
Why memory layout is important
● There is a well defined way how a chip boots, might
start executing from a particular location
● Peripherals are memory mapped
● Interrupt handlers, are locations reserved for function
pointers in some
● If you want a bootloader, then the application code must
not have any portion located in flash occupied by
bootloader
● This is done using linker scripts
● The C startup code used locations exported by the
linker script to know where from/to copy or paste code
Why microcontrollers
● Small codebase, everything can be controlled
● Instant on
● Real-time behavior
● Low power
● Less supporting hardware
● cheap
● Low level things are easier to tweak than on linux
Why not microcontrollers
● limited choice of languages, toolchain
● debugging can be difficult
● File Systems, networking, graphics etc.
These things may be done on some
microcontrollers, but with a lot more effort
than if using linux
● application portability to a different system
Embedded linux platform
● Embedded, because its not general purpose,
unlike a desktop
● Platform, because it can carry payload of
your application, and become whatever
specific purpose system you design it to be
Hardware
● Linux supports many architectures x86,
x86_64, ARM, MIPS, powerpc, AVR32 etc.
● Not designed for small microcontrollers
● RAM requirement depends on application,
but on a minimum is around 8MB
Where to get
● Evaluation board from chip manufacturer
AM335x starter kit from TI
cont..
● System on module
AM3352 SOM from olimex Carambola SOM placed on board
cont..
● Or designs/products by open hardware community
● Could be from chip makers(like beaglebone from TI),
companies releasing usable boards(like A13 olinuxino
from olimex)
● custom design
Allwinner A13 olinuxino iMX233 Locux BaseApp BeagleBone Black
cont..
● Consumer devices
A Router running linux
BelkinWemoswitch
Smartphones
Smart tv
And lots of industrial Systems
Kindle
● Some ways to create a linux system(root filesystem) are
○ [Yocto project, openembedded, angstrom]
○ [Buildroot, Openwrt]
○ debian debootstrap
○ Can use full featured distros too, like debian(without
desktop environment)
● Sometimes need to optimize for space/speed
○ provide common tools using busybox
○ simpler init, only necessary programs run on boot
○ only required drivers in kernel
○ compressed fs like squashfs
Making a linux system for an
embedded platform
Linux system boot process
● (not x86)
● first instructions execute a bootloader from
ROM which loads another bootloader, or
sometimes linux kernel itself
● The bootloader loads the kernel, passes it
kernel command line(can be hard coded in
kernel image too)
● after loading, it jumps to the kernel’s entry
point
● kernel command line option ‘rootfs’ is
mounted
cont..
● After mounting rootfs, kernel looks for init program,
which becomes the first process, and all other
processes spawn from it.
● kernel loads modules as required
● Usually init would be a standard program, like
○ systemV init
○ systemd(debian uses this)
○ upstart(ubuntu)
○ busybox provided sysV init(common in embedded
systems to conserve space)
● Init parses its init scripts to launch programs as required
● Suppose you need character LCD, keypad,
CD ROM, SD card, network, USB hard disk
● Choose linux platform which is most suitable
○ Needs USB, ethernet, fast enough
● Decide to use serial port to connect to a
microcontroller, which connects to LCD and
keypad
● If only one USB port, put usb hub
● Linux has drivers for serial(for this particular
cpu), usb-storage(both hard disk and SD
card), and usb CD ROM
Example application
cont..
● Program microcontroller so that it accepts
commands for LCD on serial RX, sends
keypad presses on serial TX
● Choose python to write application
● Can mount/unmount hard disk/SD card(usb
mass storage) and cd-rom with
mount/umount
● can use eject to open tray
● can write to serial port with say pyserial
● can access network easily

More Related Content

PDF
Intro to linux
PDF
Micro-controllers (PIC) based Application Development
PDF
Introduction to Embedded Systems a Practical Approach
PDF
Intro to Embedded OS, RTOS and Communication Protocols
PDF
Linux-Internals-and-Networking
PDF
Introduction to Embedded Systems
PDF
Embedded Android : System Development - Part II (Linux device drivers)
PPSX
Introduction to embedded linux device driver and firmware
Intro to linux
Micro-controllers (PIC) based Application Development
Introduction to Embedded Systems a Practical Approach
Intro to Embedded OS, RTOS and Communication Protocols
Linux-Internals-and-Networking
Introduction to Embedded Systems
Embedded Android : System Development - Part II (Linux device drivers)
Introduction to embedded linux device driver and firmware

What's hot (20)

PPTX
Phoenix family overview 080414
PDF
Embedded Operating System - Linux
PDF
Masters porting linux
PDF
Porting linux to a new architecture
PDF
Embedded Android : System Development - Part III (Audio / Video HAL)
PDF
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
PPTX
General architecture ppt
PPTX
Unit 1 2 p2 3 (2)
PPT
0.3 arsitektur mikrokontroler
PPT
mbed @ Elektor Live! 2010
PDF
Embedded Android : System Development - Part II (HAL)
PPT
Arm processor
PDF
Android Things : Building Embedded Devices
PDF
Linux systems - Getting started with setting up and embedded platform
PDF
IncludeOS for ics 2018
PDF
20111130 hardware-monitoring-with-the-new-ipmi-plugin-v2
PDF
Lect16
PDF
LAS16-400: Mini Conference 3 AOSP (Session 1)
PDF
A low cost, real-time algorithm for embedded devices based on freertos kernel
Phoenix family overview 080414
Embedded Operating System - Linux
Masters porting linux
Porting linux to a new architecture
Embedded Android : System Development - Part III (Audio / Video HAL)
Cloud Computing in practice with OpenNebula ~ Develer workshop 2012
General architecture ppt
Unit 1 2 p2 3 (2)
0.3 arsitektur mikrokontroler
mbed @ Elektor Live! 2010
Embedded Android : System Development - Part II (HAL)
Arm processor
Android Things : Building Embedded Devices
Linux systems - Getting started with setting up and embedded platform
IncludeOS for ics 2018
20111130 hardware-monitoring-with-the-new-ipmi-plugin-v2
Lect16
LAS16-400: Mini Conference 3 AOSP (Session 1)
A low cost, real-time algorithm for embedded devices based on freertos kernel
Ad

Similar to Embedded platform choices (20)

PPTX
Embedded linux
PPTX
Lect 1_Embedded Linux Embedded RTOS ppt
PPTX
lecture03_EmbeddedSoftware for Beginners
PDF
Building
PPTX
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
PPTX
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
PPTX
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
PDF
Embedded Linux Systems Basics
ZIP
Embedded Linux Odp
PPTX
Embedded system
PPTX
Introduction to Embedded Linux
PDF
Introduction and course Details of Embedded Linux Platform Developer Training
PPT
Embedded Linux Talk Uni Forum
PDF
Module 4 Embedded Linux
PDF
IRJET - Development of Embedded Linux System from Bare Board
PPTX
BSP.pptx
PDF
Embedded Systems Second Edition D Sundaram R M Kothari Dwarkadas Pralhaddas N
PDF
TDC2016SP - Trilha Linux Embarcado
PPT
Compilers programmingembedded
PDF
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Embedded linux
Lect 1_Embedded Linux Embedded RTOS ppt
lecture03_EmbeddedSoftware for Beginners
Building
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
Lecture01_IntroToLinuxAndEmbeddedSystems.pptx
Embedded Linux Systems Basics
Embedded Linux Odp
Embedded system
Introduction to Embedded Linux
Introduction and course Details of Embedded Linux Platform Developer Training
Embedded Linux Talk Uni Forum
Module 4 Embedded Linux
IRJET - Development of Embedded Linux System from Bare Board
BSP.pptx
Embedded Systems Second Edition D Sundaram R M Kothari Dwarkadas Pralhaddas N
TDC2016SP - Trilha Linux Embarcado
Compilers programmingembedded
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Ad

More from Tavish Naruka (6)

PDF
Makefiles
PDF
Zephyr RTOS workshop
PDF
Socket programming, and openresty
PDF
a pcb badge
PDF
Internet of things - with routers
PDF
Hardware hacking
Makefiles
Zephyr RTOS workshop
Socket programming, and openresty
a pcb badge
Internet of things - with routers
Hardware hacking

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced Soft Computing BINUS July 2025.pdf
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
cuic standard and advanced reporting.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Reach Out and Touch Someone: Haptics and Empathic Computing
GamePlan Trading System Review: Professional Trader's Honest Take
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf

Embedded platform choices

  • 2. Microcontroller or linux platform? Or both? When prototyping OR
  • 3. System which uses only microcontrollers to function System which has a linux cpu (may have microcontrollers too)
  • 4. Working with microcontrollers ● First step is component selection ○ Does the controller have all the interfaces required ○ Voltage range, cost, memory sizes(flash and ram) ○ Familiarity with the architecture, supported software, documentation, even community ○ debugger/programmer, toolchain ○ Is some development kit available? If not, then can you make a pcb for prototyping yourself? Maybe someone has published a design using this online
  • 5. Some popular choices ● AVR is probably most popular due to arduino. ● PIC family of microcontrollers is also popular ● ST microelectronics ● has a few not too expensive dev kits ● TI MSP
  • 6. Some dev kits STM32F4 discovery Olimex PIC32-T79 MSP launchpad PinguinoPIC32 Parallaxpropeller8core
  • 7. Firmware ● Most code is in C, or assembly. sometimes C++ ● compilers and chip makers often provides driver libraries and example code for things like USB, TCP/IP stack, and other peripherals ● The reference manual is usually a reference for a family of similar chips, and the datasheet is the ultimate reference
  • 8. ARM Cortex M3 memory map
  • 9. Peripherals and clocks on an STM ARM cortex m3 chip
  • 10. ● Input voltages ● Memory layout ● How does it boot ● How do interrupts work in this chip ● System clocks ● Details about any peripherals you want to use like USB, SPI, serial, DMA, timers etc. Things to read in the manuals
  • 11. Difference between bare metal and hosted programs ● Userspace programs running inside an operating system are hosted ● Code running on a microcontroller, (and linux kernel) are compiled for a freestanding environment. You (or mostly the compiler) provides C ‘runtime’ ● C startup = ○ Initialize stack, cannot use variables without it (mostly), or call functions ○ copy values to Initialized variables’ locations in RAM ○ initialize globals to 0 ○ Copy read only data like strings to RAM
  • 12. Why memory layout is important ● There is a well defined way how a chip boots, might start executing from a particular location ● Peripherals are memory mapped ● Interrupt handlers, are locations reserved for function pointers in some ● If you want a bootloader, then the application code must not have any portion located in flash occupied by bootloader ● This is done using linker scripts ● The C startup code used locations exported by the linker script to know where from/to copy or paste code
  • 13. Why microcontrollers ● Small codebase, everything can be controlled ● Instant on ● Real-time behavior ● Low power ● Less supporting hardware ● cheap ● Low level things are easier to tweak than on linux
  • 14. Why not microcontrollers ● limited choice of languages, toolchain ● debugging can be difficult ● File Systems, networking, graphics etc. These things may be done on some microcontrollers, but with a lot more effort than if using linux ● application portability to a different system
  • 15. Embedded linux platform ● Embedded, because its not general purpose, unlike a desktop ● Platform, because it can carry payload of your application, and become whatever specific purpose system you design it to be
  • 16. Hardware ● Linux supports many architectures x86, x86_64, ARM, MIPS, powerpc, AVR32 etc. ● Not designed for small microcontrollers ● RAM requirement depends on application, but on a minimum is around 8MB
  • 17. Where to get ● Evaluation board from chip manufacturer AM335x starter kit from TI
  • 18. cont.. ● System on module AM3352 SOM from olimex Carambola SOM placed on board
  • 19. cont.. ● Or designs/products by open hardware community ● Could be from chip makers(like beaglebone from TI), companies releasing usable boards(like A13 olinuxino from olimex) ● custom design Allwinner A13 olinuxino iMX233 Locux BaseApp BeagleBone Black
  • 20. cont.. ● Consumer devices A Router running linux BelkinWemoswitch Smartphones Smart tv And lots of industrial Systems Kindle
  • 21. ● Some ways to create a linux system(root filesystem) are ○ [Yocto project, openembedded, angstrom] ○ [Buildroot, Openwrt] ○ debian debootstrap ○ Can use full featured distros too, like debian(without desktop environment) ● Sometimes need to optimize for space/speed ○ provide common tools using busybox ○ simpler init, only necessary programs run on boot ○ only required drivers in kernel ○ compressed fs like squashfs Making a linux system for an embedded platform
  • 22. Linux system boot process ● (not x86) ● first instructions execute a bootloader from ROM which loads another bootloader, or sometimes linux kernel itself ● The bootloader loads the kernel, passes it kernel command line(can be hard coded in kernel image too) ● after loading, it jumps to the kernel’s entry point ● kernel command line option ‘rootfs’ is mounted
  • 23. cont.. ● After mounting rootfs, kernel looks for init program, which becomes the first process, and all other processes spawn from it. ● kernel loads modules as required ● Usually init would be a standard program, like ○ systemV init ○ systemd(debian uses this) ○ upstart(ubuntu) ○ busybox provided sysV init(common in embedded systems to conserve space) ● Init parses its init scripts to launch programs as required
  • 24. ● Suppose you need character LCD, keypad, CD ROM, SD card, network, USB hard disk ● Choose linux platform which is most suitable ○ Needs USB, ethernet, fast enough ● Decide to use serial port to connect to a microcontroller, which connects to LCD and keypad ● If only one USB port, put usb hub ● Linux has drivers for serial(for this particular cpu), usb-storage(both hard disk and SD card), and usb CD ROM Example application
  • 25. cont.. ● Program microcontroller so that it accepts commands for LCD on serial RX, sends keypad presses on serial TX ● Choose python to write application ● Can mount/unmount hard disk/SD card(usb mass storage) and cd-rom with mount/umount ● can use eject to open tray ● can write to serial port with say pyserial ● can access network easily