Linux and Electronics

Total Page:16

File Type:pdf, Size:1020Kb

Linux and Electronics Linux and Electronics Urs Lindegger Linux and Electronics Urs Lindegger Copyright © 2019-11-25 Urs Lindegger Table of Contents 1. Introduction .......................................................................................................... 1 Note ................................................................................................................ 1 2. Printed Circuits ...................................................................................................... 2 Printed Circuit Board design ................................................................................ 2 Kicad ....................................................................................................... 2 Eagle ..................................................................................................... 13 Simulation ...................................................................................................... 13 Spice ..................................................................................................... 13 Digital simulation .................................................................................... 18 Wings 3D ....................................................................................................... 18 User interface .......................................................................................... 19 Modeling ................................................................................................ 19 Making holes in Wings 3D ........................................................................ 20 3. Embedded Devices ............................................................................................... 21 Cross compilation ............................................................................................ 21 distcc ............................................................................................................. 22 Embedded Linux .............................................................................................. 23 x86 embedded ................................................................................................. 23 Raspberry pi ................................................................................................... 24 Gentoo on Raspberry ................................................................................ 25 Debian on Raspberry ................................................................................ 27 Beaglebone ..................................................................................................... 28 Sabre ............................................................................................................. 30 MCIMX6 ................................................................................................ 31 ltib ........................................................................................................ 31 Gentoo Linux on Sabre ............................................................................. 31 Mfgtool .................................................................................................. 36 AVR microcontrollers ....................................................................................... 37 Building Avr crosscompiler under Gentoo Linux ........................................... 37 Setoutput ................................................................................................ 38 Compiling and linking .............................................................................. 38 Program the chip ..................................................................................... 41 Debugging AVR micro controllers .............................................................. 45 Assembler ............................................................................................... 47 Codeblocks ............................................................................................. 48 AVR eclipse plugin .................................................................................. 51 AvrStudio and WinAvr ............................................................................. 55 Arduino .................................................................................................. 55 Interfacing AVR devices to Linux via USB .................................................. 57 PIC microcontrollers ......................................................................................... 57 STM32 ........................................................................................................... 58 C and small microcontrollers ............................................................................. 59 LCDproc ........................................................................................................ 59 Hardware issues ....................................................................................... 59 LCDproc software setup ............................................................................ 61 Modbus .......................................................................................................... 61 Terms and definitions ............................................................................... 61 Libmodbus .............................................................................................. 62 Modbus with Python ................................................................................ 63 Freemodbus ............................................................................................ 63 MBLogic ........................................................................................................ 64 MBLogic Soft Logic ................................................................................ 65 HMIServer .............................................................................................. 65 MBProbe ................................................................................................ 68 4. Interface ............................................................................................................. 69 iv Linux and Electronics Serial port ....................................................................................................... 69 Working with serial ports .......................................................................... 69 Terminal programs ................................................................................... 70 Troubleshooting serial links ....................................................................... 71 USB to RS232 serial controller .................................................................. 71 Programming serial links ........................................................................... 72 Connection to a remote serial link ............................................................... 72 I2C ................................................................................................................ 73 External I2C adapters ............................................................................... 73 Observing an external LM75 chip ............................................................... 74 MLX90614 Infra Red Thermometer ............................................................ 76 Observing a memory chip ......................................................................... 76 I2c bit banging ........................................................................................ 77 CAN .............................................................................................................. 79 CAN Hardware ........................................................................................ 79 CAN frames ............................................................................................ 79 CANopen ............................................................................................... 81 CAN Festival .......................................................................................... 82 Bluetooth ........................................................................................................ 83 Inside bluetooth ....................................................................................... 83 Adeunis ARF7678AA ............................................................................... 84 Laird BTM411 ........................................................................................ 84 LIRC ............................................................................................................. 86 LIRC inside ............................................................................................ 86 About the IR signals and the configuration file .............................................. 86 Lirc receivers .......................................................................................... 87 Lirc transmitters ...................................................................................... 87 A homebrew serial LIRC receiver ............................................................... 88 Audio receivers and transmitters ................................................................. 91 UDP ...................................................................................................... 95 UIR, IRman, UIRT, UIRT2 and USB-UIRT ................................................. 95 Setting up and testing the LIRC receiver ...................................................... 97
Recommended publications
  • One of the Biggest Aims of Limux Was to Make the City More Independent.”
    FEATURE MUNICH Munich city council has migrated 15,000 workers from Windows to Linux. Mike Saunders and Graham Morrison visited the city and learned just how upset Steve Ballmer was… “One of the biggest aims of LiMux was to make the city more independent.” irschgarten, in the west of the last decade. Migrating workers of Munich, is one of Europe’s biggest Germany’s third-largest city was no easy Hbeer gardens, with over 8,000 task and there were plenty of hurdles along places to sit. It’s a spectacular sight in the way, but by and large the project has summer: hundreds of benches as far as been a storming success. the eye can see, trees providing some We’ve been following the progress of shelter from the heat, and a vast number LiMux (Linux in Munich) for years, and now of people relaxing and enjoying the city’s that the project is effectively complete, we famous beers. decided to visit the city and talk to the man But while 8,000 is an impressive number, in charge of it. Read on to discover how it it’s not as impressive as 15,000. That’s all started, how Microsoft tried to torpedo how many people the Munich city council it, and whether other cities in the world can has switched from Windows to Linux over follow Munich’s lead… 52 www.linuxvoice.com MUNICH FEATURE Humble beginnings Cast your mind back to 2001, and the state of Linux at the time. It was well established as a server OS and fairly well known among computing hobbyists, but still a small fish in the desktop pond.
    [Show full text]
  • Meeting Agenda 4:30 – 6:00 PM, Wednesday, Nov 2Nd, 2016 Lyons Town Hall
    Meeting Agenda 4:30 – 6:00 PM, Wednesday, Nov 2nd, 2016 Lyons Town Hall I. Roll Call, Agenda, Minutes • Amendments to Agenda • Approve Minutes from Oct 19th • UEB Officers and Member Lead Areas • Upcoming Meetings - Nov 12, 2016 9 AM or 1 PM - Lyons Boards and Commissions Training - Lyons ​ ​ ​ Nov 9. 8 AM - Northern Water Fall Water Users Meeting - Longmont, Best Western 1850 Industrial Cir. Dec 2nd - CAMU Fall Meeting - Fairfield & Woods in Denver, CO II. Audience Business III. Liaison Updates • Board of Trustees Update - MEAN meeting Report • Staff, Engineering Update - Honeywell Savings Gaurantee IV. Continued Business ● Town Utility Account tracking V. New Business ● Water/Wastewater Rate and CIP Study Presentation RG & Assoc. VI. Parking Lot • 2017 Utility FUnd Budget, Pipe Water rates for 2017 Budget, • Reserve/Rate Stabilization Funds • Wastewater Pretreatment Policy • LRAP INF 2.2.1 • Municipal Code Corrections UEB Meeting Minutes, 19 Oct 2016 Meeting Time and Location: Began at 4:30 at Town Hall. ​ Attendance:, Aaron Caplan, Lee Hall, Coco Gordon, John Cowdry, Chuck Keim, Dan Reitz, Jay Stott ​ Staff: Kyle Miller Liaisons: Guests: ​ ​ Amendments to Agenda: Welcomed Jay Stott as the newest member of the UEB. ​ Previous Minutes: . Reviewed and modified Oct 5th Minutes under Water Wastewater CIP to add “Areas ​ where there is no looping of the water mains need looping. It was emphasized to try and coordinate getting water, and wastewater done first in areas that need paving.” Aaron had not followed up with Parks and ​ Rec to find out if they were budgeting for water usage. He would do so. Then approved minutes.
    [Show full text]
  • Limux - the IT-Evolution Status of Migration Strategy: Limux Is a Core Item for a Sustainable IT-Strategy Facing Munichs Independance
    LiMux - the IT-evolution Status of migration Strategy: LiMux is a core item for a sustainable IT-strategy facing Munichs independance Munich is on its way to an open, modern and citizen centered administration „Munich focuses on free software and open standards. They are indispensable elements of our information technology.“ Lord mayor Christian Ude Currently, there are 22 different IT departments, supporting 15.000 PC- workstations The IT of the city of Munich is going to be reorganized. This includes centralization of plan, build and run, installation of new processes according to ITIL®, standardization of applications and modernization of the IT architecture LiMux is Germanys biggest Linux project in the public sector The six main mandates of the city council of Munich Consistent linux based operating system (LiMux client) Vendor independent Office solution Migration of business applications to platform-open solutions Consolidation of PC-standard applications Consolidation and migration of MS-Office macros, templates and forms Implementation of system management solutions (standardization) IT-reorganization: Currently, the IT of the Munich administration is on its way to a rebuilding-process Facts ~ 33.000 employees (~ 1.000 located in the IT) ~ 15.000 PC-workstations 51 locations 22 independent IT-departments ~ 140 mio Euro IT-expenses Reorganization of Munichs IT (centralization of Plan, Build and Run, standardization of business applications) Project goals: Open Source until 2013 Purpose until 2011... Current status (June 2012) is Open source application programs for ~10.500 PC-workstations are migra- office communication are implemen- ted ted for each user Since 2009, all PC-workstations have Document templates are systematical- been provided with OpenOffice.org, ly based in the open source document Firefox and Thunderbird template tool „WollMux“ Since 2009, WollMux has been esta- blished as a standard document tem- Purpose until 2013..
    [Show full text]
  • Dot / Faa /Ar-11/5
    DOT/FAA/AR-11/5 Microprocessor Evaluations for Air Traffic Organization NextGen & Operations Planning Safety-Critical, Real-Time Office of Research and Technology Development Applications: Authority for Washington, DC 20591 Expenditure No. 43 Phase 5 Report May 2011 Final Report This document is available to the U.S. public through the National Technical Information Services (NTIS), Springfield, Virginia 22161. This document is also available from the Federal Aviation Administration William J. Hughes Technical Center at actlibrary.tc.faa.gov. U.S. Department of Transportation Federal Aviation Administration NOTICE This document is disseminated under the sponsorship of the U.S. Department of Transportation in the interest of information exchange. The United States Government assumes no liability for the contents or use thereof. The United States Government does not endorse products or manufacturers. Trade or manufacturer's names appear herein solely because they are considered essential to the objective of this report. The findings and conclusions in this report are those of the author(s) and do not necessarily represent the views of the funding agency. This document does not constitute FAA policy. Consult the FAA sponsoring organization listed on the Technical Documentation page as to its use. This report is available at the Federal Aviation Administration William J. Hughes Technical Center’s Full-Text Technical Reports page: actlibrary.tc.faa.gov in Adobe Acrobat portable document format (PDF). Technical Report Documentation Page 1. Report No. 2. Government Accession No. 3. Recipient's Catalog No. DOT/FAA/AR-11/5 4. Title and Subtitle 5. Report Date MICROPROCESSOR EVALUATIONS FOR SAFETY-CRITICAL, REAL-TIME May 2011 APPLICATIONS: AUTHORITY FOR EXPENDITURE NO.
    [Show full text]
  • Porting and Using Newlib in Embedded Systems William Gatliff Table of Contents Copyright
    Porting and Using Newlib in Embedded Systems William Gatliff Table of Contents Copyright................................................................................................................................3 Newlib.....................................................................................................................................3 Newlib Licenses....................................................................................................................3 Newlib Features ....................................................................................................................3 Building Newlib ...................................................................................................................7 Tweaks ....................................................................................................................................8 Porting Newlib......................................................................................................................9 Onward! ................................................................................................................................19 Resources..............................................................................................................................19 About the Author................................................................................................................19 $Revision: 1.5 $ Although technically not a GNU product, the C runtime library newlib is the best choice for many GNU-based
    [Show full text]
  • Introduction to Gentoo Linux
    Introduction to Gentoo Linux Ulrich Müller Developer and Council member, Gentoo Linux <[email protected]> Institut für Kernphysik, Universität Mainz <[email protected]> Seminar “Learn Linux the hard way”, Mainz, 2012-10-23 Ulrich Müller (Gentoo Linux) Introduction to Gentoo Linux Mainz 2012 1 / 35 Table of contents 1 History 2 Why Gentoo? 3 Compile everything? – Differences to other distros 4 Gentoo features 5 Gentoo as metadistribution 6 Organisation of the Gentoo project 7 Example of developer’s work Ulrich Müller (Gentoo Linux) Introduction to Gentoo Linux Mainz 2012 2 / 35 /"dZEntu:/ Pygoscelis papua Fastest swimming penguin Source: Wikimedia Commons License: CC-BY-SA-2.5, Attribution: Stan Shebs Ulrich Müller (Gentoo Linux) Introduction to Gentoo Linux Mainz 2012 3 / 35 How I came to Gentoo UNIX since 1987 (V7 on Perkin-Elmer 3220, later Ultrix, OSF/1, etc.) GNU/Linux since 1995 (Slackware, then S.u.S.E.) Switched to Gentoo in January 2004 Developer since April 2007 Council Mai 2009–June 2010 and since July 2011 Projects: GNU Emacs, eselect, PMS, QA Ulrich Müller (Gentoo Linux) Introduction to Gentoo Linux Mainz 2012 4 / 35 Overview Based on GNU/Linux, FreeBSD, etc. Source-based metadistribution Can be optimised and customised for any purpose Extremely configurable, portable, easy-to-maintain Active all-volunteer developer community Social contract GPL, LGPL, or other OSI-approved licenses Will never depend on non-free software Is and will always remain Free Software Commitment to giving back to the FLOSS community, e.g. submit bugs
    [Show full text]
  • User's Manual
    rBOX610 Linux Software User’s Manual Disclaimers This manual has been carefully checked and believed to contain accurate information. Axiomtek Co., Ltd. assumes no responsibility for any infringements of patents or any third party’s rights, and any liability arising from such use. Axiomtek does not warrant or assume any legal liability or responsibility for the accuracy, completeness or usefulness of any information in this document. Axiomtek does not make any commitment to update the information in this manual. Axiomtek reserves the right to change or revise this document and/or product at any time without notice. No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Axiomtek Co., Ltd. Trademarks Acknowledgments Axiomtek is a trademark of Axiomtek Co., Ltd. ® Windows is a trademark of Microsoft Corporation. Other brand names and trademarks are the properties and registered brands of their respective owners. Copyright 2014 Axiomtek Co., Ltd. All Rights Reserved February 2014, Version A2 Printed in Taiwan ii Table of Contents Disclaimers ..................................................................................................... ii Chapter 1 Introduction ............................................. 1 1.1 Specifications ...................................................................................... 2 Chapter 2 Getting Started ......................................
    [Show full text]
  • Embedded Linux Training
    Free Electrons Embedded Linux training Gregory Clement Thomas Petazzoni Michael Opdenacker Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Rights to copy © Copyright 2004-2011, Free Electrons [email protected] Electronic version of this document available on http://free-electrons.com/doc/training/embedded-linux Updates will be available on http://free-electrons.com/doc/training/embedded-linux/ Attribution ± ShareAlike 3.0 Corrections, suggestions, You are free contributions and translations are welcome! to copy, distribute, display, and perform the work to make derivative works Latest update: Feb 14, 2011 to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Linux kernel Linux device drivers Free Electrons Board support code Our services Mainstreaming kernel code Kernel debugging Custom Development System integration
    [Show full text]
  • Pacloud: Towards a Universal Cloud-Based Linux Package Manager
    Pacloud: Towards a Universal Cloud-based Linux Package Manager Olivier Bal-Pétré Pierre Varlez Fernando Perez-Tellez Technological University Dublin Technological University Dublin Technological University Dublin Dublin, Ireland Dublin, Ireland Dublin, Ireland [email protected] [email protected] [email protected] ABSTRACT or Qt framework. The LibreOffice package is built to be Package managers are a very important part of Linux distributions compatible with every user interface framework, hence heavier but we have noticed two weaknesses in them: They use pre-built than necessary: only one framework will be used for this software packages that are not optimised for specific hardware and often installation. they are too heavy for a specific need, or packages may require To optimise configuration and installation performance, source- plenty of time and resources to be compiled. In this paper, we based Linux distributions are used, one of the most famous being present a novel Linux package manager which uses cloud Gentoo Linux. computing features to compile and distribute Linux packages without impacting the end user's performance. We also show how Gentoo's package manager (Portage) builds packages from source Portage, Gentoo's package manager can be optimised for code and allows for specific compilation flags. This feature allows customisation and performance, along with the cloud computing to have packages that are optimised for a specific hardware. features to compile Linux packages more efficiently. All of this Portage also allows to build and install packages for specific resulting in a new cloud-based Linux package manager that is system requirements, with the help of USE flags [4].
    [Show full text]
  • Tesis De Microcontroladores.Pdf
    UNIVERSIDAD DE EL SALVADOR FACULTAD MULTIDISCIPLINARIA DE OCCIDENTE DEPARTAMENTO DE INGENIERÍA Y ARQUITECTURA. TRABAJO DE GRADUACIÓN DENOMINADO: “DISEÑO DE GUÍAS DE TRABAJO Y CONSTRUCCIÓN DE EQUIPO DIDÁCTICO PARA LA IMPLANTACIÓN DE PRÁCTICAS DE LABORATORIO CON MICRO CONTROLADORES EN LA CARRERA DE INGENIERÍA DE SISTEMAS INFORMÁTICOS DE LA FACULTAD MULTIDISCIPLINARIA DE OCCIDENTE.” PARA OPTAR AL GRADO DE: INGENIERO DE SISTEMA INFORMÁTICOS PRESENTAN: FRANCIA ESCOBAR, ROBERTO ANTONIO GARCÍA, JUAN CARLOS UMAÑA ORDOÑEZ, JORGE ARTURO DOCENTE DIRECTOR ING. JOSE FRANCISCO ANDALUZ NOVIEMBRE, 2007. SANTA ANA EL SALVADOR CENTRO AMÉRICA UNIVERSIDAD DE EL SALVADOR RECTOR MÁSTER RUFINO ANTONIO QUEZADA SÁNCHEZ VICERRECTOR ACADÉMICO MÁSTER MIGUEL ÁNGEL PÉREZ RAMOS VICE RECTOR ADMINISTRATIVO MÁSTER ÓSCAR NOÉ NAVARRETE SECRETARIO GENERAL LICENCIADO DOUGLAS VLADIMIR ALFARO CHÁVEZ FACULTAD MULTIDISCIPLINARIA DE OCCIDENTE DECANO LIC. JORGE MAURICIO RIVERA VICE DECANO LIC. ELADIO ZACARÍAS ORTEZ SECRETARIO LIC. VÍCTOR HUGO MERINO QUEZADA JEFE DE DEPARTAMENTO DE INGENIERÍA ING. RENÉ ERNESTO MARTÍNEZ BERMÚDEZ AGRADECIMIENTOS A DIOS TODOPODEROSO Por permitir que llegara hasta el final de la carrera, por no dejarme solo en este camino y siempre levantarme cuando necesite de su apoyo y fuerza para continuar adelante. A MI MADRE ÁNGELA VICTORIA ESCOBAR DE FRANCIA Por su apoyo, paciencia y ser un pilar en mi vida; sin la cual no hubiese podido culminar la carrera., le dedico este triunfo con las palabras con las que siempre me ha dado confianza y fuerza de seguir adelante “se triunfa cuando se persevera”. A MI PADRE JOSÉ ANTONIO FRANCIA ESCOBAR Que su ejemplo formo en mi la idea de siempre mirar más adelante, seguir luchando y creer que siempre es posible superarse cada día más; gracias por su inmenso apoyo desde todos los puntos de mi carrera y mi vida, como padre, docente, asesor y amigo.
    [Show full text]
  • INSIDE! Double-Sided DVD Double-Sided
    and lots of LINUX LINUX PRO MAGAZINE FREE USB PASSWORD SAFER BOOT DVD other timely Making Secure Boot MANAGER and useful tools work with Linux ISSUE ISSUE 206 Double-Sided DVD JANUARY 2018 JANUARY 2018 JANUARY INSIDE! SAFER Safer Boot Safer UEFI Shim TPM Backup Tools Stacer DDoS Attacks Pi FM Radio Volumio 2 Volumio Radio FM Pi Attacks DDoS Stacer Backup Tools TPM Shim UEFI BOOT Keeping control of the startup process UEFI Tricks Add a custom app that runs from the firmware Automated 5 Backup Tools Pi FM Radio DDoS Attack Stacer Build a stairway Avoiding a denial Clean up your to maker heaven of service nightmare Linux system Issue 206 Jan 2018 FOSSPicks US$ 15.99 CAN$ 17.99 FOSS • qutebrowser 1.0 0 74820 58049 Marke • Storyboarder t • CoreFreq ing • Marketing Free Software Audacity ffmpeg • Fragment synthesizer • Phipps: FOSS Communities Need Equal Rights Tutorials 3 • Digitize Your LPs with Audacity • ffmpeg 01 WWW.LINUXPROMAGAZINE.COM EDITORIAL Welcome TOMORROW’S NEWS Dear Reader, When I started working for this magazine, way back in 2004, of lobbyists and marketing professionals who keep chipping Linux was really picking up momentum. That was back in away at public opinion when everyone else has gone back to those years when every year was supposed to be “the year of their day jobs. the Linux desktop,” and the epic Linux vs. Windows battle Software has no shape or solid edges. The value of a software was revving to a full burn. product is simply what whoever owns it says they will charge One of the best examples of the Linux juggernaut was the city you for it.
    [Show full text]
  • Open Source Software and Goverment Policy in South
    OPEN SOURCE SOFTWARE AND GOVERNMENT POLICY IN SOUTH AFRICA Minnaar Pieters Thesis submitted in fulfilment of the requirements for the degree of Magister Artium (Socio‐Informatics) © Stellenbosch University 2008 Supervisor: Prof Johann Kinghorn March 2008 Stellenbosch University http://scholar.sun.ac.za Declaration I, the undersigned, hereby declare that the work contained in this thesis is my own original work and that I have not previously in its entirety, or in part, at any university for a degree. Signature: ………………………………. Date: ………………………………. ii Stellenbosch University http://scholar.sun.ac.za Summary Open-source software is not something new; however, it has come into the spotlight in the last few years, mostly due to hyped initial cost savings of the Linux operating system. Consumers and businesses were made aware of shortcomings in the traditional proprietary software model and this has in turn created a surge in popularity of open-source. The migration to open-source requires efficient research of options available and thorough analysis of the migratory process through all levels of the organization. Initial independent cost analysis has not been conclusive, with unreliable, skewed results and below average performance due to poor implementation. The focus of this study is whether open-source software is a suitable alternative to current proprietary software packages utilized by the government sector. The government sector offers unique challenges to which open-source software can be ideally suited. These include high initial costs of hardware and proprietary software, vendor lock-in, file format “future proofing” and the need for high security. Open-source software has addressed most of these issues admirably, but requires proper implementation.
    [Show full text]