Apps for Industrial Devices som understøttes af HVM'en. Alternativer, så som Python, LUA, Java af Stephan Erbs Korsholm, ViaUC

492 views

Published on

Oplægget blev holdt ved et seminar i InfinIT-interessegruppen Højniveausprog til indlejrede systemer. Læs mere om interessegruppen her: http://infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/hoejniveau_sprog_til_indlejrede_systemer.htm

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
492
On SlideShare
0
From Embeds
0
Number of Embeds
141
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Apps for Industrial Devices som understøttes af HVM'en. Alternativer, så som Python, LUA, Java af Stephan Erbs Korsholm, ViaUC

  1. 1. Apps for Industrial Devices Stephan Korsholm VIA (research & education) Icelab (HVM – Hardware near Virtual Machine) http://icelab.dk
  2. 2. Background Wireless DECT module Sensors AT commands Actuators Control Generic Firmware
  3. 3. Background Wireless Wifi module Sensors TCP/IP Actuators Control Generic Firmware
  4. 4. Background Pump Modbus Control Generic Firmware
  5. 5. Background Control Generic Firmware Generic functionality Usually written in C 100->1000 kB Flashed during production Closed source Application specific functionality 1->10 kB Programmed in the field Programmed by the 'user'
  6. 6. Apps for Industrial Devices Control Generic Firmware
  7. 7. Apps for Industrial Devices Control Generic Firmware
  8. 8. Apps for Industrial Devices Control Generic Firmware
  9. 9. Apps for Industrial Devices Control Generic Firmware Application specific functionality 1->10 kB Programmed in the field Programmed by the 'user' Downloaded to the device Executed on the device micro-controller, along side the generic firmware
  10. 10. Apps for Industrial Devices App1 App2 Virtual Machine Generic Firmware ● Execution properties – Sandboxed, non disruptive – Timeslice, thread, task, ...
  11. 11. Apps for Industrial Devices ● Advantages – – ● External hardware (PLC/iPC) can in some cases be avoided Simplicity? Is programming a small app in Eclipse easier/harder than setting up a PLC or learning AT commands? Disadvantages – Worry: Is the sandbox tight? – 'Select is broken' – Are ressources available on existing hardware in terms of RAM/ROM and CPU time? App1 App2 Virtual Machine Generic Firmware
  12. 12. Apps for Industrial Devices ● Advantages/disadvantages – Apps for industrial devices is a complementary technology to existing solutions – May be useful in some contexts App1 App2 Virtual Machine Generic Firmware
  13. 13. Apps for Industrial Devices ● Enabling technologies – Scripting languages, e.g. Python/Javascript – Interpreted languages, e.g. Java/C#/Lua – App1 App2 Virtual Machine Generic Firmware
  14. 14. Apps for Industrial Devices ● Python, – CPython, – – – For Linux based environments Full Python support PyMite – – – – 8 bit micro controllers Minimal 64 kB of program memory (flash) and 4 kB of RAM Subset of Python No Python libraries App1 App2 Virtual Machine Generic Firmware
  15. 15. Apps for Industrial Devices ● LUA, App1 – C interpreter – Approx 180 kB flash required – Mininal RAM resources? – Full Eclipse integration, large community – Virtual Machine Sandboxing supported – App2 POSIX based, Generic Firmware #include <assert.h>, <ctype.h>, <dlfcn.h>, <errno.h>, <float.h>, <io.h>, <limits.h>, <locale.h>, <math.h>, <setjmp.h>, <signal.h>, <stdarg.h>, <stddef.h>, <stdio.h>, <stdlib.h>, <string.h>, <sys/wait.h>, <time.h>, <unistd.h>
  16. 16. Apps for Industrial Devices ● HVM, App1 App2 Virtual Machine – Java interpreter. Full Java support – Sandboxing supported – Approx 30 kB flash required – 512 bytes minimal RAM – Full Eclipse integration (including debugging) – Barebone, no includes gcc -nostdlib *.c Generic Firmware
  17. 17. Apps for Industrial Devices HVM Demonstration.....
  18. 18. Apps for Industrial Devices ● Other issues, – Verification in the cloud (AAU, UPAAL), ● – Lua, Python, Java, ….

×