Transcription of CAN E AUTOSAR - Chalmers Publication Library (CPL)
1 XCP OVER CAN AND ETHERNET ON AUTOSAR . Calibration and Measurement Protocol Master of Science Thesis in Computer Science and Automation and Mekatronics Joakim Plate Peter Fridlund Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering G teborg, Sweden, April 2011. The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law.
2 The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work electronically and make it accessible on the Internet. XCP over CAN and Ethernet on AUTOSAR . Calibration and Measurement Protocol J. Plate, P. Fridlund, Joakim Plate, April 2011.
3 Peter Fridlund, April 2011. Examiner: Rolf Snedsb l Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering SE-412 96 G teborg Sweden Telephone + 46 (0)31-772 1000. Cover: The McLaren Formula One team monitoring the car's embedded systems before the start of the race. Department of Computer Science and Engineering G teborg, Sweden April 2011. Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering G teborg, Sweden, April 2011. Abstract New vehicles contain more and more electronic aides and control systems. As the number of functions increase, the complexity of the system increases at an even greater pace.
4 AUTOSAR is an initiative that aims to bring order to embedded electrical systems in vehicles. The ever larger software systems naturally generate ever larger amounts of data needing to be taken care of, analysed and checked for correctness during the development of the system itself. XCP is a network protocol that is mainly used for transferring measurement data and calibration parameters during the development process in the automotive industry. In order to utilize the complete capacity of the existing in-vehicle network, the protocol has been designed to be independent of the transport layer. The aim of this thesis is to implement a subset of XCP for execution on a rapid prototyping platform developed by QRtech, a high-tech consulting company in Kalleb ck, Gothenburg.
5 In order to be compatible with the latest technology and methodology XCP has been implemented according to the requirements specified by AUTOSAR . In the current implementation, all the mandatory requirements are met, have been verified and comply with the AUTOSAR standard. Even before completion, the project roused interest in parts of the local automotive industry. Keywords: XCP, AUTOSAR , CAN Network, Ethernet, Measurement and Calibration, DAQ-list, QR5567. i Sammanfattning Nya fordon inneh ller allt mer elektroniska hj lpmedel och styrsystem. I takt med att funktionerna blir fler och fler kar komplexiteten hos systemet lavinartat.
6 AUTOSAR r ett initiativ f r att f rs ka skapa ordning inom de inbyggda fordonselektriska systemen. Genom att skapa standardiserade gr nsytor mellan alla de funktionella applikationsdelarna och de h rdvarun ra delarna r tanken att systemet ska vara skalbart och d rmed undviks problemet med sambandet mellan komplexitet och storlek. De allt st rre mjukvarusystemen generar naturligtvis ocks mer och mer datatrafik som m ste kunna l sas och vervakas under framtagningen av systemet. XCP r ett n tverksprotokoll som i huvudsak anv nds f r att verf ra m tdata och kalibreringsparametrar vid utvecklingsarbete inom bilindustrin.
7 F r att p ett enkelt och smidigt s tt kunna utnyttja hela bilens existerande inbyggda n tverkskapacitet r protokollet designat f r att vara oberoende av vilket transportmedia som anv nds. M let f r examensarbetet r att implementera utvalda delar av XCP protokollet f r exekvering p en prototyputvecklingsplattform framtagen av QRtech, ett teknikkonsultf retag i Kalleb ck i G teborg. F r att var kompatibelt med de senaste teknikerna och metodikerna s har XCP implementerats enligt de krav som AUTOSAR specificerar. Som implementationen ser ut idag r samtliga XCP och AUTOSAR specifika krav uppfyllda, och verifierade.
8 Ven f re fullbordandet visades visst intresse fr n lokala akt rer inom bilindustrin. iii iv Preface We would like to thank the following people for aiding us during this thesis project: Rolf Snedsb l our examiner who has provided us with a lot of suggestions and corrections of this report. Olof Bergqvist for his tutoring, for taking care of a sizeable amount of red-tape duties in connection to our thesis. Johan Ekberg for help with the Arctic Core AUTOSAR platform. Bj rn Siby and Alborz Sedaghat for helping us with the initial steps of the project and lending us their thesis to use as reference. Erik Larsson for input on the functionality of the QR5567.
9 The unnamed lady who every morning brought us breakfast at the office. Finally we would like to thank all the fine men and women at QRtech for their moral support and for making us feel welcome and at home at QRtech. v vi Table of Contents 1 Background .. 1. Previous work .. 1. Purpose .. 1. Significance .. 2. 2 Scope .. 3. Limitation of Transport Protocols .. 3. Optional XCP features .. 3. 3 AUTOSAR platform .. 5. Layered infrastructure .. 5. Basic Software Layer .. 5. Runtime Environment .. 9. Application Layer .. 9. Open Standard Cross car 10. Standardized API for application 11. Drawbacks with AUTOSAR .
10 12. 4 XCP - Calibration & Measurement Protocol .. 13. Mode of operation .. 13. Transport Layer (Ethernet, CAN, USB) .. 14. Ethernet .. 14. CAN .. 14. USB .. 16. Online Calibration .. 16. DAQ Lists Data Acquisition Lists .. 17. DAQ-list 18. STIM Lists Data Stimulation Lists .. 19. Processing Event Channel .. 20. Bypassing .. 20. Flashing / Firmware upload .. 20. Security Seed & 21. 5 Development Environment .. 23. Arctic Core .. 23. Arctic 23. MinGW .. 24. Vector 24. QR5567 .. 27. Vector CANcaseXL .. 28. 6 Development Process .. 29. Basic Protocol Infrastructure .. 29. Development of testing tools .. 30. 7 Result.