Advanced Embedded Development in Linux

Similar documents
BeagleBone. Created by lady ada. Last updated on :46:10 PM UTC

Adafruit HUZZAH32 - ESP32 Feather

Bill Redirect Send BluePrint fingerprint Symcod reader numbers directly in your existing application software

OBIS LX/LS Scientific Remote

Monochrome OLED Breakouts

Adafruit AS channel Visible Light Sensor

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

Bill of Materials: DIY RFID Reader PART NO

Adafruit I2C FRAM Breakout

Color Swatch Add-on User Guide

OpenSesame EyeLink tutorial

Sino:bit with Arduino

Adafruit APDS9960 breakout

Datalogging Hat with FLORA BLE

Toy Car Speed Timer. Created by Kirby Griese. Last updated on :13:49 PM UTC

Adafruit Si7021 Temperature + Humidity Sensor

Adafruit Mini TFT " 160x80

'Sup Brows. Created by Kate Hartman. Last updated on :52:04 PM UTC

MCP Bit DAC Tutorial

1.8" TFT Display Breakout and Shield

Adafruit DRV2605 Haptic Controller Breakout

Computer Organization and Architecture, Pt. 1

Introducing Circuit Playground

0.96" mini Color OLED

Adafruit IO Basics: Analog Input

Data Logging with Feather and CircuitPython

Using BodyPaint 3D with LightWave

GPS Logging Dog Harness

Adafruit 1.27" and 1.5" Color OLED Breakout Board

Adafruit Si5351 Clock Generator Breakout

MiniPOV4 - DIY Full-Color Persistence of Vision & Light-Painting Kit

Motivation. Pipelining. Big Picture. Motivation. Forecast Big Picture Datapath Control Data Hazards Stalls Forwarding Control Hazards Exceptions

Adafruit IO Basics: Servo

Adafruit Capacitive Touch Sensor Breakouts

Adafruit s DS3231 RTC Library Documentation

Adafruit ATWINC1500 WiFi Breakout

Trinket-Powered Conference Room Occupancy Display

DC & USB Boarduino Kits

MCP Bit DAC Tutorial

Steam Heat Retrofit for Coover Hall

Overview. Label Gallery SDK User Guide

RGB LCD Shield. Created by lady ada. Last updated on :48:40 PM UTC

Fiddy - the FTDI Clip

Adafruit PCF8523 Real Time Clock

Android GBoard Morse Code Control with Circuit Playground Express

MLX90393 Wide-Range 3-Axis Magnetometer

Adafruit 7-Segment LED FeatherWings

Adafruit 8x16 LED Matrix FeatherWing

Adafruit IO Basics: Digital Input

Fiddy - the FTDI Clip

Joy Featherwing. Created by Dean Miller. Last updated on :03:07 PM UTC

Adafruit AMG8833 8x8 Thermal Camera Sensor

Introducing Circuit Playground

Desktop MQTT Client for Adafruit.io

Secret Hollow Book Intrusion Detector

CPX Mystery Dreidel. Created by Kathy Ceceri. Last updated on :51:40 PM UTC

Adafruit GPS Hat in Windows IoT Core

Adafruit WINC1500 WiFi Shield for Arduino

SOSCON Unity ML-Agents

Adafruit MMA8451 Accelerometer Breakout

OBIS LX/LS Laser Box. Laser Mount with Cooling, Interface and Power Supply FEATURES & BENEFITS

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Using IFTTT with Adafruit IO to Make an IoT Door Detector

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

LED Art with Fadecandy

FILE # EASY FUN LOOM BRACELET OWNERS MANUAL EBOOK

Circuit Playground Digital Input

Regulatory Genomics Lab

Adafruit 3.5" 480x320 TFT FeatherWing

A webservice emulator in

NeoMatrix 8x8 Word Clock

Mad Science Test Tube Rack

Reindeer Mask with Animated Eyes

PERSONAL. Exhibition PROJECT

Adafruit Color Sensors

Adafruit CCS811 Air Quality Sensor

OBIS LX/LS Single Laser Remote

14-Segment Alpha-numeric LED FeatherWing

Adafruit Mini TFT with Joystick Featherwing

Adafruit Feather 32u4 Basic Proto

TrichoScan Smart Version 1.0

3D Printed Google AIY Voice Kit

Prophet 600 GliGli mod

Power Spectral Density (PSD) Measurements with the HP 35670A Dynamic Signal Analyzer. Written by Patrick Barry 08/20/ :20 hr

7" Portable HDMI Monitor

SMART WALLET A Wallet which follows you

Adafruit DRV2605 Haptic Controller Breakout

Ring Doorbell is 4.98 x 2.43 x 0.87 inches, x 6.17 x 2.21 cm.

