簡易檢索 / 詳目顯示

研究生: 陳凡靈
Chen, Fan-Ling
論文名稱: 藉由函數呼叫協定抽象層支援異質編譯器以實現非公開通訊協定層之開發
Enabling Compiler Independence for Embedded Systems with Proprietary Stacks by Calling-Convention Abstraction Layer
指導教授: 周百祥
Chou, Pai H.
口試委員: 蔡明哲
陳耀宗
周百祥
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Computer Science
論文出版年: 2014
畢業學年度: 102
語文別: 英文
論文頁數: 30
中文關鍵詞: 通訊協定層函數呼叫協定異質編譯器
外文關鍵詞: protocol stack, calling convention, compiler independence
相關次數: 點閱:2下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 與無線電收發器整合的微處理器通常需要通訊協定層的支援以與通訊標準相容。很多製造業者在販售系統晶片(SoC)時會提供免版權費的通訊協定層,以軟體加值其硬體價值。此通訊協定層在編譯後以映像檔的格式釋出,使用者在其上能有效率的進行開發;此通訊協定層的程式碼可以受到保護,成為公司的智慧財產並且與競爭同業有所區隔。但是,建構於此映像檔之上的任何應用都將會被限制於使用相同的編譯器。即便是處在同一個指令集的環境下,開發者仍然沒有選擇編譯器的空間。我們預期這將會阻礙系統晶片的推廣。限制了使用異質編譯器的原因眾多,包含函數呼叫協定,目標檔(object file)的格式,以及各擴充架構的執行時期支援程序都可能有所差異。為了解決這些問題,我們在本篇論文中提出了函數呼叫協定抽象層。此抽象層建立在原有的韌體架構之上,並佐以一結合編譯時期和執行時期的方法論用來處理各編譯器函數呼叫協定的不同點。通過發行一由特定編譯器所編譯之映像檔和與其配合的模擬函數,開發者將不再受限於單一的開發環境,而有自由選擇其開發環境的權力,同時得以借用通訊協定層所帶來的好處。


    Microcontroller units (MCU) with integrated communication transceivers usually require protocol stack support to be compliant with standards. Many manufacturers provide royalty-free stacks in the form binary images linkable by specific compilers as an effective way to support developers while protecting the stack code as intellectual property from being used in competitors’ products. Unfortunately, the use of designated compilers prevents the developers from choosing their own compilers, even if the same instruction-set architecture. What prevents the mixing of compilers include differences in the calling convention across compilers, format of the object files, and runtime support for various architecture extensions. To address these problems, we propose a calling convention abstraction layer (CCAL) into the existing firmware architecture and a methodology for resolving the calling conventions using a mix of compile-time and run-time techniques. By distributing an image built with the designated compiler and the proper stub code, we enable developers to be completely independent of the designated compiler and to use their own compiler exclusively to develop their own user code to take advantage of the proprietary protocol stack.

    Abstract i Contents i Acknowledgments v 1 Introduction 1 1.1 Motivation........................................ 1 1.1.1 BLE Stack Support............................... 1 1.1.2 Compiler Dependency due to Stack Protection........................................ 2 1.2 Problem Statement and Technical Approach...................... 3 2 Related Work 5 2.1 Remote Procedure Call Server ............................. 5 2.2 Calling conventions................................... 6 3 System Overview 7 3.1 TI OSAL ........................................ 7 3.2 BLE protocol stack ................................... 8 3.3 CCAL.......................................... 10 3.3.1 System Image.................................. 10 3.3.2 User Image................................... 11 3.3.3 System flow................................... 13 4 Implementation 14 4.1 Issues .......................................... 14 4.2 Banking code...................................... 15 4.3 Interfacing code..................................... 18 4.4 System startup and termination............................. 20 5 Evaluation 23 5.1 Experimental setup ................................... 23 5.1.1 Compiler and linkersuite............................ 23 5.1.2 BLE stack.................................... 24 5.1.3 Hardware.................................... 24 5.2 Upcall.......................................... 25 5.3 Downcall ........................................ 25 5.4 Configuration...................................... 26 6 Conclusions and Future Work 28 6.1 Conclusions....................................... 28 6.2 Future Work....................................... 28

    [1] 2.4-GHz Bluetooth low energy System-on-Chip. http://www.ti.com/lit/ds/symlink/ cc2540.pdf.
    [2] BLE Developer’s Guide for Over-the-Air Download for CC254x. http://processors.wiki. ti.com/images/8/82/OAD_for_CC254x.pdf.
    [3] Bluetooth Low Energy. http://www.bluetooth.com/Pages/low-energy.aspx.
    [4] CC253x/4x User’s Guide (Rev. F). http://www.ti.com/lit/ug/swru191f/swru191f.pdf.
    [5] IAR C/C++ Compiler User Guide for the 8051 Microcontroller Architecture. ftp://ftp.iar. se/WWWfiles/8051/webic/doc/EW8051_CompilerReference.pdf.
    [6] IAR Embedded Workbench 8051 User guides. http://www.iar.com/en/Products/ IAR-Embedded-Workbench/8051/User-guides/.
    [7] OSAL API Guide. http://ppt.cc/2mgX.
    [8] Small Device C Compiler. http://sdcc.sourceforge.net/.
    [9] SmartRF Flash Programmer User Manual. http://www.ti.com/lit/ug/swru069g/swru069g.pdf.
    [10] STMICROELECTRONICS. MEMS motion sensor: Ultra low power high performance 3- axis digital accelerometer. http://www.st.com/st-web-ui/static/active/en/resource/ technical/document/datasheet/CD00213470.pdf.
    [11] Texas Instruments CC2540 Bluetooth Low Energy API Guide. C:\Texas Instruments\BLE- CC254X-1.3.2\Documents\BLE_API_Guide_main.htm.
    [12] BAILEY, M. W., AND DAVIDSON, J. W. A formal model and specification language for pro- cedure calling conventions. Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages (1995), 298–310.
    [13] DAVIDSON, J. W., AND WHALLEY, D. B. Methods for saving and restoring register values across function calls. Software: Practice and Experience 21, 2 (1991), 149–165.

    無法下載圖示 全文公開日期 本全文未授權公開 (校內網路)
    全文公開日期 本全文未授權公開 (校外網路)

    QR CODE