[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article

Leveraging real-time and multitasking Ada capabilities to small microcontrollers

Published: 01 March 2019 Publication History

Abstract

Small embedded microcontrollers typically operate for years without further programmer intervention, so that shipping software free of errors becomes paramount. The Ada programming language includes many safety characteristics (e.g., strong typing or contract-based programming) that help to largely reduce the number of errors introduced by programmers. However, Ada is barely used in microcontrollers with tight memory constraints due to the overhead introduced at run-time. The tasking semantics included in the language represent one major source of this overhead.
In this paper we present a new Ada run-time environment that includes a new scheduling policy based on the one-shot task model that simplifies the implementation of the Ada tasking primitives and allows stack sharing techniques to be applied. Consequently, the proposed approach allows using the inherent safety characteristics of the Ada language along with a set of tasking constructs more suitable for small memory devices. Despite its simplicity, the tasking primitives have an equivalent, if not superior, expressiveness to the typical tasking constructs provided by the operating systems targeted to small microcontrollers.
An implementation based on a small kernel, a modified run-time system and an automatic code transformation tool have been developed in the context of this work. Initial tests provide promising results, showing the tasking constructs are functionally correct and the proposed run-time features a small memory footprint.

References

[1]
Embedded Markets Study Integrating IoT and Advanced Technology Designs, Application Development & Processing Environments. Produced by EETimes and Embedded.com, Technical Report, 2017. URL https://m.eet.com/media/1246048/2017-embedded-market-study.pdf.
[2]
W. Freeman, 11 Myths About 8-Bit Microcontrollers, Technical Report, 2016.
[3]
T. Anh, S. Tan, Real-Time operating systems for small microcontrollers, IEEE Micro. 29 (5) (2009) 30–45,.
[4]
S. Tan, T. Anh, Real-time operating system (RTOS) for small (16-bit) microcontroller, 13th IEEE International Symposium on Consumer Electronics, 2009, pp. 1007–1011,.
[5]
Ada Reference Manual, ISO/IEC 8652:2012(E) with COR.1:2016, 2016. https://doi.org/10.1007/978-3-642-45419-6.
[6]
J. Barnes, Programming in Ada 2012, Cambridge University Press, 2014,.
[7]
H. Shen, T.P. Baker, A linux kernel module implementation of restricted Ada tasking, Ada Lett. XIX (2) (1999) 96–103,.
[8]
M. Aldea Rivas, M. González Harbour, MaRTE OS: an Ada kernel for real-time embedded applications, Craeynest D., Strohmeier A. (eds) Reliable Software Technologies. Ada-Europe 2001. Lecture Notes in Computer Science 2043 (2001) 305–316,.
[9]
R. Ebert, AVR-ADA: Ada cross compiler and libraries for AVR μCs, URL https://sourceforge.net/p/avr-ada/.
[10]
J.F. Ruiz, GNAT PRO for On-board Mission-Critical Space Applications, Vardanega T., Wellings A. (eds) Reliable Software Technology. Ada-Europe 2005. Lecture Notes in Computer Science 3555 (17360) (2005) 248–259,.
[11]
R. Davis, N. Merriam, N. Tracey, How embedded applications using an RTOS can stay within on-chip memory limits, Work-in-Progress Session of the Euromicro Conference on Real-Time Systems, 2000.
[12]
L. Sha, R. Rajkumar, J.P. Lehoczky, Priority inheritance protocols: an approach to real-time synchronization, IEEE Trans. Comput. 39 (9) (1990) 1175–1185,.
[13]
T. Baker, A stack-based resource allocation policy for realtime processes, Proceedings 11th Real-Time Systems Symposium, IEEE, 1990, pp. 191–200,.
[14]
ISO 17356-3:2005, Road vehicles - Open Interface for Embedded Automotive Applications - Part 3: OSEK/VDX Operating System (OS)., 2015,
[15]
AI12-0279-1, Nonpreemptive Dispatching Needs More Dispatching Points, 2019, URL http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0279-1.txt.
[16]
J. Miranda, A Detailed Description of the GNU Ada Run-Time, 2002, URL http://www.iuma.ulpgc.es/users/jmiranda.
[17]
Ada Semantic Interface Specification (ASIS), ISO/IEC 15291:1999, 2013, URL https://www.iso.org/standard/27169.html.
[18]
K.N. Gregertsen, A. Skavhaug, An efficient and deterministic multi-tasking run-time environment for Ada and the Ravenscar profile on the Atmel AVR32 UC3 microcontroller, 2009 Design, Automation Test in Europe Conference Exhibition, 2009, pp. 1572–1575,.
[19]
P. Buonocunto, A. Biondi, M. Pagani, M. Marinoni, G.C. Buttazzo, ARTE: arduino real-time extension for programming multitasking applications, ACM Symposium on Applied Computing (SAC), 2016,.
[20]
P. Gai, E. Bini, G. Lipari, M.D. Natale, L. Abeni, Architecture for a portable open source real time kernel environment, In Proceedings of the Second Real-Time Linux Workshop and Hand’s on Real-Time Linux Tutorial, 2000.
[21]
P. Rego, Integrating 8-bit AVR micro-controllers in Ada, Ada User J. 33 (4) (2012) 301–306.
[22]
J.S. Andersen, Programming Arduinos in Ada, Free and Open Source Software Developers’ European Meeting (FOSDEM), 2012.
[23]
P. André de Matos, Implementation of task types in AVR-Ada., Ada User J. 35 (3) (2014) 194–203.
[24]
L. George, N. Rivierre, M. Spuri, Preemptive and non-preemptive real-time uni-processor scheduling, Technical Report 2966, Institut National de Recherche et Informatique et en Automatique (INRIA), France (1996).
[25]
R.I. Davis, A. Burns, R.J. Bril, J.J. Lukkien, Controller area network (CAN) schedulability analysis: refuted, revisited and revised, Real-Time Syst. 35 (3) (2007) 239–272,.
[26]
AUTOSAR CP Release 4.3.1 - Specification of Operating System, 2017, URL www.autosar.org.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Journal of Systems Architecture: the EUROMICRO Journal
Journal of Systems Architecture: the EUROMICRO Journal  Volume 94, Issue C
Mar 2019
60 pages

Publisher

Elsevier North-Holland, Inc.

United States

Publication History

Published: 01 March 2019

Author Tags

  1. Real-time
  2. Operating systems
  3. Embedded systems
  4. Microcontrollers

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media