Électronique Numérique

Total Page:16

File Type:pdf, Size:1020Kb

Électronique Numérique Electronique´ num´erique J.-M Friedt Electronique´ num´erique J.-M Friedt FEMTO-ST/d´epartement temps-fr´equence [email protected] transparents `a jmfriedt.free.fr 22 novembre 2020 1 / 25 Electronique´ num´erique J.-M Friedt Plan des interventions : 7 cours/TP d'introduction au STM32 en C baremetal : 1 Electronique´ num´eriqueet conception du circuit L3 : aspects analogiques, consommation ´electrique,lecture de datasheet Survol des divers p´eriph´eriquesqui seront abord´es(RS232, SPI, timer, ADC) repr´esentationdes donn´ees(tailles/encodage), masques, architecture Rappels sur Atmega32U4 (Makefile, compilation, masques ...) 2 Premiers pas sur le STM32, adresses des p´eriph´eriques,architecture 3 Fonctionnement de gcc et optimisations : pr´eprocess{compilateur{assembleur{linker, passage C `aassembleur, pointeurs 4 biblioth`equeset s´eparation algorithme/mat´eriel,simulateurs libopencm3, newlib & stubs, ressources requises par les biblioth`eques 5 Bus de communication s´erie,synchrone/asynchrone 6 arithm´etiquesur syst`emesembarqu´es entiers, flottants, convertir un algorithme exprim´een nombres `avirgules vers des entiers, timers 7 interruptions et acquisition de donn´eesanalogiques, fr´equence d'´echantillonnage vecteurs d'interruption, gestion des horloges du STM32, ADC 2 / 25 Electronique´ num´erique J.-M Friedt Compiler son compilateur Une cha^ınede compilation n´ecessite 1 le compilateur (gcc) 2 les outils pour convertir les divers formats de fichiers (binutils) 3 les biblioth`eques (newlib) + debugger (gdb) + outils de programmation du microcontr^oleur (avrdude, stm32flash, dfu-programmer ...) configure --target=arm-none-eabi --prefix=$fHOMEg/sat Automatiser ce processus dans un script pour g´en´ererun ensemble \coh´erent"d'outils 1. 1. explication de son utilisation `a http://jmfriedt.free.fr/summon_arm.pdf 3 / 25 Electronique´ num´erique J.-M Friedt newlib Implication de la biblioth`equede calculs flottants : sans stdio, avec une division flottante 12950 sans stdio, avec atan sur flottant 17090 toujours en thumb : avec stdio, avec une division flottante 80397 avec stdio, avec atan sur flottant 80397 Thumb est un sous-ensemble d'instructions pour processeur ARM cod´esur 16 bits au lieu de 32 bits 2 Diverses impl´ementations libres des biblioth`equesstandard du C : • glibc (http://www.gnu.org/software/libc/, utilis´eepar le noyau Linux) ... • ... et eglibc (embedded glibc, http://www.eglibc.org/home) ont fusionn´e, • uClibc (http://www.uclibc.org/, utilis´eepar uClinux), 2. J.-M Friedt, E.´ Carry, D´eveloppement sur processeur `abase de cœur ARM7 sous GNU/Linux, GNU/Linux Magazine France 117 (Juin 2009), pp.40-59 4 / 25 Electronique´ num´erique J.-M Friedt Le probl`eme... Dans un programme en C, l'appel `a malloc() se traduit par une erreur `al'´editionde liens arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': newlib/libc/reent/sbrkr.c:58: undefined reference to `_sbrk' Idem pour printf() arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': newlib/libc/reent/sbrkr.c:58: undefined reference to `_sbrk' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-writer.o): In function `_write_r': newlib/libc/reent/writer.c:58: undefined reference to `_write' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-closer.o): In function `_close_r': newlib/libc/reent/closer.c:53: undefined reference to `_close' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-fstatr.o): In function `_fstat_r': newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-isattyr.o): In function `_isatty_r': newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-lseekr.o): In function `_lseek_r': newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek' arm-none-eabi/lib/thumb/cortex-m3/libc.a(lib_a-readr.o): In function `_read_r': newlib/libc/reent/readr.c:58: undefined reference to `_read' 5 / 25 Electronique´ num´erique J.-M Friedt Exploitation d'une biblioth`eque{ newlib https://sourceware.org/newlib/libc.html#Stubs : 17 stubs, colle entre newlib et nos programmes 3. • exit : quitter un programme • lseek : sans fermer les fichiers ouverts • open : • environ : • read : lire depuis un fichier • execve : • sbrk : utilis´epar malloc • fork : • stat : • fstat : • times : • getpid : • unlink : • isatty : • wait : • kill : • write : ´ecriredans un fichier, • link : incluant stdout 3. http://wiki.osdev.org/Porting_Newlib 6 / 25 Electronique´ num´erique J.-M Friedt Exploitation d'une biblioth`eque{ newlib Exemple d'impl´ementation (envoyer stdio sur port s´erie) s s i z e t r e a d r (struct r e e n t ∗r , int file, void ∗ptr , s i z e t l e n ) fc h a r c; int i; unsigned char ∗p ; p = (unsigned char ∗) p t r ; f o r (i=0; i < l e n ; i ++) fw h i l e ( global i n d e x == 0) fg //!uart0 k b h i t()); c = g l o b a l tab [0]; global i n d e x =0; //(char) uart0 g e t c(); i f (c == 0x0D) f∗p='\0' ;break; g ∗p++ = c ; j m f putchar(c,NULL,0 ,0) ; g r e t u r n len − i ; g s s i z e t w r i t e r ( struct r e e n t ∗r , int file, const void ∗ptr , s i z e t l e n ) f i n t i; const unsigned char ∗p ; p = (const unsigned char ∗) p t r ; f o r (i=0; i < l e n ; i ++) f i f( ∗p == '\n' ) j m f p u t c h a r ( '\r' ,NULL,0 ,0) ; j m f p u t c h a r (∗p++,NULL , 0 , 0 ) ; g r e t u r n len; g v o i d jmf p u t c h a r (int a,char ∗chaine , int ∗ c h a i n e i n d e x ,int USARTx) f i f (chaine != NULL) fc h a i n e [∗ c h a i n e i n d e x ]=a ;∗ c h a i n e i n d e x=∗c h a i n e i n d e x +1;g e l s e f i f (usart p o r t ==1) fUSART SendData (USART1, a); w h i l e(USART GetFlagStatus(USART1, USART FLAG TC) == RESET) f ; g g e l s e fUSART SendData (USART2, a); w h i l e(USART GetFlagStatus(USART2, USART FLAG TC) == RESET) f ; g g g g 7 / 25 Electronique´ num´erique J.-M Friedt D´emonstration #ifdef use s t d i o f o r (tempe=1;tempe <10;tempe++) fmf=mf∗ l f ; g p r i n t f ( "\n+mf=%d\n" ,(int)mf); t =(char ∗)malloc(200); // malloc requiert s b r k p r i n t f ( "^%x\n^%x\n" ,(int)t[0],t[199]); memset(t ,0x55,200) ; p r i n t f ( "^%x\n^%x\n" ,(int)t[0],t[199]); #endif w h i l e (1) f #ifndef use s t d i o p u t chars(welcome); #else p r i n t f ( "%s" , welcome ) ; #endif i f (i <10) p u t c h a r (USART1 , i+'0' ); e l s e put c h a r (USART1 , i+'A' −10) ; i ++;if (i==16) i=0; ... 8 / 25 Electronique´ num´erique J.-M Friedt D´emonstration Compromis entre temps de d´eveloppement, fonctionnalit´eset occupation de ressources 3240 main.bin 31824 main_stdio.bin Ici, affichage par printf(), allocation de m´emoirepar malloc(), calculs flottants Un ´emulateurpour tester ses programmes en l'absence du mat´eriel: https://github.com/beckus/qemu_stm32 qemu-system-arm -M stm32-p103 -serial stdio -serial stdio -kernel main.bin suppose n´eanmoinsune impl´ementation\correcte" des p´eriph´eriques. simavr pour Atmega32U2 9 / 25 Electronique´ num´erique J.-M Friedt Stubs • Un programme principal contient toute l'\intelligence" du code : algorithmique • Ce programme fait exclusivement appel `ades fonctions g´en´eriques ind´ependantes du mat´eriel: stubs • L'acc`esde ces fonctions au mat´eriel est impl´ement´edans des fichiers s´epar´es • Algorithmique est li´eaux appels mat´erielpar le compilation (compilation s´epar´ee) • Possibilit´ede passer des arguments par Makefile : variables et tests conditionnels • Edition´ de lien g´en`ereun ex´ecutable algorithmique matériel1 matériel2, bibliothèque1 matériel2, bibliothèque2 led_on() GP3DAT |= 0x00070000; GPIO_SetBits(GPIOC,GPIO_Pin_2); gpio_set (GPIOA, GPIO4); led_off() GP3DAT |&= (~0x00070000); GPIO_ResetBits(GPIOC,GPIO_Pin_1); gpio_clear(GPIOA, GPIO4); communique() COMTX = a; USART_SendData (USART1, a); usart_send_blocking (USART1,a) Makefile MODBUS = 0 #include makefile.cortex_AD9958 #include makefile.cortex_XE1203 include makefile.aduc ifeq ($(MODBUS),1) ... endif Edition de liens −> exécutable ! remplacement \ais´e"de la plateforme mat´eriellesans modifier l'algorithme (HAL) ! \fausses fonctions" sur PC pour ´emulerles appels : test unitaire 10 / 25 Electronique´ num´erique HAL : Hardware Abstraction Layer J.-M Friedt Android HAL ST Microelectronics development fra- mework https://source.android.com/devices/architecture https://www.st.com/en/embedded-software/x-cube-spn14.html 11 / 25 Electronique´ num´erique J.-M Friedt Conception de logiciels 1 S´eparer le code li´eau mat´eriel(initialisation et acc`esaux ressources mat´erielles)de l'algorithmique 2 Compilation s´epar´ee: choisir une impl´ementationdu mat´erielou une ´emulationlogicielle (gcc supporte une multitude de plateformes) 3 Permet de tester son code sur PC avant de le porter au microcontr^oleur(simulation de diverses conditions mat´erielles){ test automatique, en particulier de cas pathologiques 4 Exploitation d'un simulateur pour conna^ıtrel'´etatinterne de la machine qui s´equencele code 5 qemu pour grand nombre de plateformes, simavr pour Atmega32U2 unsigned short interroge (unsigned short puissance, unsigned int freq,unsigned int offset,unsigned char chan) { unsigned int v12; FTW0[1] = (freq & 0xFF000000) >> 24; FTW0[2] = (freq & 0xFF0000) >> 16; FTW0[3] = (freq & 0xFF00) >> 8; FTW0[4] = (freq & 0xFF); [...] v12 = readADC12 (); readerF2_CLR; // coupe reception TIM_ITConfig (TIM3, TIM_IT_Update, ENABLE); return (v&0x03F); } 12 / 25 Electronique´ num´erique J.-M Friedt Conception de logiciels 1 S´eparer le code li´eau mat´eriel(initialisation et acc`esaux ressources mat´erielles)de l'algorithmique 2 Compilation s´epar´ee:
Recommended publications
  • Atomicity and Visibility in Tiny Embedded Systems
    Atomicity and Visibility in Tiny Embedded Systems John Regehr Nathan Cooprider David Gay University of Utah, School of Computing Intel Research Berkeley {regehr, coop}@cs.utah.edu [email protected] Abstract bool flag = false; // interrupt handler Visibility is a property of a programming language’s void __vector_5 (void) memory model that determines when values stored by { one concurrent computation become visible to other atomic flag = true; computations. Our work exploits the insight that in } nesC, a C-like language with explicit atomicity, the traditional way of ensuring timely visibility—volatile void wait_for_interrupt(void) variables—can be entirely avoided. This is advan- { tageous because the volatile qualifier is a notorious bool done = false; do { source of programming errors and misunderstandings. atomic if (!flag) done = true; Furthermore, the volatile qualifier hurts performance } while (!done); by inhibiting many more optimizations than are neces- } sary to ensure visibility. In this paper we extend the semantics of nesC’s atomic statements to include a visi- bility guarantee, we show two ways that these semantics Figure 1. nesC code containing a visibility er- can be implemented, and we also show that our better ror implementation has no drawbacks in terms of resource usage. Until now, nesC has left it to programmers to en- 1. Introduction sure visibility by judicious use of C’s volatile qual- ifier. In this paper we investigate the idea of strength- ening nesC’s memory model such that the semantics of The nesC [5] language is a C dialect designed for pro- atomic are augmented with a visibility guarantee. This gramming embedded wireless sensor network nodes.
    [Show full text]
  • Operating Systems and Applications for Embedded Systems >>> Toolchains
    >>> Operating Systems And Applications For Embedded Systems >>> Toolchains Name: Mariusz Naumowicz Date: 31 sierpnia 2018 [~]$ _ [1/19] >>> Plan 1. Toolchain Toolchain Main component of GNU toolchain C library Finding a toolchain 2. crosstool-NG crosstool-NG Installing Anatomy of a toolchain Information about cross-compiler Configruation Most interesting features Sysroot Other tools POSIX functions AP [~]$ _ [2/19] >>> Toolchain A toolchain is the set of tools that compiles source code into executables that can run on your target device, and includes a compiler, a linker, and run-time libraries. [1. Toolchain]$ _ [3/19] >>> Main component of GNU toolchain * Binutils: A set of binary utilities including the assembler, and the linker, ld. It is available at http://www.gnu.org/software/binutils/. * GNU Compiler Collection (GCC): These are the compilers for C and other languages which, depending on the version of GCC, include C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go. They all use a common back-end which produces assembler code which is fed to the GNU assembler. It is available at http://gcc.gnu.org/. * C library: A standardized API based on the POSIX specification which is the principle interface to the operating system kernel from applications. There are several C libraries to consider, see the following section. [1. Toolchain]$ _ [4/19] >>> C library * glibc: Available at http://www.gnu.org/software/libc. It is the standard GNU C library. It is big and, until recently, not very configurable, but it is the most complete implementation of the POSIX API. * eglibc: Available at http://www.eglibc.org/home.
    [Show full text]
  • System Size BOF
    ELC 2009 System Size BOF Michael Opdenacker Free Electrons 1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Rights to copy © Copyright 2004-2009, Free Electrons [email protected] Document sources: http://free-electrons.com/pub/conferences/2009/elc/ Updates on size reduction techniques can be found on http://free-electrons.com/docs/optimizations/ Attribution ± ShareAlike 3.0 You are free to copy, distribute, display, and perform the work Corrections, suggestions, to make derivative works contributions and translations are welcome! to make commercial use of the work Under the following conditions Latest update: Apr 28, 2009 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 2 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com 24 slides... To avoid a tragic increase in the size of your system. 3 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Why system size matters Because Linux wouldn©t fit otherwise To leave more space for user data (media players) To keep things easier to maintain Lighter code is faster to boot We should stop size growth because we don©t want to force people to use old kernels and old software.
    [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]
  • Implantación De Linux Sobre Microcontroladores
    Embedded Linux system development Embedded Linux system development DSI Embedded Linux Free Electrons Developers © Copyright 2004-2018, Free Electrons. Creative Commons BY-SA 3.0 license. Latest update: March 14, 2018. Document updates and sources: http://free-electrons.com/doc/training/embedded-linux Corrections, suggestions, contributions and translations are welcome! DSI - FCEIA http://dsi.fceia.unr.edu.ar 1/263 Derechos de copia © Copyright 2018, Luciano Diamand Licencia: Creative Commons Attribution - Share Alike 3.0 http://creativecommons.org/licenses/by-sa/3.0/legalcode Ud es libre de: I copiar, distribuir, mostrar y realizar el trabajo I hacer trabajos derivados I hacer uso comercial del trabajo Bajo las siguientes condiciones: I Atribuci´on. Debes darle el cr´editoal autor original. I Compartir por igual. Si altera, transforma o construye sobre este trabajo, usted puede distribuir el trabajo resultante solamente bajo una licencia id´enticaa ´esta. I Para cualquier reutilizaci´ono distribuci´on,debe dejar claro a otros los t´erminos de la licencia de este trabajo. I Se puede renunciar a cualquiera de estas condiciones si usted consigue el permiso del titular de los derechos de autor. El uso justo y otros derechos no se ven afectados por lo anterior. DSI - FCEIA http://dsi.fceia.unr.edu.ar 2/263 Hiperv´ınculosen el documento Hay muchos hiperv´ınculosen el documento I Hiperv´ıncluosregulares: http://kernel.org/ I Enlaces a la documentaci´ondel Kernel: Documentation/kmemcheck.txt I Enlaces a los archivos fuente y directorios del kernel: drivers/input include/linux/fb.h I Enlaces a declaraciones, definiciones e instancias de los simbolos del kernel (funciones, tipos, datos, estructuras): platform_get_irq() GFP_KERNEL struct file_operations DSI - FCEIA http://dsi.fceia.unr.edu.ar 3/263 Introducci´ona Linux Embebido Introducci´ona DSI Linux Embebido Embedded Linux Developers Free Electrons © Copyright 2004-2018, Free Electrons.
    [Show full text]
  • Workshop-Linux-Completo.Pdf
    Linux embebido Workshop Linux Embebido Lucas Chiesa Joaquín de Andrés Germán Bassi Laboratorio Sistemas embebidos FIUBA Creative Commons BY-SA 3.0 license Basado en : http://free-electrons.com/docs/embedded-linux-intro ¿Sistema embebido? Un sistema embebido o empotrado es un sistema de computación diseñado para realizar una o algunas pocas funciones dedicadas frecuentemente en un sistema de computación en tiempo real. Los sistemas embebidos se utilizan para usos muy diferentes a los usos generales a los que se suelen someter a las computadoras personales. Wikipedia, http://es.wikipedia.org/wiki/Sistema_embebido SASE 2012 - Workshop Linux Embebido 2 Muchos sistemas diferentes Es una definición muy genérica: Cubre muchos tipos diferentes de sistemas Línea borrosa con sistemas tradicionales Productos ªConsumer Electronics (CE)º: Routers hogareños, reproductores de DVD, Televisores, cámaras digitales, GPS, celulares ... Productos industriales: Controladores de máquinas, alarmas, equipos de vigilancia, autos, satélites... SASE 2012 - Workshop Linux Embebido 3 Muchos productos diferentes SASE 2012 - Workshop Linux Embebido 4 Linux embebido El Software Libre y Abierto ofrece una rango muy amplio de herramientas para desarrollar sistemas embebidos. Ventajas ● Reutilizar componentes existentes para el sistema base. Permite concentrarse en el valor agregado del producto. ● Componentes de alta calidad y muy probados. (Kernel Linux , librerías de C ...) ● Control completo sobre la elección de componentes. Modificaciones posibles ilimitadas. ● Soporte por la comunidades: tutoriales, listas de correo... ● Bajo costo, sin licencias por unidad. ● Acceso más simple al software y a las herramientas. SASE 2012 - Workshop Linux Embebido 5 Ejemplos de dispositivos GPS: TomTom y Garmin Routers hogareños: Linksys, Netgear PDA: Zaurus, Nokia N8x0 TVs, DVDs: Sony, Philips, ..
    [Show full text]
  • Wind River Linux Release Notes, 5.0.1
    Wind River Linux Release Notes, 5.0.1 Wind River® Linux RELEASE NOTES 5.0.1 Copyright © 2013 Wind River Systems, Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means without the prior written permission of Wind River Systems, Inc. Wind River, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc. The Wind River logo is a trademark of Wind River Systems, Inc. Any third-party trademarks referenced are the property of their respective owners. For further information regarding Wind River trademarks, please see: www.windriver.com/company/terms/trademark.html This product may include software licensed to Wind River by third parties. Relevant notices (if any) are provided in your product installation at one of the following locations: installDir/product_name/3rd_party_licensor_notice.pdf installDir/legal-notices/ Wind River may refer to third-party documentation by listing publications or providing links to third-party Web sites for informational purposes. Wind River accepts no responsibility for the information provided in such third-party documentation. Corporate Headquarters Wind River 500 Wind River Way Alameda, CA 94501-1153 U.S.A. Toll free (U.S.A.): 800-545-WIND Telephone: 510-748-4100 Facsimile: 510-749-2010 For additional contact information, see the Wind River Web site: www.windriver.com For information on how to contact Customer Support, see: www.windriver.com/support Wind River Linux Release Notes 5.0.1 4 Apr 13 Contents 1 Overview ...................................................................................................... 1 1.1 Introduction ...................................................................................................................... 1 1.2 Navigating these Release Notes ................................................................................... 1 1.3 Features ............................................................................................................................
    [Show full text]
  • Tinyos Tutorial
    TinyOS Tutorial CSE521S, Spring 2017 Dolvara Gunatilaka Based on tutorial by Mo Sha, Rahav Dor TinyOS community q http://www.tinyos.net/ 1 Telosb / Tmote Sky Ø CC2420 radio compatible with IEEE 802.15.4 Ø 250kbps data rate Ø TI MSP430 microcontroller q 8MHz, 10kB RAM, 48k Flash Ø Integrated antenna q Range 50m (indoor), 125m (outdoor) Ø Integrated light, temperature, IR, humidity sensor 2 NesC Ø Network Embedded System C Ø Variation of C language Ø Static language q No function pointers and no dynamic memory allocation App.c Main.exe .nc nesC Compiler C Compiler TinyOS Programming, Philip Levis 3 TinyOS Installation Ø TinyOS 2.1.2 Installation q Linux, Window, OSX Ø Required Software q msp-430 tools • msp430-libc, binutils-msp430, gcc-msp430 q NesC: https://github.com/tinyos/nesc.git q TinyOS: https://github.com/tinyos/tinyos-main.git 4 Connect motes Ø Check your TinyOS installation q tos-check-env Ø Check which port a mote attached to q motelist Ø Give access permission q sudo chmod 666 /dev/<devicename> q sudo gpasswd -a username dialout 5 make System Ø TinyOS includes Makefiles to support the build process COMPONENT=MainAppC TINYOS_ROOT_DIR?=../..include $(TINYOS_ROOT_DIR)/Makefile.include Ø Compile an app without installing it on a mote: q make [platform] q Platform: telosb, micaz, mica2 Ø Install an app on a mote: q make [re]install.[node ID] [platform] Ø Remove compiled files: q Make clean 6 Build Stages make install.1 telosb .nc to .c and .c to binary Set node ID program mote 7 Sensor Network Architecture gateway Internet Sensors Base station 8 TinyOS Design Ø Component-based architecture q Components and interfaces Ø Task and event-based concurrency q Task: deferred computation q Events: preempt the execution of a task or another event.
    [Show full text]
  • Linux Kernel and Android Development Class Linux Kernel and Android Development Class
    Linux Kernel and Android Development Class Linux Kernel and Android Development Class Gr´egory Cl´ement,Michael Opdenacker, Maxime Ripard, S´ebastienJan, Thomas Petazzoni, Alexandre Belloni, Gr´egory Lemercier Free Electrons, Adeneo Embedded c Copyright 2004-2012, Free Electrons, Adeneo Embedded. Creative Commons BY-SA 3.0 license. Latest update: December 5, 2012. Document updates and sources: http://adeneo-embedded.com Corrections, suggestions, contributions and translations are welcome! Adeneo Embedded. Consulting, Engineering, Training and Support. http://www.adeneo-embedded.com/ 1/742 Rights to copy c Copyright 2004-2012, Free Electrons, Adeneo Embedded License: Creative Commons Attribution - Share Alike 3.0 http://creativecommons.org/licenses/by-sa/3.0/legalcode You are free: I to copy, distribute, display, and perform the work I to make derivative works I to make commercial use of the work Under the following conditions: I Attribution. You must give the original author credit. I 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. I For any reuse or distribution, you must make clear to others the license terms of this work. I 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. Adeneo Embedded. Consulting, Engineering, Training and Support. http://www.adeneo-embedded.com/ 2/742 Welcome! I Audience: embedded software students I Purpose of this course: development environment setup, drivers and kernel development, image building I Prerequisites: basic knowledge of Linux, good knowledge of C, basic knowledge of OS I Agenda Course 1 : Linux kernel - Principles and deployment on embedded platforms (2 hours) Course 2 : Android - Principles and architecture (2 hours) Course 3 : Linux - Driver development (2 hours) I Targeted hardware platform : PandaBoard ES Adeneo Embedded.
    [Show full text]
  • Neclab: the Network Embedded Control Lab ¡
    Nicholas Kottenstette, Panos J. Antsaklis, “neclab: The Network Embedded Control Lab,” Networked Embedded Sensing and Control, Proceedings of Workshop NESC’05: University of Notre Dame, USA, October 17-18, 2005, Panos Antsaklis and Paulo Tabuada (Eds.), Lecture Notes in Control and Information Sciences (LNCIS) 331, pp. 107-126, Springer 2006. neclab: The Network Embedded Control Lab Nicholas Kottenstette and Panos J. Antsaklis Department of Electrical Engineering University of Notre Dame Notre Dame, IN 46556 USA ¡ nkottens,antsaklis.1 ¢ @nd.edu Abstract — The network embedded control lab, neclab, is a software environment designed to allow easy deployment of networked embedded control systems, in par- ticular wireless networked embedded control systems (wnecs). A wnecs is a collec- tion of interconnected plant sensors, digital controllers, and plant actuators which communicate with each other over wireless channels. In this paper neclab is intro- duced and explained using a simple ball and beam control application. We focus on wnecs which use the MICA2 Motes. 1 Introduction Typically, when a controls engineer needs to develop a new closed-loop control sys- tem she develops the control system in phases. The first phase is to develop a math- ematical model of the system and synthesize a controller. The second phase is to simulate the control system using tools such as MATLAB [23]. In the third phase, using the results from the simulations, the engineer integrates sensors, actuators, re- mote data acquisition and control equipment into the system. This is done in order to acquire additional data and refine the models in order to optimize the controller. When the third phase is complete, the engineer has optimized and deployed a robust control system.
    [Show full text]
  • GNU Development Tools for Qoriq and Powerquicc Processors
    June, 2010 GNU Development Tools for QorIQ and PowerQUICC Processors FTF-NET-F0676 Phil Brownfield Software Product Manager, NMG TM Freescale, the Freescale logo and PowerQUICC are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. QorIQ is a trademark of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. The Power Architecture and Power.org word marks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. © 2010 Freescale Semiconductor, Inc. Objectives ►The GNU toolchain is a vital component in many of Freescale customers’ and partners’ development environments. ►In this session we will review recent changes affecting these free software tools for processors based on Power Architecture® technology • Enhancements supporting the new QorIQ processor family • Enhancements supporting multicore debug with GDB • Changes in related non-GNU software components ►We will also review Freescale’s process for GNU toolchain development Freescale, the Freescale logo and PowerQUICC are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. QorIQ is a trademark of Freescale Semiconductor, Inc. TM All other product or service names are the property of their respective owners. The Power Architecture and Power.org word marks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. © 2010 Freescale Semiconductor, Inc. 2 Agenda ►GNU overview ►Freescale, CodeSourcery and the Open Source community ►GNU component status for Power Architecture technology • GCC • Binutils • GLIBC, EGLIBC • Newlib • LIBSTDC++ • GDB Freescale, the Freescale logo and PowerQUICC are trademarks of Freescale Semiconductor, Inc., Reg.
    [Show full text]
  • Vysoke´Ucˇenítechnicke´V Brneˇ
    VYSOKE´ UCˇ ENI´ TECHNICKE´ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACˇ NI´CH TECHNOLOGII´ U´ STAV INFORMACˇ NI´CH SYSTE´ MU˚ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION SYSTEMS PLUGINS FOR GETTING INFORMATION ABOUT THE SYSTEM FOR BUSYBOX BAKALA´ Rˇ SKA´ PRA´ CE BACHELOR’S THESIS AUTOR PRA´ CE MAREK POLA´ Cˇ EK AUTHOR BRNO 2011 VYSOKE´ UCˇ ENI´ TECHNICKE´ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACˇ NI´CH TECHNOLOGII´ U´ STAV INFORMACˇ NI´CH SYSTE´ MU˚ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION SYSTEMS PLUGINY PRO ZI´SKA´VA´ NI´ INFORMACI´ O SYSTE´ MU PRO PROJEKT BUSYBOX PLUGINS FOR GETTING INFORMATION ABOUT THE SYSTEM FOR BUSYBOX BAKALA´ Rˇ SKA´ PRA´ CE BACHELOR’S THESIS AUTOR PRA´ CE MAREK POLA´ Cˇ EK AUTHOR VEDOUCI´ PRA´ CE Doc. Ing. TOMA´ Sˇ VOJNAR, Ph.D. SUPERVISOR BRNO 2011 Abstrakt Tato práce se zabývá implementací nástrojù pro získávání informací o operačním systému pro projekt Busybox. Diskutovány jsou souborové systémy sysfs a procfs v operačním systému Linux. Dále se práce zabývá tím, jak vytváøet co nejmenší programy v jazyce C. Také se věnuje struktuøe programù iostat, mpstat a powertop. V rámci práce byly vytvoøeny minimalistické implementace již existujících nástrojù, zejména z balíku sysstat, který obsahuje například utility iostat a mpstat. Abstract In this thesis, we discuss implementation of tools for getting information from the system. We examine file systems sysfs and procfs in the Linux operating system. Furthermore, we discourse how to write small programs in the C language. Eventually, we take a look at implementation of tools like iostat, mpstat and powertop.
    [Show full text]