Documentation and Implementation of Interfaces for an Embedded Platform

Documentation and Implementation of Interfaces for an Embedded Platform

Faculty of Health, Science and Technology Department of Mathematics and Computer Science Kristoffer Haglund Jia Qiu Documentation and implementation of interfaces for an embedded platform Degree Project of 15 credit points Computer Science Date/Term: 130605 Supervisor: Martin Blom Examiner: Donald F. Ross Serial Number: C2013:13 Karlstads universitet 651 88 Karlstad Tfn 054-700 10 00 Fax 054-700 14 60 [email protected] www.kau.se Documentation and implementation of interfaces for an embedded platform Kristoffer Haglund, Jia Qiu c 2013 Kristoffer Haglund, Jia Qiu and Karlstad University This thesis is submitted in partial fulfillment of the requirements for the Bachelor's degree in Computer Science. All material in this thesis which is not my own work has been identified and no material is included for which a degree has previously been conferred. Kristoffer Haglund, Jia Qiu Approved, 130605 Opponents: Ida Lundin, Jenny Agren˚ Advisor: Martin Blom Examiner: Donald F. Ross iii Abstract Using a new platform[54] can be challenging, especially with relatively newly released plat- form and developer equipment. Difficulties and problems can arise during development from both hardware and software, some problems can be solved but sometimes help must be requested from the developers of the products. The consulting firm Altran in Karlstad has been dealing with this and has developed em- bedded software used in industrial welders for cars. There have been some uncertainty during their work, which has given birth to this project. The purpose of this project was to reconstruct and document Altran's initial development process, to make the process faster and easier for new developers. Besides the reconstruction, a discovery of unused features and components also became an important part of this project. The project has resulted in a documentation of various interfaces, an clock in system appli- cation called "Personnel Interactive Display and Educator", and a safe update application for the system. v Kristoffer and Jia would like to thank everyone involved in this project. Specially Martin Blom (advisor) and Donald F. Ross (examiner) at Karlstad University, Johan Lundin, Mattias Lindahl, Frank Grundin and all the employees at Altran Karlstad for your support. vii Contents 1 Introduction 1 2 Background 3 2.1 Author background . .3 2.2 Company background . .4 2.3 The existing system . .5 2.4 Requirements . .6 3 Tools 7 3.1 Hardware . .7 3.1.1 Motherboard and processor . .7 3.1.2 Carrier board . .8 3.1.3 Touchscreen . 10 3.1.4 RFID Reader . 12 3.2 Software . 13 3.2.1 Visual Studio 2008 . 13 3.2.2 Windows Embedded Compact 7 . 14 3.2.3 Microsoft Expression Blend 3 . 14 3.2.4 Windows Embedded Silverlight Tools . 15 3.2.5 Virtual PC . 15 ix 3.2.6 Freescale CFImager (partitioning software) . 15 3.2.7 Server . 16 3.3 Summary . 18 4 Documentation of interfaces 19 4.1 Approach techniques to test interfaces . 20 4.2 Interfaces . 21 4.2.1 USB . 21 4.2.2 Audio . 23 4.2.3 Bluetooth . 24 4.2.4 GPIO . 24 4.3 The assembly . 24 4.4 Summary . 25 5 Clock in system 27 5.1 Design . 27 5.1.1 Operating system . 27 5.1.2 Introducing the clock in system PIDE . 28 5.1.3 Fusion of programming languages (Native / Managed) . 30 5.2 Implementation of clock in system . 33 5.2.1 Model . 33 5.2.2 GUI . 36 5.2.3 RFID . 37 5.2.4 Temperature and stock exchange . 38 5.3 Problems . 39 5.3.1 OS - Installation . 39 5.3.2 OS - Update and installation service . 39 5.3.3 OS - Graphic acceleration . 40 x 5.3.4 OS - Changing platform for existing project . 40 5.3.5 OS - RFID . 41 5.4 Results . 41 5.4.1 The generic OS design . 42 5.4.2 Clock in system . 42 5.5 Summary . 46 6 Safe update 49 6.1 Design . 49 6.2 Implementation . 51 6.2.1 Partition modification . 51 6.2.2 Boot loader modification . 53 6.2.3 Automation . 54 6.3 Problems . 55 6.3.1 Sectors and offsets . 55 6.4 Results . 55 6.5 Summary . 56 7 Evaluation and conclusions 57 7.1 Reflections on requirements . 57 7.2 Alternative solutions . 58 7.3 Future of the platform . 58 7.4 Lessons learned . 59 7.5 Authors opinion . 59 References 61 Appendices 67 xi A Definitions, acronyms and abbreviations 69 xii List of Figures 3.1 A picture of the Quadmo747-X/i.MX51 . .8 3.2 Carrier board. .9 3.3 Carrier board and its connectors. 10 3.4 Datavision display. 11 3.5 Datavision display connectors. 11 3.6 Phidgets RFID circuit board. 12 3.7 Illustration of how the partition structure of the SD after adding nk and eboot with CFImager. 16 4.1 A list of USB driver showed in Catalog Items View . 22 4.2 USB ports on the carrier board . 23 5.1 Illustration of the first prototype of PIDE (Personnel Interactive Display and Educator) . 28 5.2 Illustration of how the C++ source code compiles straight to native machine code for a specific architecture. 31 5.3 Illustration of how the managed C# and C++ source code compiles to native machine code on top of the .NET framework. 32 xiii 5.4 Illustration of how the managed code compiles to native machine code on top of the .NET framework. Native code is accessible from the DLL, this link is illustrated with an arrow between the machine codes. The Marshalling[62] step between the managed code and native code is needed to transform and exchange data objects from one side to another. 33 5.5 Class diagram of the logic part of PIDE. 35 5.6 Model of steps from Blend GUI to Native DLL. 36 5.7 Model of native and managed applications . 36 5.8 Stripped UML diagram. 37 5.9 Profile image scroller in PIDE with arrows to navigate between profiles. 43 5.10 Navigate to profile with profile scroller, the profile contains information relevant to the specific user such as meetings . 44 5.11 Navigate to profile with RFID tag, the profile contains options to update the checked in profile’s information . 45 5.12 Time, temperature and stock exchange GUI objects updated with informa- tion from the Internet. 46 6.1 Partition allocation with the new OS added after the old OS. 50 6.2 Illustration of the design for safe updating. 50 6.3 Highlighting of the first 5 unique bytes of the operating system file of 96 MB. 52 6.4 After opening the SD-card in the hex editor in raw-format, it was possible to search for the unique bytes and locate the first OS at sector 1280 (0x500) and offset 655360 (0xA0000). This was the default position in the CFImager. 52 6.5 Another search lead to the position of the second OS at sector 197886 (0x304FE) and offset 101317632 (0x609FC00) which was the position spec- ified in the modified version of CFImager. 53 6.6 The constants for the boot loader. 54 6.7 Constants' values after calculation. 54 xiv Chapter 1 Introduction Forbes[48] released an analysis in 2012 about the "10 Critical Tech Trends For The Next Five Years", two of these trends involved embedded systems. Forbes described embedded systems as a concept of intelligent, cheap, small, always powered on, network connected devices with location awareness. In addition to personal computer (PC) hardware, input from sensors, image recognition, augmented reality and near field communication added new potentials and benefits. Embedded systems were the target market when Microsoft in March 2011 released the new platform Windows Embedded Compact 7 (WEC7)[69] with support for the x86[70] and ARM[2] architectures. Altran was asked by a customer to adapt this new platform and to create a Graphical User Interface (GUI) software for an industrial welder. The project was successful but with the drawback that the project took more time than expected and lacked certain func- tionality. 1 2 CHAPTER 1. INTRODUCTION In order to make the process easier and to decrease the development time for similar projects, this thesis project was conceived with the purpose of describing the interfaces with guides and code samples. For this purpose a demonstration application of an clock in system was created called "Personnel Interactive Display and Educator" (PIDE), to discover and use multiple interfaces for the documentation. An additional application for safe update was also designed and implemented in the system. Please note that all acronyms can be found in section Definitions, acronyms and abbrevi- ations in the Appendix. Chapter 2 Background This chapter presents the background to the project. The first part of this chapter briefly describes information about the authors. Then.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    87 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us