SlideShare a Scribd company logo
M. Kaisar Ul Haque Principal Software Engineer ReliSource Technologies Ltd.
M. Kaisar Ul Haque Principal Software Engineer ReliSource Technologies Ltd.
The Embedded Platform 8 bit MCU (Microcontroller Unit) 16 bit MCU 32 bit MCU/Processor Costing, Physical Size, Power Consumption, Computational Power, Resources (RAM, Program memory, Peripherals). All architectures are currently popular, for example new 8 bit models comes out every few months!
 
Resource Constrains 8 bit MCU, an example: 1 KB of RAM 16 K instructions / Code Size / Program memory Limited peripherals
Resource Constrains (Contd.) “ What makes ESW different [from other software development] is resource constraints,”  says Bob Iannucci, senior vice president and head of Nokia Research Center, Nokia's corporate research unit in Helsinki. Dr. Zhang agrees:  “You have to think about space, power conservation and pixel constraints. You have to balance power, simplicity, footprint, cost and size.”
Code Size long SomeFunction(long a, long b) { long c = a * b; return c; }
Code Size (Contd.) long  SomeFunction( long  a,  long  b) { long  c  =  a  *  b; return c; } Assignments can be expensive!
Code Size (Contd.) uint16  SomeFunction( uint8  a,  uint8  b) { uint16  c  =  a  *  b; return c; }
Code Size uint16  SomeFunction( uint8  a,  uint8  b) { uint16  c  =  a  *  b; return c; } Function calls can be expensive! Next instruction (PC) is changed, Stack frame is changed Parameters are placed in stack (assignments) Room made for return value Room made for locals Function code executes Return value stored (assigned) Stack frame changed / popped Return value assigned as function’s value PC is changed / popped
Code Size (Contd.) Macros are better in many cases But not in all cases.. #define  SomeFunction(a, b) ((a) * (b)) x = SomeFunction(y, z);
Code Size (Contd.) Multiplications can be expensive.. x = y * 8; x = y << 3; Floating point operation can be expansive 1.5 * 1.5 = 2.25 is more expansive than 15 * 15 = 225
Code Size (Contd.) What machine code/instructions your code generates How to minimize your code Save every instruction you can Hundreds of business logics can be difficult to fit into the program memory (for example in 16k)
RAM Size How much RAM your code needs? How to minimize RAM utilization? Save every ‘bit’ you can.. Literally
RAM Size (Contd.) Many data types (int, long, float, double) can be expensive! long  SomeFunction( long  a,  long  b) { long  c  =  a  *  b; return c; }
RAM – Saving every ‘bit’ uint8 a; //value range 1 to 50 uint8 b; //value range 1 to 10
RAM – Saving every ‘bit’ uint8 a; //value range 1 to 50 uint8 b; //value range 1 to 10 typedef struct { uint8 a: 6; uint8 b: 2; } s_ab; s_ab ab; //takes 1 byte
Power Sleeping is better than working :) Some peripherals consume more power High clock speed consumes more power Need to save as much uA as possible Less utilization of power = more battery life = less cost = better business = less batteries = greener world
Real-time Issues Some communication timing must be precise.. Depended on the clock.. the clock doesn’t run at the speed it should..  You asked for 2 MHz.. you got 1.4 MHz.. 26uS
Expertise over ‘the Platform’ Memory – Banks, Addressing Peripherals – Clock, WDT, IRQ, IO, LCD, ADC, RTC, TBC, Timers Communications - UART, I2C, SPI Spec/Datasheet, User Manual, Instruction set, C Language, Compiler, Assembler, Linker Docs
Cross-Platform Architecture Codes needs to support current and future target platforms Hardware abstraction layer is required to separate platform specific and business codes. Reusable modules is the key Changes in a module needs to be tested over all platforms
Shortage of Documents Not much example code from vendor No example/help returned in Google Platform not yet released in the market You only have the documents provided by the MCU vendor and those can have errors!
Debugging Limited support of break points Many real-time scenarios are impossible to debug Need the right tools to debug
Collaboration “ Any device we manufacture these days is getting more and more complicated, with quite a bit of software and hardware integration,”  says Woo-hyun Paik, president and chief technology advisor at LG Electronics in the United States.  “You can't do it all by yourself.”
Testing, Testing.. Testing Accenture’s AJ Gupta.  “Without a structured approach to testing, a company cannot effectively match initial product requirements with specific testing activities and expected actual outcomes. This—coupled with the fact that many companies lack the robust tools necessary to adequately test today’s complex high-tech products— results in bugs that go uncaught before the product is shipped.”
 
 

More Related Content

