Using Python for Debugging Embedded Realtime Systems
Sriram V Iyer (~sriram_v) |
Draft Presentation Deck can be downloaded from here: https://drive.google.com/file/d/0Bwha0ignK7XgVzV1N1hodzFUMk0/view?usp=sharing
(Also updated in content section)
Python is widely used for various types of application programming - However, Python can also be used to debug embedded systems (from really low footprint (memory in terms of Kilobytes) to multi-core monsters)
Python cannot be embedded in some low CPU / memory footprint systems, and is not ideal for fast / hard realtime systems. However, it is possible to use Python from a desktop or hosted environment to debug such systems. This requires understanding the memory layout, realtime constraints, compilers etc used in the embedded system.
It also requires basic string processing, parsing and file management aspects in Python - We can also use some advanced Python concepts for building more advanced debugging capabilities.
I have been using Python to debug embedded systems for over 10 years and debuggers I built have become default tools to debug the systems.
I would like to share my knowledge on how I have built various debugging, logging and parsing tools in Python to debug various types of embedded realtime systems
Basic understanding of Python
Concepts related to embedded realtime systems, compilers and debuggers will be covered as part of the talk
I have uploaded the draft deck : https://drive.google.com/file/d/0Bwha0ignK7XgVzV1N1hodzFUMk0/view?usp=sharing
1. Introduction to an executable file structure (ELF) on a non-virtual memory scenario - Sections, Linkers / Loaders
2. Linker map file - Entry into heart of an executable
3. Python File / String Parsing to extract variable -> address dictionary
4. Interfaces required to access memory in an embedded system
5. Debugging running systems using a Python script
6. Realtime Implications and Support from Target (Embedded System)
7. Building intelligent data parsers and loggers to provide quick insights (reporting in excel, text, CSV etc)
8. Way forward
I head the Platform and Virtualization division of Altiostar, a startup with the vision of making C-RAN (Cloud Radio Access Network) a reality. I was previously CEO of United Mobile Apps where we tried to build the next generation seamless connectivity platform.
I have been programming in Python from 2003, and I have written a variety of scripts, parsers and debuggers in Python.
I am an author of a book, 'Embedded Realtime Systems Programming' by McGrawHill - This book is the textbook for various universities (Indian and International) for the subject. https://books.google.co.in/books/about/Embedded_Realtime_Systems_Programming.html?id=hGDsMxEvpRUC
Speaker - Aaron Schartz Hackathon in InMobi "How to Write Beautiful Code" http://www.cse.iitk.ac.in/users/debpaul/files/hackathon_report_2014.pdf
Perceiving Beauty - Talk at HackerEarth Hackathon http://blog.hackerearth.com/2013/12/passion-wbc-event.html
I also speak regularly at YourStory events, College Symposiums and Hackathons
Blogger @ YourStory http://yourstory.com/author/sriram-iyer/