Adafruit eink Display Breakouts

How to Create Your Cryptocurrency Wallet and Add PumaPay Tokens

Adafruit 8x16 LED Matrix FeatherWing

MAY 30, 2018 CONTINUING EDUCATION CLASSES: JUNE

Cup o' Sound. Created by Becky Stern. Last updated on :30:06 PM EST

Adafruit Flora Bluefruit LE

Coffee Detonator: The TNT Plunger Grinder

AdaBox 005. Created by Tyler Cooper. Last updated on :08:13 PM UTC

Grove - 4-Digit Display

Custom Milled PCB Pins

Adafruit 3.5" 480x320 TFT FeatherWing

Adafruit LED Backpacks

Transcription:

Advanced Embedded Development in Linux OpenAlt 2017 Josef Kubín

Introduction Part 1 (tracing) What is a real time system? Available tracing tools The most trivial tracing How to trace USB, Ethernet Trace log processing by Vim I have to understand a terrible C source... Part 2 (scripting) Windows compilers in Linux environment (make) Scripts

What is a real time system? (Comedy Juggler James BuStar)

Professional tracing tools (not so cheap proprietary closed black boxes)

The most trivial tracing

Basic tracing terms Bridge usually an FTDI chip between PC and an examined circuit (MCU) FTDI (Future Technology Devices International) chip maker of USB bridges, commonly known by its abbreviation tracepoint(id); a tracking point in the source code that sends the tag (ID) to a stub Stub a small piece of software (HW dependent) inside of a target which sends trace data to an external interface (usually UART) Target the examined circuit, usually a microcontroller (MCU) TSM (Trace Synchronisation Mark) time or data stream sync sign for an external tracing software

The most trivial stub (PIC18), max. 256 unique tracepoints

FT232RL bridge with 256B buffer max 3MBd, USB Full Speed (12 Mb/s)

FT2232H 2x bridge with 4kB buffers! 12MBd, USB High Speed (480 Mb/s)

How do I link tracepoints with an examined source code?

How do I link tracepoints with an examined source code? ctags!

Vim shortcuts for trace.log 1) Highlight trace ID (or something) * 2) Keep cursor on trace ID and open preview window Ctrl-h 3) Set vertical windows to equal width Ctrl-w = Line up k Line down j

Tracing automaton Implements fast, tiny and binary independent protocol Naturally no data for symbol table (ELF/COFF) to connect tracepoints with a source code tree! Reminds CISC instruction set (1B opcode + payload) Tracing automaton recognizes Tracepoints (with timestamps), max. 231 points Signed/Unsigned integer 1/2/4/8 Bytes Bit fields 8/16/24/32 bits All known floating point numbers (2 + 2 from 16) Raw data (with possible RLE 512B compression) Strings 16 structures (mix of previous)

opentracer https://github.com/jkubin/opentracer an open source tracing tool for small processors Josef Kubín

What is opentracer? A software tool (set) for... Development Specific (breakpoint-less) embedded development USB, Ethernet, RTOS, device drivers, Education Helps to understand obscured source code Bughunting Helps to catch intermittent, rarely seen bugs A (huge) log file for post mortem analysis Data collection Reads a data from internal devices

Trace exotic floating numbers Sign, Exponent, Mantissa minifloat - just for fun seee emmm or eeee mmmm half float - graphics application seee eemm mmmm mmmm Microchip float history projects eeee eeee smmm mmmm mmmm mmmm extended single (9B) summation seee eeee emmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm octuple float (16B) scientific application seee eeee eeee eeee eeee mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm...

Join to opentracer project and try to write your own stub! https://github.com/jkubin/opentracer opentracer@gmail.com

I have to understand a terrible C source code with CRLF, Windows paths, ugly coding style, crazy data types, macro misuse, many conditional directives, stale comments, After weeks of frustration, try to avoid suicide! Have a rest. 1) Run a moralizer script that calls his modest friend named deodor_ansi, who does not need an extra header file. He converts crazy data types to generic ansi types. 2) Run gcc configured as a preprocessor `gcc -dd -E' that heals macro madness, straightens conditional directive maze. 3) Once you have crystal clear source code by your habits... 4) Put tracepoints, trace data points, and finally...

Happy tracing! https://github.com/jkubin/opentracer OpenAlt 2017 Josef Kubín

Part 2 (scripting) Those who do not understand UNIX are condemned to reinvent it, poorly. --Henry Spencer, programmer

(user friendly) IDE versus CLI tools

Děkuji za pozornost! Nezapomeňte vyplnit anketu! http://a.openalt.cz/371 OpenAlt 2017 Josef Kubín