PPTX
Eugene Khvedchenia - Image processing using FPGAs
PPTX
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
PDF
Cheap HPC
PDF
Maxim Kamensky - Applying image matching algorithms to video recognition and ...
PPTX
Accelerate Machine Learning on Google Cloud
PDF
Deep Learning on Everyday Devices
PPTX
Presentation on graphics processing unit (GPU)
PPT
Threading Successes 01 Intro
Eugene Khvedchenia - Image processing using FPGAs
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Cheap HPC
Maxim Kamensky - Applying image matching algorithms to video recognition and ...
Accelerate Machine Learning on Google Cloud
Deep Learning on Everyday Devices
Presentation on graphics processing unit (GPU)
Threading Successes 01 Intro

Viewers also liked (7)

PPT
Am I Flexible?
PPT
Jan Friis Nielson: Bideshi Experience
PDF
Hasin Hayder: Motivated team and getting most out of it
PPT
Tanvir Afzal: Selenium
PDF
Mobiel uitgeven voor smartphone en tablet
PPT
WinklerPrinsOnline_Basisonderwijs_APS-IT
PPT
Mozammel Haque: Scrum
Am I Flexible?
Jan Friis Nielson: Bideshi Experience
Hasin Hayder: Motivated team and getting most out of it
Tanvir Afzal: Selenium
Mobiel uitgeven voor smartphone en tablet
WinklerPrinsOnline_Basisonderwijs_APS-IT
Mozammel Haque: Scrum
Ad

Similar to Challenges in Embedded Development (20)

PPTX
lecture03_EmbeddedSoftware for Beginners
PPTX
Software for embedded systems complete
PPTX
Embedded system and development
PPT
Basics of micro controllers for biginners
PPTX
Embedded computing platform design
PDF
Open.embedded intro
PPTX
ECE-3567-Lecture-1-Spring-2025 for beginner
PPTX
Face recognization is useful in today world.pptx
PPTX
Embedded and Real Time Systems Unit II.pptx
PDF
Chapter three embedded system corse ppt AASTU.pdf
PPT
Using the Cypress PSoC Processor
PDF
13986149 c-pgming-for-embedded-systems
DOCX
Embeded detail syllabus
PPTX
Gpgpu intro
PPTX
Summer training embedded system and its scope
PDF
Introduction to embedded computing and arm processors
PPTX
Unit 1 Introduction to Arduino BOARD.pptx
PPTX
Objects? No thanks!
PDF
PILOT Session for Embedded Systems
PDF
Module 1 embedded software essentials
lecture03_EmbeddedSoftware for Beginners
Software for embedded systems complete
Embedded system and development
Basics of micro controllers for biginners
Embedded computing platform design
Open.embedded intro
ECE-3567-Lecture-1-Spring-2025 for beginner
Face recognization is useful in today world.pptx
Embedded and Real Time Systems Unit II.pptx
Chapter three embedded system corse ppt AASTU.pdf
Using the Cypress PSoC Processor
13986149 c-pgming-for-embedded-systems
Embeded detail syllabus
Gpgpu intro
Summer training embedded system and its scope
Introduction to embedded computing and arm processors
Unit 1 Introduction to Arduino BOARD.pptx
Objects? No thanks!
PILOT Session for Embedded Systems
Module 1 embedded software essentials
Ad

More from SQABD (19)

PDF
Hasin: Bangla Input Manager jQuery Plugin
PDF
Shoeb: Implementation Challenges of a Paperless Admission System
PPT
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
PPT
Zahidul: Meta Testing
PPT
Rabbi: Good to Great
PPTX
Imrul: Context Driven Testing
PPT
Tauhid: SQL Server Database Change Automation
PPT
Ayman: When to stop testing?
PDF
Mozammel: Solo Scrum - The Pomodoro Technique
PDF
Hasan: Whats preventing me to write nearly accurate code
PPT
Kabir Ahmed: AutoHotkey
PDF
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
PPT
M. Ayman Noor: SQA Empowerment
PPT
Shimul: Testing Mnemonics
PPT
Innovation Stories of Test Toolsmiths
PPTX
CUCUMBER - Making BDD Fun
PPT
Code Review In Testing View
PPTX
SCALING Scrum
PPT
Do You Have a Hit List?
Hasin: Bangla Input Manager jQuery Plugin
Shoeb: Implementation Challenges of a Paperless Admission System
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
Zahidul: Meta Testing
Rabbi: Good to Great
Imrul: Context Driven Testing
Tauhid: SQL Server Database Change Automation
Ayman: When to stop testing?
Mozammel: Solo Scrum - The Pomodoro Technique
Hasan: Whats preventing me to write nearly accurate code
Kabir Ahmed: AutoHotkey
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
M. Ayman Noor: SQA Empowerment
Shimul: Testing Mnemonics
Innovation Stories of Test Toolsmiths
CUCUMBER - Making BDD Fun
Code Review In Testing View
SCALING Scrum
Do You Have a Hit List?

