The concept of translating source code into other target programming languages is extensively used in a wide area of applications. Danfoss Power Solutions AB, a company located in Älmhult, strives to streamline their way of software development for microcontrollers by implementing this idea. Their proprietary software tool PLUS+1 GUIDE is based on the CAN bus communication network, which allows electronic control units to share data represented in the XML format. Due to compatibility problems, the application in the electronic control units requires this data to be translated into the source code in the low-level C programming language. This thesis project proposes an approach for facilitating this task by implementing a source-to-source compiler that performs the translation with a reduced level of manual user involvement. A literature review was conducted in order to find the existing solutions relevant to our project task. An analysis of the provided XML input files was thereafter performed to clarify a software design suitable for the problem. By using a general XML parser, a solution was then constructed. The implementation resulted in a fully functional source-to-source compiler, producing the generated C code within a time range of 73–85 milliseconds for the input test files of typical size. The feedback received from the domain experts at Danfoss confirms the usability of the proposed solution.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:lnu-96424 |
Date | January 2020 |
Creators | Andersson, Gustav |
Publisher | Linnéuniversitetet, Institutionen för datavetenskap och medieteknik (DM) |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0024 seconds