Home
        "user manual"
         Contents
1.    MicroEJ   Platform  Architecture    Reference Manual    S27    Reference TLT 0753 REF PlatformArchitecture    MicroEJ   Platform Architecture   Reference Manual        Confidentiality  amp  Intellectual Property    All right reserved  Information  technical data and tutorials contained in this document are IS2T   S A  Proprietary under Copyright Law  Without any written permission from IS2T S A   copying or  sending parts of the document or the entire document by any means to third parties is not permitted  including but not limited to electronic communication  photocopies  mechanical reproduction systems   Granted authorizations for using parts of the document or the entire document do not mean they give  public full access rights     IceTea    IS2T    MicroJvm    MicroEJ    S3     SNI     SOAR    Drag Emb Drop     IceOS     Shielded Plug    and all associated logos are trademarks or registered trademarks of IS2T S A  in  France  Europe  United States or others Countries     Java    is Sun Microsystems    trademark for a technology for developing application software and  deploying it in crossplatform  networked environments  When it is used in this documentation without  adding the     symbol  it includes implementations of the technology by companies other than Sun     Java     all Java based marks and all related logos are trademarks or registered trademarks of Sun  Microsystems Inc  in the United States and other Countries     Other trademarks are proprietary of their
2.   xs integer   gt    lt  xs simpleType gt      lt     complex type  arrayTypewithAttribute   type of array element   gt    lt xs complexType name    arrayTypewWithAttribute  gt    lt xs simpleContent gt    lt xs extension base  arrayType  gt      lt xs attribute name  id  type  xs string  use    required   gt    lt xs attribute name  class  type  xs string  use    required   gt    lt xs attribute name  createdAt  type  xs string  use    optional   gt      lt xs attribute name  createdInThread  type  xs string  use     optional   gt     lt xs attribute name  createdInMethod  type  xs string  use     optional   gt      lt xs attribute name  length  type  xs string  use    required   gt     lt xs attribute name  elementsType  type  xs string  use    optional     gt     lt xs attribute name  type  type  xs string  use    optional   gt      lt  xs extension gt    lt  xs simpleContent gt    lt  xs complexType gt      lt  xs schema gt     Table 15 2  XML schema for heap dumps    15 2 2 File Specification    Types referenced in heap dumps are represented in the internal classfile format  Figure 15 1   Fully  qualified names are names separated by   separator  For example  a b C      28    MicroEJ   Platform Architecture   Reference Manual         Type    lt BaseType gt     lt ClassType gt     lt ArrayType gt   BaseType  B byte   C char   D double   F float   I int   J long   S short      Z boolean      ClassType  L lt ClassName gt      ArrayType    lt Type gt     Figure 15 1  Interna
3.  2  Shielded Plug compiler error Messages  sese ee eee eree eee eee 22  11 1  ECOM configuration variables sese eee 23  11 2  ECOM error MESSAGES anier ae aea EN NEA E E EN EEE E ESENS 23  12 1  ECOM Comm configuration variables sese sees eee eee eee 24  12 2  ECOM COMM error T 24  Tat ME Endine OPtlons eae aE tt N 27  15 2  XML schema for heap dumps sss eee eee ee eee 27  15 3  Tag descriptions eaei o iaa da tas ees een AE E EREE Ee OE ENE EE EEE E IA 29  15 4  SimJPF specific configuration variables sees 29  16 1  NLS Immutables Creator errors messages esse eee ee ee eee 30  LAA EMmMbJPE Liita ONS RN 31  172s SIMJPE  Limitations ereenn OR 31  18 1  Java LD anionen nre A Ad iii 32  18 2      EmbJPE Low  Level API  cod atra dede is 32  SS A ON 32  18 4  e  MU os 32  18 5  o A NON 32  18 6  Java LIDrari o at A asada 32  18 7  EmbJPF Low Level   API TTT 33  A A RN 33  18 9  SPOOIS RN 33  IN NO 33  18 11  EmbJPE Low  Level API cuina oda dia cit   33  18 12 SiM  AA eaaa O 33  18 13  A en tine obs tycoon ye dances ou E os eR a E de cous nods Cause a eaea ON 33  1844 Java  LIDAN ESE Se H e e a 34  18 15 EmbJPF L  w Level AP isc a ARA tree IA Ae athe 34  18 16  SimJ O 34    MicroEJ   Platform Architecture   Reference Manual        1 Bibliography     JVM  Tim Lindholm  amp  Frank Yellin  The Java    Virtual Machine Specification  Second  Edition  1999    EDC  Embedded Device Configuration  ESR 021  http   www e s r net    B ON  Beyond  ESR 001  http   www e s r net    SNIGT  Simple N
4.  E E e NEE 18  BON eroaren nnee tin A Ee EE I EEEE E EE os it 19  8 1  Immutable Files Related Error Messages sese ee eee 19  8 2  E T 19  SN A ER 20  9 1  SNI Link Time Error Messages sese 20  O a a il a dd 21  10 1  XML File Description nesens rneeste s serae tiber entes ao   seos 21  10 2 SP  Compiler 21  10 3  Error Messages veias ladilla iii  22  VEE OMG ni AA A Ai 23  11 1   Configuration a ata iO ae pies 23  IA o A AAA dens Speedy vanias daveueeteycatibe NaS 23  12  EGOM TTT 24  1 152 COMPUTATION A IR NIN 24  12 2  Error A AA ves EE weds osauveveseuavececsesvevcveds vase osenuevess TEE deve 24  13  EELMIVM  Low Level JPE API  a ica da 25  13 1  Principle T 25  13 2  Naming T STs T 25  13 32 Porting the JRF minne n Gleavinaesecsslovete ssgesterig e a e o eii 25  14  LLCOMM  Low Level ECOM Comm API sees 26  wT Naming  Conventillo 26  14 2  Header TTT 26  TE TET TTT 27  15 1  HEL Engine Opuons  TE 27  15 2  Heap Dumping HHH 27  153  CONAGUA A A tania 29  16  Native Language Support  NLS  sese eee eee 30    MicroEJ   Platform Architecture   Reference Manual        16 1  IOtrO GU CHO  toi ob eas saved TT 30  16 2  NLS Immutables Creator Errors Messages e 30  R Limitations snaren e iE AEE N EENE N E N A NE E A N 31  17 1  EMDJPEF  TEST 31  Tra SUDI PEF LIMIGOS eel E N 31  18  Platform Architecture Features History ee 32  A EEEE EAR EENE AE 32  Ite PAASA O N O O 32  A NO 33  18 4 10 O 34  19  Changes LG O NO 35  O 35  A R O TTT 35  19 35203 A nos ea 36  LA OR 38    MicroEJ   
5.  Reference Manual              Heap Analyzer 1 1 0  Memory Map File Interpreter 1 2 4  MicroEJ Java H 1 0 0          Table 18 13  Tools                   18 4 1 0 1  CLDC 1 1  B ON 1 2  SNI 1 1  SP 1 0 0       Table 18 14  Java Libraries       LLMJVM 1 0             LLSP 1 0          Table 18 15  EmbJPF Low Level API       HIL 1 0                Table 18 16  SimJPF    34    MicroEJ   Platform Architecture   Reference Manual        19 Changes Log    19 1 5 3 0   19 1 1 ECOM   e ECOM 1 1 API and implementation  device management    19 1 2 ECOM COMM   e ECOM COMM 1 1 API and implementation  dynamic Comm ports    19 1 3 LLCOMM   e Add LLAPIs for Comm connections initialization and dynamic registration unregistration   19 1 4 LLCOMM_BUFFERED_CONNECTION   e Add LLAPIs to get Comm connection name and properties   19 1 5 LLCOMM_CUSTOM_CONNECTION   e Add LLAPIs to get Comm connection name and properties   19 1 6 LLEXT_RES   e External Resources Loader Low Level API    19 1 7 LLMJVM   e Update error codes list    19 1 8 HIL   e Add SNI utility methods in the HILEngine API    19 1 9 External Resources Loader   e Add External Resources Loader core feature    19 2 5 0 0   19 2 1 Check Helper   e Add Java tooling library for Test Suite Engine    19 2 2 Components   e Add Components library    19 2 3 EDC   e Replace CLDC library by EDC library     19 2 4 Logging  e Add Logging library     35    MicroEJ   Platform Architecture   Reference Manual        19 2 5 NLS  e Move NLS library from XPF
6.  authors     MicroEJ   Platform Architecture   Reference Manual        Table of Contents    A cchwen EE EEEE R E cee een aea Ns hee sean ett dares 6  25 INTO UCA O eiii iia cht celia RE aE EEEE REE E sir 7  S H NO 7  2 2  A  tended Audience  neciesa esi eaii naeia oaa aED TS E EE A i 7  2 3  Configuration Variables seisnes RRR YER NK RAN SENA NR rieira ES 7  2 4  JPF Components Overview vessicecsectecizecss rA aE ANE A ERE AE IAR 7  250  Scheduler ois ci iss AOS 8  2 6  5mart RAM L Tes 2 aiii iia REEE E AEE iia 8  3  Edition   NaMe Version LA A A AI a tei E aini 9  da TT 10  4 1    Resource  Requirements  A TEE e E E E 10  4 2  Standard P Ts  10  4 3  Specific Libraries  amp  APIS            cccccccccccccccesececececesececesecesesesesesesssesesesesesesssesesesesesesesese 10  A A  EA AAA shenedes chenedes theses sacdeaeetesnncedes chencdecsanees 10  4 5  C  nfig  rati  N RN 11  5  SOAR  the  Smart Linker  s c c03 59 se  scesbvecevecaventvvnsevcev    og obs seed EEE REEE NEEE atenas 12  3  Ly AMMOMUCH OM  ti en asec sishGees tes a aa a che   ods evden E e aa a EEA a aai 12  5 22 Loading e Te 13  53  Cl  ss Initialization  Order TTT 13  e Taror MESSAGES  caesar ON 13  6  Java Gore Libraries  00 AA A a Ree awe E E EEE a 16  GL JaVa PLOPCrtses  NA 16  6 2  Generne OUUPUL suis a N E ETAN TAA nono 16  6 3  Error TTT 16  6 4  Exit CodeS ee eea a E E Eae EEEE EEEE E AE A EEE RAE EEEE aE Ee ET 16  Ts D CLE O E E 18  Ziy Error Messages socie eredni O 18  7 27 CONLPBULALION   ie a EE A E
7.  finally blocks must be inlined    350 SNI incompatibility  some specified type should be an array    351 SNI incompatibility  some type should defined some specified field    352 SNI incompatibility  the specified field is not compatible with SNI    353 SNI incompatibility  the specified type must be a class    354 SNI incompatibility  the specified type must defined the specified static field    355 SNI file error   the data must be an integer    356 SNI file error   unexpected tag   357 SNI file error   attributes  lt name gt    lt descriptor gt    lt index gt  and  lt size gt  are expect   ed in the specified tag    358 SNI file error   invalid SNI tag value    359 Error parsing SNI file    360 XML Error on parsing SNI file    361 SNI incompatibility   illegal call to the specified data    362 No stack found for the specified native group   363 Invalid SNI method  The argument cannot be an object reference   364 Invalid SNI method  The array argument must only be a base type array   365 Invalid SNI method  The return type must be a base type   366 Invalid SNI method  The method must be static          Table 5 1  SOAR error messages     15       MicroEJ   Platform Architecture   Reference Manual        6 Java Core Libraries    A Java core library is the library which provides the basic Java concepts and classes  Without this library  it is not possible to write any Java application     MicroEJ provides several Java core libraries  Only one library can be installed into the
8.  neers in a driver  The names of these functions match the LLCOM_BUFFERED_CONNECTION_IMPL_  or the  LLCOM_CUSTOM_CONNECTION_IMPL_ pattern     14 2 Header Files    Four C header files are provided     e LLCOMM_BUFFERED_CONNECTION_impl h  Defines the set of functions that the driver must implement to provide a Buffered connection    e LLCOMM_BUFFERED_CONNECTION h    Defines the set of functions provided by ECOM Comm that can be called by the driver  or other C  code  when using a Buffered connection    e LLCOMM_CUSTOM_CONNECTION_impl h    Defines the set of functions that the driver must implement to provide a Custom connection    e LLCOMM_CUSTOM_CONNECTION h    Defines the set of functions provided by ECOM Comm that can be called by the driver  or other C  code  when using a Custom connection    26    MicroEJ   Platform Architecture   Reference Manual        15 Simulation    15 1 HIL Engine Options    Below are the HIL Engine options                 Option name   Description   verbose e    e  Extra messages are printed out to the console  add extra e to get  more messages    ip  lt address gt  SimJPF connection IP address  A B C D   By default set to local   host    port  lt port gt  SimJPF connection port  By default set to 8001         connectTimeout  lt timeout gt   timeout in s for SimJPF connections  By default set to 10 seconds         excludes  lt name sep name gt   Types that will be excluded from the HIL Engine class resolution    provided mocks  By default  no types 
9.  opened  Only one stream per kind of  stream  input or output stream  can be opened at the same time   5 Too many connections have been opened at the same time  The platform is not    able to open a new one  Try to close an useless connection before trying to open  the new connection        Table 11 2  ECOM error messages    23          MicroEJ   Platform Architecture   Reference Manual        12 ECOM Comm    12 1 Configuration    The library implementation has application specific configuration variables        Variable    Meaning       ECOM_COMM_01   Configures whether the ECOM Comm connection factory is enabled  If it is    not enabled it is not possible to create ECOM Comm connections        ECOM_COMM_02   Configures the mappings between application port ids and the defined plat     form ids           ECOM_COMM_03   Configures whether the ECOM Comm dynamic connection registration mech     anism is enabled           Table 12 1  ECOM Comm configuration variables    12 2 Error Messages  When an exception is thrown by the implementation of the ECOM COMM API  the error message    ECOM COMM E  lt messageld gt     is issued  where  lt messageld gt  meaning is defined in the next table        Message ID    Description       1    The connection descriptor must start with  comm         Reserved        The Comm port is unknown        The connection descriptor is invalid        The Comm port is already open        The baudrate is unsupported        The number of bits per character is
10.  platform at any  time     6 1 Java Properties   Java properties allow the Java application to be parameterized using the System getProperty API   The definition of the properties and their respective values can be done using files  Each filename of a  properties file must match with   system properties and must be located in properties package of  the application classpath  These files follow the Java property list specification  key  value pairs   microedition  encoding IS0 8859 1    Figure 6 1  Example of content of a Java properties file    Java properties can also be defined in the launch configuration  This can be done by setting the properties  in the launcher with a specific prefix in their name       properties for both the SimJPF and the EmbJPF  name starts with microej java property    e properties for the SimJPF  name starts with sim  java property     e properties for the EmbJPF  name starts with emb java property       For example  to define the property myProp with the value thevalue  set the following option in the vm  arguments field of the JRE tab of the launch configuration      Dmicroej java property myProp theValue    Figure 6 2  Example of Java property definition in launch configuration    6 2 Generic Output    The System err stream is connected to the System  out print stream  See below for how to configure  the destination of these streams     6 3 Error Messages    When an exception is thrown by the runtime  the error message  Generic E  lt messageld 
11.  prefix for block IDs    genIdsJava When specified  generate Java interfaces file with block ID con   stants     jOutputDir dir Output directory of Java interfaces files  Default is current directo   ry     jPackage name The name of the package for Java interfaces              Table 10 1  Shielded Plug compiler options     10 3 Error Messages                         Message ID Description  0 Internal limits reached   1 Invalid endianness   2 Invalid output architecture   3 Error while reading   writing files   4 Missing mandatory option           Table 10 2  Shielded Plug compiler error messages     22    MicroEJ   Platform Architecture   Reference Manual        11 ECOM    ECOM is the communication core library     11 1 Configuration    The library implementation has application specific configuration variables        Variable    Meaning          ECOM_01       Configures whether the ECOM device notification mechanism is enabled        Table 11 1  ECOM configuration variables    11 2 Error Messages    When an exception is thrown by the implementation of the ECOM API  the error message    ECOM 1 1 E  lt messageld gt     is issued  where  lt messageld gt  meaning is defined in the next table                             Message ID Description  1 The connection has been closed  No more action can be done on this connection   2 The connection has been already closed   3 The connection description is invalid  The connection cannot be opened   4 The connection stream has been already
12.  the MicroJvm life cycle  API  create  start  stop  destroy      the usage of this API is described in Section 13     LLMJVM  Low  Level JPF API     of this document     9 1 SNI Link Time Error Messages    The following error messages are issued at SOAR time and not at runtime                    Message ID Description  363 Argument cannot be a reference   364 Argument can only be from a base type array   365 Return type must be a base type   366 Method must be a static method              Table 9 1  SNI error messages     20    MicroEJ   Platform Architecture   Reference Manual        10 SP    10 1 XML File Description    The Shielded Plug  SP  provides data segregation with a clear publish subscribe API  The data sharing  between modules uses the concept of shared memory blocks  with introspection  The database is made  of blocks  chunks of RAM     Module 1 Module 2   written in ShieldedPlug  written in    Java or C  Database Java or C        Figure 10 1  A Shielded Plug between two application  Java C  modules     The implementation of the SP for the JPF uses a XML file description to describe the database  the  syntax follows the one proposed by  SP      10 2 SP Compiler       ShieldedPlug  SP file SP Database  Sn compiler  lt   C My Java file    java    Figure 10 2  Shielded Plug compiler flow   The Shielded Plug compiler takes as input a shielded plug description  XML   It outputs   e A description of the requested resources of the database as a binary file   o  that wil
13.  to these codes  Consult the platform specific User s Manual to see how to set or  view configuration variables     2 4 JPF Components Overview    Platform Architecture features a tiny and fast runtime associated with a smart RAM optimizer  They  provide four built in libraries  B ON    EDC    SNIGT  and  SP   Figure 2 1 shows the components  involved     SP file SP  xml compiler       User SP                             Binary SOAR Boit  JS  smart application Database   class linker   JPF runtime   B ON   EDC   SNIGT   SP   Immutables  xml Smart RAM  Properties APL    i API i  API   key value  a n  Drivers  amp  Firmware  Resources    input output of a tool      Figure 2 1  JPF Runtime Components  tools  libraries  amp  APIs    MicroEJ   Platform Architecture   Reference Manual        The three APIs Simple Native Interface  SNI   Low Level MicroJvm    virtual machine  LLMJVM    and Low Level Shielded Plug  LLSP  allow the JPF runtime to link  and port  to legacy code  such as  any kind of RTOS or legacy C libraries     2 5 Scheduler   The JPF features a green thread architecture platform that can interact with the C world  SNIGT   The   green  thread policy is as follow    e preemptive for different priorities    e round robin for same priorities     e  priority inheritance protocol  when priority inversion occurs L    Java stacks  associated with the threads  automatically adapt their sizes according to the thread require   ments  once the thread has finished  its associate
14.  unsupported        The number of stop bits is unsupported        WO  CO  NI nl ur  El WI  N    The parity is unsupported        ER        kad   E    The input stream cannot be opened because native driver is not able to create a  RX buffer to store the incoming data     The output stream cannot be opened because native driver is not able to create a  TX buffer to store the outgoing data           ER  N       The given connection descriptor option cannot be parsed        Table 12 2  ECOM COMM error messages    24          MicroEJ   Platform Architecture   Reference Manual        13 LLMJVM  Low Level JPE API  13 1 Principle    13 2 Naming Convention    The Low Level MicroJvm API  the LLMjvm API  relies on functions that need to be implemented  The  naming convention for such functions is that their names match the LLMJVM_IMPL_  pattern     13 3 Porting the JPF    Here is a summary of the functions that need to be implemented to port the JPF   e LLMJVM_IMPL_initialize   e LLMJVM_IMPL_vmTaskStarted   e LLMJVM_IMPL_scheduleRequest   e LLMJVM_IMPL_idlevM   e LLMJVM_IMPL_wakeupVM   e LLMJVM_IMPL_ackwakeup   e LLMJVM_IMPL_getCurrentTaskID  e LLMJVM_IMPL_setApplicationTime  e LLMJVM_IMPL_getCurrentTime   e LLMJVM_IMPL_getTimeNanos    e LLMJVM_IMPL_isInReadOnlyMemory    25    MicroEJ   Platform Architecture   Reference Manual        14 LLCOMM  Low Level ECOM Comm API    14 1 Naming Convention    The Low Level Comm API  LLCOMM   relies on functions that need to be implemented by engi  
15.  xs choice gt      lt xs attribute name  id  type  xs string  use    required   gt    lt xs attribute name  class  type  xs string  use    required   gt    lt xs attribute name  createdAt  type  xs string  use    optional   gt    lt xs attribute name  createdInThread  type  xs string  use    optional   gt    lt xs attribute name  createdInMethod  type  xs string   gt     lt xs attribute name  tag  type  xs string  use    required   gt      lt  xs complexType gt    lt  xs element gt      lt     array element   gt    lt xs element name  array  type    arrayTypewithAttribute   gt    lt     stringLiteral element   gt      lt xs element name  stringLiteral  gt    lt xs complexType gt    lt xs sequence gt    lt xs element minOccurs   4  maxOccurs  4  ref  field    gt    lt  xs sequence gt    lt xs attribute name  id  type  xs string  use    required   gt    lt xs attribute name  class  type  xs string  use    required   gt    lt  xs complexType gt    lt  xs element gt      lt     field element   child of class  object and stringLiteral   gt    lt xs element name  field  gt    lt xs complexType gt      lt xs attribute name  name  type  xs string  use    required   gt    lt xs attribute name  id  type  xs string  use    optional   gt     lt xs attribute name  value  type  xs string  use    optional   gt    lt xs attribute name  type  type  xs string  use    optional   gt      lt  xs complexType gt    lt  xs element gt      lt xs simpleType name    arrayType  gt    lt xs list itemType
16. 2     JPF_04 Configures the maximum Java thread stack size  given in quantity of blocks of 512  bytes  Must be in the range  1  JPF_03         Table 4 5  JPF configuration variables    11          MicroEJ   Platform Architecture   Reference Manual        5 SOAR  the Smart Linker    5 1 Introduction    Java source code is compiled by the Java compiler    into the binary format specified in  JVM   This binary  code needs to be linked before execution  The JPF comes with a linker  named the SOAR  It is in charge  of analyzing  class files  and some other application related files  to produce the final application that  the JPF runtime can execute     Binary  Java   class  Immutables  xm  l  SOAR Java user  Tier application  linker   Properties     key value      Resources       Figure 5 1  The SOAR inputs  amp  outputs    5 1 1 Inputs   e All  class files necessary to run the main class    e The Immutable files description used by the application  see  B ON    e Properties files    e Resources  Images  Native Language Support data          5 1 2 Outputs    e The SOAR image representing the linked user Java application  The format used by the SOAR is  the ELF format     e Documentation in the form of  xm1 file  providing useful information about the generated image   the computed class initialization order  selected items  methods  resources  immutables  with their  associated footprints  Debug information is also provided for the JDWP based Java Eclipse debugger        The JDT c
17. P UI Extension product   19 2 6 SNI    e Add utility classes Poo10fReusableResources  PoolOfLimitedReusableResources and Poolofim   mortalByteBuffers     19 2 7 LLMJVM   e Extract some LLAPI to LLBSP    19 2 8 LLMJVM   e Extract some LLAPI to LLBSP    e Control the MicroJvm Virtual Machine startup and end of execution   e Control the Java threads execution  suspend and resume    e Allow to dump the MicroJvm Virtual Machine status and memories at any time   19 2 9 Memory Map File Interpreter   e Improve GUI  expand and collapse actions  error management    19 2 10 Stack Trace Descriptor   e Add stack trace descriptor tool for the EmbJPF    19 2 11 Test Suite Engine   e Add test suite engine tool    19 3 2 0 3   19 3 1 ECOM   e Add communication core library    19 3 2 ECOM COMM   e Add serial communication library    19 3 3 LLCOMM_BUFFERED_CONNECTION   e Add ECOM COMM Low Level API for generic comm devices   19 3 4 LLCOMM_CUSTOM_CONNECTION   e Add ECOM COMM Low Level API for custom comm devices   19 3 5 LLMJVM    e New LLAPI LLMIVM_IMPL_shutdown     36    MicroEJ   Platform Architecture   Reference Manual        19 3 6 Code Coverage   e Add heap analyzer tool for the SimJPF    19 3 7 Heap Analyzer   e Add code coverage tool for the SimJPF    19 3 8 Memory Map File Interpreter   e Add memory map file analyzer tool for the EmbJPF   19 3 9 MicroEJ Java H    s Add MicroEJ Java H tool for the EmbJPF     37    MicroEJ   Platform Architecture   Reference Manual        20 Document Hist
18. Platform Architecture   Reference Manual        List of Figures    2 1  JPF Runtime Components  tools  libraries  amp  APIS sese essen 7  5 1  The SOAR inputs 82 OUtPUtS       ococonononononononononononononononononononononononononononononononononononononononininoss 12  6 1  Example of content of a Java properties file sss sees eee 16  6 2  Example of Java property definition in launch configuration sese eee ee ee eee eree ee ee eee eee 16  10 1  A Shielded Plug between two application  Java C  modules  sss sese eee eee eee 21  10 2  Shielded Plug compiler flow  sss sese sese eee eee 21  15 1  Internal classfile format for types          ocococononononononononononononononononononononononononononononononononinanoss 29  List of Tables   SL PAOLA referentes A E tobe 9  4 1  Required TESOULCES TTT 10  4 27 Standard lbs ia cti bvensoasess Stee 10  c iS peciicAPl iia ide 10  4 4  Platform  characteristics TROET 10  4 5  JPF configuration variables   oooocncnnnnnnnnnonononononononorororororo nono KENE REA E ES eT EOR EER AEE REER 11  O A HHT 13  bl Generic   CO MESSAGES aaa rancia di ocean even Es 16  6 2  PERES A e E 17  71  EDGE eror Messages AA ii 18  7 2  EDGE configuration variables  esnash 18  8 1  Errors when parsing immutable files at link time  0 0 0 0    sees ee ee eee eee 19  8 2  B ON configuration variables sss esse eee eee eee 19  AN A abt enue bvarescaeesbandasssveusbentascanscesencbasctentaseoy    20  10 1  Shielded Plug compiler Options  sese sese sese eee eee 21  10
19. ages  When a generic exception is thrown by the SOAR  the error message    SOAR ERROR  M lt messageld gt    lt message gt     is issued  where  lt messageld gt  and  lt message gt  meaning are defined in next table                          Message ID Description  0 The SOAR process has encountered some internal limits   1 Unknown option   2 An option has an invalid value   3 A mandatory option is not set   4 A filename given in options does not exist    5 Failed to write output file  access permissions required for  toDir and  root    options      The given file does not exist        IO Error while reading a file        An option value refers to a directory instead of a file        WO   COIN  n    An option value refers to a file instead of a directory or a jar file                 3Types that may be dynamically loaded using Class  forName     method need to be declared as required types     13    MicroEJ   Platform Architecture   Reference Manual                                                                                                                       Message ID Description   10 Invalid entry point class or no main   method    11 Information file can not be generated entirely    12 Limitations of the evaluation version reached    13 IO Error while reading a jar file    14 IO Error while writing a file    15 IO Error while reading a jar file  unknown entry size    16 Not enough memory to load a jar file    17 Specified SOAR options are exclusive    18 XML syntax er
20. are excluded            mocks  lt name sep name gt   Mocks are either   jar file or  class files        Table 15 1  HIL Engine options    15 2 Heap Dumping    15 2 1 XML Schema  Below is the XML schema for heap dumps      lt  xml version  1 0  encoding  UTF 8   gt   ST     lt XS     Schema    Copyright 2012 IS2T  All rights reserved   IS2T PROPRIETARY CONFIDENTIAL  Use is subject to license terms     schema xmlns xs  http   www w3 org 2001 XMLSchema  gt    lt     root element   heap    gt    lt xs element name  heap  gt    lt xs complexType gt    lt xs choice minOccurs  0  maxOccurs  unbounded  gt    lt xs element ref  class   gt    lt xs element ref  object   gt    lt xs element ref  array   gt    lt xs element ref  stringLiteral   gt    lt  xs choice gt    lt  xs complexType gt    lt  xs element gt      lt     class element    gt    lt xs element name  class  gt    lt xs complexType gt    lt xs choice minOccurs  0  maxOccurs  unbounded  gt    lt xs element ref  field   gt    lt  xs choice gt    lt xs attribute name  name  type  xs string  use    required   gt    lt xs attribute name  id  type  xs string  use    required   gt    lt xs attribute name  Superclass  type  xs string   gt    lt  xs complexType gt    lt  xs element gt     27       MicroEJ   Platform Architecture   Reference Manual         lt     object element   gt    lt xs element name  object  gt    lt xs complexType gt    lt xs choice minOccurs  0  maxOccurs  unbounded  gt    lt xs element ref  field   gt    lt 
21. ative Interface for Green Threads  ESR 012  http   www e s r net    SP  Shielded Plug  ESR 014  http   www e s r net    MicroEJ   Platform Architecture   Reference Manual        2 Introduction    2 1 Scope    Platform Architecture is state of the art embedded Java runtimes for MCUs  They also provide simu   lated runtimes that execute on workstations to allow software development on  virtual hardware      This reference manual describes the functionality of the JPFs  It is concise  but attempts to be exact and  complete  Semantics of implemented standard libraries are described in their respective specifications   This reference manual includes only the specific APIs related to porting the JPFs to different real time  operating systems  RTOS      2 2 Intended Audience    The audience for this document is software engineers who need to understand the details of the JPF  components  including their APIs  error codes and options     2 3 Configuration Variables    This document describes a number of configuration variables  A configuration variable is a value that  can be set by the user to configure a component  The mechanism for setting the variable differs depend   ing on the component and the environment  and is not described in this document     Each variable is given a code of the form  CATEGORY_nn  where CATEGORY is a label that identifies the  configuration category  and nn is a two digit number identifying the specific variable within the category   Other documents refer
22. braries                                                                               Library Reference EmbJPF Versions  SimJPF Versions User Con   figurable  EDC  EDC  1 2 1 2 yes  B ON  B ON  1 2 1 2 yes  SNI  SNIGT  1 2 1 2  Table 4 2  Standard libraries  4 3 Specific Libraries  amp  APIs  Library Reference EmbJPF Versions  SimJPF Versions User Con   figurable  SP  SP  1 0 1 0 yes  LLSP API This document 1 0 n a  LLMJVM API This document 1 3 n a  HIL API This document n a 2 1 0  ECOM Comm This document 1 1 1 1 yes  Table 4 3  Specific API  4 4 Platform Characteristics  Name Item EmbJPF Char  SimJPF Char  User Con   acteristics acteristics figurable  Heap Partition 1 1  RAM optimizer Immortal Space Yes Yes yes  Immutable Space Yes  static  Yes  static   Debug Symbolic No JDWP  Socket   yes                      10             MicroEJ   Platform Architecture   Reference Manual                             Name Item EmbJPF Char  SimJPF Char  User Con   acteristics acteristics figurable  Java Code Location In Flash  in n a  place execution        Table 4 4  Platform characteristics    4 5 Configuration    The JPF has a number of application specific configuration variables  Table 4 5                           Variable  Meaning  JPF_01 Configures the Java heap size  in bytes    JPF_02 Configures the maximum number of Java threads that can run simultaneously   JPF_03 Configures the size of Java thread stack pool  given in quantity of blocks of 512  bytes  2 blocks means 1024  2x51
23. d stack is reclaimed  freeing the corresponding RAM  memory     2 6 Smart RAM Optimizer    The JPF includes a state of the art memory management system  the Garbage Collector  GC   It man   ages a bounded piece of RAM memory  devoted to the Java world The GC automatically frees dead  Java objects  and defragments the memory in order to optimize RAM usage  This is done transparently  while the Java applications keep running      This protocol raises the priority of a thread that is holding a resource needed by a higher priority task to the priority  of that task     MicroEJ   Platform Architecture   Reference Manual        3 Edition     Name   Version       Editions    EVAL   DEV       Version          5 3 2       Table 3 1  Platform references       MicroEJ   Platform Architecture   Reference Manual        4 Features    4 1 Resource Requirements                         Resource EmbJPF Characteristics  Flash Less than 30 KB  RAM Less than 1 5 KB  RTOS Any RTOS     Architecture Green Thread Java stacks auto sizable  RTOS Stack Size Less than 1 KB  Startup Time Less than 2 ms at 120MHz                As a special case  the JPF can be used in a system that runs only one main task  the JPF  So the JPF can be used  with any RTOS or with no RTOS at all   Pava stacks automatically adapt their sizes according to the Java  green  thread demand  Once the thread has    finished  its associated stack is automatically reclaimed by the GC     Table 4 1  Required resources    4 2 Standard Li
24. e is ignored   15 Warning  No message is defined for the specified header   16 Warning  Invalid property                 Table 16 1  NLS Immutables Creator errors messages    30    MicroEJ   Platform Architecture   Reference Manual        17 Limitations    17 1 EmbJPF Limitations                                              Item EVAL DEV  Number of classes 2500 4000  Number of methods per class 1500 65000  Total number of methods 1500 unlimited  Class   Interface hierarchy depth 127 max 127 max  Number of monitors  per thread 8 max 8 max  l Base type 65000 65000  Number of fields  References 65000 65000  boolean   byte limited 65000  short   char limited 65000  Number of statics int   float limited 65000  long   double limited 65000  References limited 65000  Method size 65000 65000  Time limit 60 minutes unlimited                   No more than n different monitors can be held by one thread at any time     Table 17 1  EmbJPF Limitations    17 2 SimJPF Limitations             Item EVAL version DEV version  Number of calls limited unlimited  Time limit 60 minutes unlimited                   Table 17 2  SimJPF Limitations    31    MicroEJ   Platform Architecture   Reference Manual        18 Platform Architecture Features History                                                                                                          18 1 5 3 0  B ON 1 2  CHECKHELPER 1 1 0  Components 2 0  ECOM 1 1  ECOM COMM 1 1  EDC 1 2  Logging 1 0  NLS 1 0 1  SNI 1 2 0  SP 1 0  Table 18 1  Ja
25. gt     is issued  where  lt messageld gt  meaning is defined in the next table                    Message ID Description  1 Negative offset   2 Negative length   3 Offset   length  gt  object length           Table 6 1  Generic error messages    6 4 Exit Codes    The RTOS task that runs the Java runtime may end  especially when the Java application calls  System exit method  EDC   By convention  a negative value indicates abnormal termination     16    MicroEJ   Platform Architecture   Reference Manual                                         Message ID Meaning  0 The Java application ended normally    1 The SOAR and the JPF are not compatible    2 Incompatible link configuration  1sc file  with either the SOAR or the JPF    3 Evaluation version limitations reached  termination of the application    5 Not enough resources to start the very first Java thread  that executes main  method    12 Maximum number of threads reached    13 Fail to start the JPF because the specified Java heap is too large    14 Invalid stack space due to a link placement error    15 The application has too many static  the requested static head is too large     16 The JPF virtual machine cannot be restarted           Table 6 2  JPF exit codes    17       MicroEJ   Platform Architecture   Reference Manual        7 EDC    EDC is a Java core library  see    Java Core Libraries         7 1 Error Messages    When an exception is thrown by the implementation of the EDC API  the error message    EDC 1 2 E  lt 
26. l be linked to  the overall application by the linker  It is an ELF format description that reserves both the necessary    RAM and the necessary Flash memory for the database of the shielded plug     e Two descriptions  one in Java and one in C  of the block ID constants to be used by either Java or  C application modules                 Option name Description   verbose e   e  Extra messages are printed out to the console according to the  number of  e       descriptionFile file XML Shielded Plug description file  Multiple files allowed    waitingTaskLimit value Max number of task threads that can wait on a block  number be     tween 0 and 7   1 is for no limit  8 for unspecified               immutable When specified  only immutable Shielded Plugs can be compiled    output dir Output directory  Default is the current directory    outputName name Output name for the Shielded Plug layout description  Default is     shielded_plug            endianness name Either  little  or  big   Default is  little          outputArchitecture value   Output ELF architecture  Only  ELF  architecture available               rwBlockHeaderSize value  Read Write header file value        21    MicroEJ   Platform Architecture   Reference Manual                             Option name Description    genIdsc When specified  generate C header file with block ID constants     cOutputDir dir Output directory of C header files  Default is the current directory     cConstantsPrefix prefix C constants name
27. l classfile format for types    Tags used in the heap dumps are described in the table below                                                                       Tag Attributes Description  heap The root element  class Element that references a Java class  name Class type   lt ClassType gt     id Unique identifier of the class  superclass Identifier of the superclass of this class  object Element that references a Java object  id Unique identifier of this object  class Fully qualified name of the class of this object  array Element that references a Java array  id Unique identifier of this array  class Fully qualified name of the class of this array  elementsType Type of the elements of this array  length Array length  stringLiteral Element that references a java lang String literal  id Unique identifier of this object  class Id of java lang String class  field Element that references the field of an object or a class  name Name of this field  id Object or Array identifier  if it holds a reference  type Type of this field  if it holds a base type  value Value of this field  if it holds a base type       Table 15 3  Tag descriptions    15 3 Configuration    The SimJPF has the following application specific configuration variables                             Variable Meaning   SIMJPF_01 Configures symbolic debugger  JDWP     SIMJPF_02 Configures a Java heap dump when the System  gc   method is called    SIMJPF_03 Configures SimJPF runtime to stick to both the JPF threads polic
28. messageld gt     is issued  where  lt messageld gt  meaning is defined in the next table                                         Message ID Description    4 No native stack found to execute the Java native method     3 Maximum stack size for a thread has been reached  Increase the maximum size  of thread stack parameter     2 No Java stack block could be allocated with the given size  Increase the Java  stack block size     1 The Java stack space if full  Increase the Java stack size or the number of Java  stack blocks    1 A closed stream is being written read    2 The operation Reader  mark   is not supported    3 lock is null in Reader  Object lock     4 String index is out of range    5 Argument must be a positive number    6 Invalid radix used  Must be from Character  MIN_RADIX to    Character  MAX_RADIX        Table 7 1  EDC error messages    7 2 Configuration    The library implementation has application specific configuration variables              Variable Meaning   CORE_01 Configures the redirection of standard output to a user defined OutputStream   By default  standard output is internally connected to the platform s C printf  implementation    CORE_02 Configures string encoding s  that are embedded at runtime  The JPF provides          the following encoding s   UTF 8        Table 7 2  EDC configuration variables    18          MicroEJ   Platform Architecture   Reference Manual        8 B ON    8 1 Immutable Files Related Error Messages    The following error mes
29. ompiler from the Eclipse IDE     12    MicroEJ   Platform Architecture   Reference Manual        5 2 Loading Process    SOAR only loads necessary classfiles and only embeds in output file what is needed from main class  and user required types     plus all provided immutables  resources  and properties     5 3 Class Initialization Order    SOAR complies with the deterministic class initialization   lt clinit gt   order specified in  B ON   The  application is statically analyzed from its entry points to generate a clinit dependency graph  The com   puted clinit sequence is the result of the topological sort of the dependency graph  An error is thrown  if the clinit dependency graph contains cycles     1 Explicit Clinit Dependency    An explicit clinit dependency can be declared by creating an XML file with the  clinitdesc extension  in the application classpath  The file has the following format      lt  xml version  1 0  encoding  UTF 8   gt    lt clinit gt     lt type name  T1  depends  T2   gt    lt  clinit gt     where T1 and T2 are fully qualified names on the form a b c  This explicitly forces SOAR to create a  dependency from T1 to T2  and therefore cuts a potentially detected dependency from T2 to T1     2 Clinit Map File  A clinit map file  ending with extension  clinitmap  is generated beside the SOAR object file  It de   scribes for each clinit dependency     e the types involved  e the kind of dependency    e the stack calls between the two types    5 4 Error Mess
30. ory    October 28th 2014 Update for MicroEJ 3 1 0    June 20th 2014 Update for MicroEJ 3 0 0  July 11th 2013 Update for MicroEJ 2 0 0       38    
31. pecified method code is too large    153 SOAR limit reached  the specified method catches too many exceptions    154 SOAR limit reached  the specified method defines a too large stack    155 SOAR limit reached  the specified type defines too many methods    156 SOAR limit reached  your application defines too many interface    157 SOAR limit reached  the specified type defines too many fields    158 SOAR limit reached  your application defines too many types           14       MicroEJ   Platform Architecture   Reference Manual                                                                                                        Message ID Description   159 SOAR limit reached  your application defines too many static fields    160 SOAR limit reached  the hierarchy depth of the specified type is too high    161 SOAR limit reached  your application defines too many bundles    251 Error in converting IEE754 float 32  or double 64  to fixed point arithmetic  number   300 Corrupted class  invalid dup_x1 instruction usage    301 Corrupted class  invalid dup_x2 instruction usage    302 Corrupted class invalid dup_x2 instruction usage    303 Corrupted class invalid dup2_x1 instruction usage    304 Corrupted class invalid dup2_x1 instruction usage    305 Corrupted class invalid dup2_x2 instruction usage    306 Corrupted class  invalid dup2 instruction usage    307 Corrupted class invalid pop2 instruction usage    308 Corrupted class invalid swap instruction usage    309 Corrupted class
32. ror for some given files    19 Unsupported float representation    23 A clinit cycle has been detected  Clinit cycle can be cut either by simplifying the  application clinit code or by explicitly declaring clinit dependencies  Check the  generated  clinitmap file for more informations    50 Missing code  Java code refers to a method not found in specified classes    51 Missing code  Java code refers to a class not found in the specified classpath    52 Wrong class  Java code refers to a field not found in specified class    53 Wrong class  Java classfile refers to a class as an interface    54 Wrong class  an abstract method is found in a non abstract class    55 Wrong class  illegal access to a method  a field or a type    56 Wrong class  hierarchy inconsistency  an interface cannot be superclass of a  class    57 Circularity detected in initializion sequence    58 Option refers twice the same resource  The first one is used    59 Stack inconsistency detected    60 Constant pool inconsistency detected    61 Corrupted classfile    62 Missing native implementation of a native method    63 Cannot read the specified resource file    64 A same property name cannot be defined in two different property files    65 Bad license validity    66 Classfiles do not contains debug line table information    67 Same as 51   150 SOAR limit reached  the specified method uses too many arguments    151 SOAR limit reached  the specified method uses too many locals    152 SOAR limit reached  the s
33. sages are issued at SOAR time  link phase  and not at runtime                                                  Message ID Description   0 Duplicated ID in immutable files  Each immutable object should have an unique  ID in SOAR image    1 Immutable file refers an unknown field of an object    2 Tried to assign twice the same object field    3 All immutable object fields should be defined in the immutable file description    4 The assigned value does not match the expected Java type    5 An immutable object refers to an unknown ID    6 The length of the immutable object does not match the length of the assigned ob   ject    7 The type defined in the file doesn t match the Java expected type    8 Generic error while parsing an Immutable file   Cycle detected in alias definition    10 An immutable object is an instance of an abstract class or an interface    11 Unknown XML attribute in an immutable file    12 A mandatory XML attribute is missing    13 The value is not a valid Java literal    14 Alias already exists              Table 8 1  Errors when parsing immutable files at link time     8 2 Configuration    The library implementation has application specific configuration variables        Message ID       BON_02    Meaning       Configures the immortal heap size in bytes        Table 8 2  B ON configuration variables    19          MicroEJ   Platform Architecture   Reference Manual        9 SNI    For details about SNI see the specification  SNIGT   Note that  SNIGT  defines
34. va Libraries  LLBSP 1 0  LLCOMM_BUFFERED_CONNECTION 2 0  LLCOMM_CUSTOM_CONNECTION 2 0  LLEXT_RES 1 0  LLMJVM 1 3  LLSP 1 0  Table 18 2  EmbJPF Low Level API  HIL 2 1 0  Table 18 3  SimJPF  External Resources Loader 1 0  Table 18 4  Miscellaneous  Code Coverage Analyzer 1 0 0  Heap Analyzer 1 1 0  Memory Map File Interpreter 1 2 6  MicroEJ Java H 1 1 2  Stack Trace Descriptor 1 0 0  Test Suite Engine 5 0 0  Table 18 5  Tools  18 2 5 0 0  B ON 1 2  CHECKHELPER 1 1 0  Components 2 0  ECOM 1 0  ECOM COMM 1 0                32    MicroEJ   Platform Architecture   Reference Manual                    EDC 1 2  Logging 1 0  NLS 1 0 1  SNI 1 2 0  SP 1 0       Table 18 6  Java Libraries                LLBSP 1 0  LLCOMM_BUFFERED_CONNECTION 1 0  LLCOMM_CUSTOM_CONNECTION 1 0  LLMJVM 1 2   LLSP 1 0       Table 18 7  EmbJPF Low Level API       HIL 2 0 1                Table 18 8  SimJPF                         Table 18 9  Tools       Code Coverage Analyzer 1 0 0  Heap Analyzer 1 1 0  Memory Map File Interpreter 1 2 6  MicroEJ Java H 1 0 0   Stack Trace Descriptor 1 0 0  Test Suite Engine 5 0 0                                              18 3 2 0 3   CLDC 1 1  B ON 1 2  ECOM 1 0  ECOM COMM 1 0  SNI 1 1  SP 1 0   Table 18 10  Java Libraries  LLCOMM_BUFFERED_ CONNECTION 1 0  LLCOMM_CUSTOM_CONNECTION 1 0  LLMJVM 1 1  LLSP 1 0       Table 18 11  EmbJPF Low Level API       HIL 2 0 1       Table 18 12  SimJPF       Code Coverage Analyzer 1 0 0                33    MicroEJ   Platform Architecture  
35. y and memory  sizes    SIMJPF_04 Configures a slowing factor in order to provide the engineers a simulation which  computation speed is similar to the one of the EmbJPF on their PC    SIMJPF_05 Configures code coverage analysis              Table 15 4  SimJPF specific configuration variables    29    MicroEJ   Platform Architecture   Reference Manual        16 Native Language Support  NLS     16 1 Introduction    The NLS library facilitates internationalization  It provides support to manipulate messages and translate  them in different languages     16 2 NLS Immutables Creator Errors Messages                                                          ID Type Description  1 Error   Error reading the nls list file  invalid path  input output error etc   2 Error  Error reading the nls list file  the file content is invalid   3 Error   Specified class is not an interface   4 Error __  Invalid message ID  Must be greater or equal than 1   5 Error Duplicate ID  Both messages use the same message ID   6 Error _  Specified interface does not exists   7 Error   Specified message constant is not visible  must be public    8 Error __  Specified message constant is not ant integer   9 Error  No locale file is defined for the specified header   10 Error  IO error  cannot create the output file   11 Warning  Missing message value   12 Warning  There is are  gap s  in messages constants   13 Warning  Specify property does not denote a message   14 Warning  Invalid properties header file  Fil
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Casio SGW200-1V User's Manual  Mode d`emploi  Prélèvement automatique  Zen - Manuel d`utilisation - Français  ウィングハロー WGS01  Lettre 26e SPME CLEMI Bordeaux  PRÊT À RELEVER DES DÉFIS DE VOISINAGE ?    Samsung P45 E14 2700K 4.3W  DeLOCK Cable USB3.0 A-B male/male 5m    Copyright © All rights reserved. 
   Failed to retrieve file