Challenges in Embedded Development

  • 1. M. Kaisar Ul Haque Principal Software Engineer ReliSource Technologies Ltd.
  • 2. M. Kaisar Ul Haque Principal Software Engineer ReliSource Technologies Ltd.
  • 3. The Embedded Platform 8 bit MCU (Microcontroller Unit) 16 bit MCU 32 bit MCU/Processor Costing, Physical Size, Power Consumption, Computational Power, Resources (RAM, Program memory, Peripherals). All architectures are currently popular, for example new 8 bit models comes out every few months!
  • 4.  
  • 5. Resource Constrains 8 bit MCU, an example: 1 KB of RAM 16 K instructions / Code Size / Program memory Limited peripherals
  • 6. Resource Constrains (Contd.) “ What makes ESW different [from other software development] is resource constraints,” says Bob Iannucci, senior vice president and head of Nokia Research Center, Nokia's corporate research unit in Helsinki. Dr. Zhang agrees: “You have to think about space, power conservation and pixel constraints. You have to balance power, simplicity, footprint, cost and size.”
  • 7. Code Size long SomeFunction(long a, long b) { long c = a * b; return c; }
  • 8. Code Size (Contd.) long SomeFunction( long a, long b) { long c = a * b; return c; } Assignments can be expensive!
  • 9. Code Size (Contd.) uint16 SomeFunction( uint8 a, uint8 b) { uint16 c = a * b; return c; }
  • 10. Code Size uint16 SomeFunction( uint8 a, uint8 b) { uint16 c = a * b; return c; } Function calls can be expensive! Next instruction (PC) is changed, Stack frame is changed Parameters are placed in stack (assignments) Room made for return value Room made for locals Function code executes Return value stored (assigned) Stack frame changed / popped Return value assigned as function’s value PC is changed / popped
  • 11. Code Size (Contd.) Macros are better in many cases But not in all cases.. #define SomeFunction(a, b) ((a) * (b)) x = SomeFunction(y, z);
  • 12. Code Size (Contd.) Multiplications can be expensive.. x = y * 8; x = y << 3; Floating point operation can be expansive 1.5 * 1.5 = 2.25 is more expansive than 15 * 15 = 225
  • 13. Code Size (Contd.) What machine code/instructions your code generates How to minimize your code Save every instruction you can Hundreds of business logics can be difficult to fit into the program memory (for example in 16k)
  • 14. RAM Size How much RAM your code needs? How to minimize RAM utilization? Save every ‘bit’ you can.. Literally
  • 15. RAM Size (Contd.) Many data types (int, long, float, double) can be expensive! long SomeFunction( long a, long b) { long c = a * b; return c; }
  • 16. RAM – Saving every ‘bit’ uint8 a; //value range 1 to 50 uint8 b; //value range 1 to 10
  • 17. RAM – Saving every ‘bit’ uint8 a; //value range 1 to 50 uint8 b; //value range 1 to 10 typedef struct { uint8 a: 6; uint8 b: 2; } s_ab; s_ab ab; //takes 1 byte
  • 18. Power Sleeping is better than working :) Some peripherals consume more power High clock speed consumes more power Need to save as much uA as possible Less utilization of power = more battery life = less cost = better business = less batteries = greener world
  • 19. Real-time Issues Some communication timing must be precise.. Depended on the clock.. the clock doesn’t run at the speed it should.. You asked for 2 MHz.. you got 1.4 MHz.. 26uS
  • 20. Expertise over ‘the Platform’ Memory – Banks, Addressing Peripherals – Clock, WDT, IRQ, IO, LCD, ADC, RTC, TBC, Timers Communications - UART, I2C, SPI Spec/Datasheet, User Manual, Instruction set, C Language, Compiler, Assembler, Linker Docs
  • 21. Cross-Platform Architecture Codes needs to support current and future target platforms Hardware abstraction layer is required to separate platform specific and business codes. Reusable modules is the key Changes in a module needs to be tested over all platforms
  • 22. Shortage of Documents Not much example code from vendor No example/help returned in Google Platform not yet released in the market You only have the documents provided by the MCU vendor and those can have errors!
  • 23. Debugging Limited support of break points Many real-time scenarios are impossible to debug Need the right tools to debug
  • 24. Collaboration “ Any device we manufacture these days is getting more and more complicated, with quite a bit of software and hardware integration,” says Woo-hyun Paik, president and chief technology advisor at LG Electronics in the United States. “You can't do it all by yourself.”
  • 25. Testing, Testing.. Testing Accenture’s AJ Gupta. “Without a structured approach to testing, a company cannot effectively match initial product requirements with specific testing activities and expected actual outcomes. This—coupled with the fact that many companies lack the robust tools necessary to adequately test today’s complex high-tech products— results in bugs that go uncaught before the product is shipped.”
  • 26.  
  • 27.