Microej Documentation
Total Page:16
File Type:pdf, Size:1020Kb
MicroEJ Documentation MicroEJ Corp. Revision aba876eb Sep 29, 2021 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 Perform Online Getting Started.....................................5 2.2 MicroEJ Firmware............................................6 2.2.1 Bootable Binary with Core Services..............................6 2.2.2 Specification..........................................6 2.3 MicroEJ Runtime.............................................6 2.3.1 Language............................................6 2.3.2 Scheduler............................................7 2.3.3 Garbage Collector.......................................7 2.3.4 Foundation Libraries......................................7 2.4 MicroEJ Libraries............................................8 2.5 MicroEJ Central Repository.......................................8 2.5.1 Introduction..........................................8 2.5.2 Use...............................................9 2.5.3 Content Organization.....................................9 2.5.4 Javadoc.............................................9 2.6 Embedded Specification Requests...................................9 2.7 GitHub Repositories...........................................9 2.7.1 Repository Import....................................... 10 2.7.2 MicroEJ GitHub Badges.................................... 14 3 SDK User Guide 15 3.1 Download and Install.......................................... 16 3.2 System Requirements.......................................... 16 3.3 Workspaces and MicroEJ Repositories................................. 17 3.4 SDK Version............................................... 18 3.5 Licenses................................................. 20 3.5.1 License Manager Overview................................... 20 3.5.2 Evaluation Licenses...................................... 20 3.5.3 Production Licenses...................................... 23 3.6 MicroEJ Module Manager........................................ 28 3.6.1 Introduction.......................................... 28 3.6.2 Specification.......................................... 28 3.6.3 Module Project Skeleton.................................... 29 3.6.4 Module Description File.................................... 29 3.6.5 MicroEJ Module Manager Configuration........................... 31 3.6.6 Module Build.......................................... 35 3.6.7 Build Kit............................................. 36 i 3.6.8 Command Line Interface.................................... 37 3.6.9 Troubleshooting........................................ 41 3.6.10 Meta Build........................................... 43 3.6.11 Former MicroEJ SDK Versions (lower than 5.2.0)....................... 44 3.6.12 Former MicroEJ SDK Versions (from 5.2.0 to 5.3.x)...................... 46 3.7 Development Tools........................................... 46 3.7.1 Stack Trace Reader....................................... 46 3.7.2 Code Coverage Analyzer.................................... 59 3.7.3 Heap Dumper & Heap Analyzer................................ 62 3.7.4 Memory Map Analyzer..................................... 73 3.7.5 ELF to Map File Generator................................... 76 3.8 Release Notes.............................................. 78 3.9 SDK Distribution Changelog....................................... 78 3.9.1 [21.03] - 2021-03-25....................................... 78 3.9.2 [20.12] - 2020-12-11....................................... 78 3.9.3 [20.10] - 2020-10-30....................................... 78 3.9.4 [20.07] - 2020-07-28...................................... 79 3.9.5 [19.05] - 2019-05-17....................................... 79 3.9.6 [19.02] - 2019-02-22....................................... 79 3.10 SDK Changelog.............................................. 79 3.10.1 [5.4.1] - 2021-04-16....................................... 79 3.10.2 [5.4.0] - 2021-03-25....................................... 80 3.10.3 [5.3.1] - 2020-12-11....................................... 81 3.10.4 [5.3.0] - 2020-10-30....................................... 82 3.10.5 [5.2.0] - 2020-07-28....................................... 83 3.10.6 [5.1.2] - 2020-03-09....................................... 85 3.10.7 [5.1.1] - 2019-09-26....................................... 86 3.10.8 [5.1.0] - 2019-05-17....................................... 86 3.10.9 [5.0.1] - 2019-02-14....................................... 88 3.11 Migration Notes............................................. 89 3.11.1 From 5.2.x to 5.3.x....................................... 89 3.11.2 From 5.1.x to 5.2.x........................................ 90 3.11.3 From 4.1.x to 5.x........................................ 90 3.12 Troubleshooting............................................. 92 3.12.1 Windows Specifics....................................... 92 3.12.2 Linux Specifics......................................... 92 4 Application Developer Guide 94 4.1 Introduction............................................... 94 4.2 Standalone Application......................................... 94 4.2.1 MicroEJ Platform Import.................................... 94 4.2.2 Build and Run an Application................................. 98 4.2.3 Build Output Files....................................... 103 4.2.4 MicroEJ Launch......................................... 104 4.2.5 Application Options...................................... 108 4.2.6 SOAR.............................................. 135 4.3 Sandboxed Application......................................... 136 4.3.1 Sandboxed Application Structure............................... 136 4.3.2 Application Publication.................................... 137 4.3.3 Shared Interfaces........................................ 137 4.4 Virtual Device.............................................. 141 4.4.1 Using a Virtual Device for Simulation............................. 141 4.4.2 Runtime Environment..................................... 141 4.5 Module Natures............................................. 142 ii 4.5.1 Add-On Library......................................... 142 4.5.2 Add-On Processor....................................... 143 4.5.3 Foundation Library API..................................... 143 4.5.4 Foundation Library Implementation............................. 143 4.5.5 Meta Build........................................... 144 4.5.6 Mock.............................................. 144 4.5.7 Module Repository....................................... 144 4.5.8 Sandboxed Application.................................... 145 4.5.9 Standalone Application.................................... 146 4.5.10 Natures Plugins......................................... 146 4.6 Module Repository............................................ 150 4.6.1 Create a Repository Project.................................. 152 4.6.2 Configure Resolver for Input Modules............................. 152 4.6.3 Configure Consistency Check................................. 152 4.6.4 Advanced Options....................................... 152 4.6.5 Include Modules........................................ 152 4.6.6 Build the Repository...................................... 154 4.6.7 Use the Oline Repository................................... 154 4.7 MicroEJ Classpath............................................ 154 4.7.1 Application Classpath..................................... 155 4.7.2 Classpath Load Model..................................... 155 4.7.3 Classpath Elements...................................... 156 4.8 Application Resources.......................................... 159 4.8.1 Images............................................. 160 4.8.2 Fonts.............................................. 160 4.8.3 Native Language Support................................... 162 4.9 Platform Selection............................................ 163 4.10 Development Tools........................................... 163 4.10.1 Test Suite with JUnit...................................... 164 4.10.2 Heap Usage Monitoring.................................... 168 4.10.3 Serial to Socket Transmitter.................................. 170 4.10.4 Event Tracing.......................................... 172 4.10.5 Null Analysis.......................................... 174 4.11 Advanced Tools............................................. 181 4.11.1 MicroEJ Linker......................................... 181 4.11.2 MicroEJ Test Suite Engine................................... 193 4.12 Graphical User Interface......................................... 199 4.12.1 MicroUI............................................. 200 4.12.2 MWT (Micro Widget Toolkit).................................. 231 4.12.3 Widgets and Examples..................................... 250 4.12.4 Advanced............................................ 252 4.13 JavaScript................................................ 255 4.13.1 Getting Started......................................... 256 4.13.2 Sources Management..................................... 257 4.13.3 Examples............................................ 259 4.13.4 API................................................ 262 4.13.5 Communication Between Java and JS...........................