Microej Documentation
Total Page:16
File Type:pdf, Size:1020Kb
MicroEJ Documentation MicroEJ Corp. Revision ff3ccfde Nov 27, 2020 Copyright 2008-2020, MicroEJ Corp. Content in this space is free for read and redistribute. Except if otherwise stated, modification is subject to MicroEJ Corp prior approval. MicroEJ is a trademark of MicroEJ Corp. All other trademarks and copyrights are the property of their respective owners. CONTENTS 1 MicroEJ Glossary 2 2 Overview 4 2.1 MicroEJ Editions.............................................4 2.1.1 Introduction..........................................4 2.1.2 Determine the MicroEJ Studio/SDK Version..........................5 2.2 Licenses.................................................7 2.2.1 Overview............................................7 2.2.2 License Manager........................................7 2.2.3 Evaluation Licenses......................................7 2.2.4 Production Licenses......................................9 2.3 MicroEJ Runtime............................................. 13 2.3.1 Language............................................ 13 2.3.2 Scheduler............................................ 13 2.3.3 Garbage Collector....................................... 14 2.3.4 Foundation Libraries...................................... 14 2.4 MicroEJ Libraries............................................ 14 2.5 MicroEJ Central Repository....................................... 15 2.6 Embedded Specification Requests................................... 15 2.7 MicroEJ Firmware............................................ 15 2.7.1 Bootable Binary with Core Services.............................. 15 2.7.2 Specification.......................................... 16 2.8 Introducing MicroEJ SDK........................................ 16 2.9 Introducing MicroEJ Studio and Virtual Devices............................ 17 2.10 Perform Online Getting Started..................................... 18 2.11 GitHub Repositories........................................... 19 2.12 System Requirements.......................................... 24 3 Application Developer Guide 25 3.1 Introduction............................................... 25 3.2 Local Workspaces and Repositories................................... 25 3.3 Standalone Application......................................... 26 3.3.1 Download and Install a MicroEJ Platform........................... 26 3.3.2 Build and Run an Application................................. 28 3.3.3 Build Output Files....................................... 33 3.3.4 MicroEJ Launch......................................... 34 3.3.5 Application Options...................................... 38 3.3.6 SOAR.............................................. 65 3.4 Sandboxed Application......................................... 66 3.4.1 Sandboxed Application Structure............................... 66 i 3.4.2 Application Publication.................................... 67 3.4.3 Shared Interfaces........................................ 67 3.5 Virtual Device.............................................. 71 3.5.1 Using a Virtual Device for Simulation............................. 71 3.5.2 Runtime Environment..................................... 71 3.6 MicroEJ Module Manager........................................ 72 3.6.1 Introduction.......................................... 72 3.6.2 Specification.......................................... 73 3.6.3 Module Project Skeleton.................................... 73 3.6.4 Module Description File.................................... 74 3.6.5 MicroEJ Module Manager Configuration........................... 74 3.6.6 Build Kit............................................. 78 3.6.7 Former MicroEJ SDK Versions................................. 78 3.7 Module Natures............................................. 80 3.7.1 Module Repository....................................... 80 3.8 MicroEJ Classpath............................................ 84 3.8.1 Application Classpath..................................... 84 3.8.2 Classpath Load Model..................................... 85 3.8.3 Classpath Elements...................................... 86 3.9 Application Resources.......................................... 89 3.9.1 Images............................................. 89 3.9.2 Fonts.............................................. 94 3.9.3 Native Language Support................................... 95 3.10 Development Tools........................................... 96 3.10.1 Testsuite with JUnit...................................... 97 3.10.2 Font Designer.......................................... 101 3.10.3 Stack Trace Reader....................................... 109 3.10.4 Code Coverage Analyzer.................................... 116 3.10.5 Heap Dumper & Heap Analyzer................................ 119 3.10.6 ELF to Map File Generator................................... 130 3.10.7 Serial to Socket Transmitter.................................. 132 3.10.8 Memory Map Analyzer..................................... 133 3.10.9 Event Tracing.......................................... 136 3.11 Advanced Tools............................................. 138 3.11.1 MicroEJ Linker......................................... 138 3.11.2 Testsuite Engine........................................ 151 4 Platform Developer Guide 155 4.1 Introduction............................................... 155 4.1.1 Scope.............................................. 155 4.1.2 Intended Audience....................................... 155 4.1.3 MicroEJ Architecture Modules Overview........................... 155 4.2 MicroEJ Platform............................................ 157 4.2.1 Process Overview........................................ 157 4.2.2 Concepts............................................ 158 4.2.3 MicroEJ Platform Creation................................... 163 4.2.4 Platform Qualification..................................... 173 4.3 MicroEJ Core Engine........................................... 174 4.3.1 Functional Description..................................... 174 4.3.2 Architecture........................................... 175 4.3.3 Capabilities........................................... 176 4.3.4 Implementation........................................ 176 4.3.5 Generic Output......................................... 179 4.3.6 Link............................................... 179 ii 4.3.7 Dependencies......................................... 180 4.3.8 Installation........................................... 180 4.3.9 Use............................................... 180 4.4 Multi-Sandbox.............................................. 181 4.4.1 Principle............................................ 181 4.4.2 Functional Description..................................... 181 4.4.3 Firmware Linker........................................ 182 4.4.4 Memory Considerations.................................... 182 4.4.5 Dependencies......................................... 182 4.4.6 Installation........................................... 182 4.4.7 Use............................................... 182 4.5 Tiny application............................................. 183 4.5.1 Principle............................................ 183 4.5.2 Installation........................................... 183 4.5.3 Limitations........................................... 183 4.6 Native Interface Mechanisms...................................... 183 4.6.1 Simple Native Interface (SNI)................................. 183 4.6.2 Shielded Plug (SP)....................................... 187 4.6.3 MicroEJ Java H......................................... 190 4.7 External Resources Loader....................................... 191 4.7.1 Principle............................................ 191 4.7.2 Functional Description..................................... 191 4.7.3 Implementations........................................ 191 4.7.4 External Resources Folder................................... 192 4.7.5 Dependencies......................................... 192 4.7.6 Installation........................................... 192 4.7.7 Use............................................... 192 4.8 Serial Communications......................................... 192 4.8.1 ECOM.............................................. 193 4.8.2 ECOM Comm.......................................... 194 4.9 Graphics User Interface......................................... 202 4.9.1 Principle............................................ 202 4.9.2 MicroUI............................................. 205 4.9.3 Static Initialization....................................... 208 4.9.4 LEDs............................................... 211 4.9.5 Inputs.............................................. 212 4.9.6 Display............................................. 214 4.9.7 Images............................................. 231 4.9.8 Fonts.............................................. 242 4.9.9 Simulation........................................... 249 4.10 Networking................................................ 252 4.10.1 Principle............................................ 252 4.10.2 Network Core Engine...................................... 252 4.10.3 SSL............................................... 253 4.11 File System................................................ 254 4.11.1 Principle............................................ 254 4.11.2 Functional Description..................................... 254 4.11.3 Dependencies......................................... 254 4.11.4 Installation..........................................