What happens if I don't use the correct microejruntime.a?


According to Understand how to build a MicroEJ Firmware and its dependencies — MicroEJ Documentation there is a tight dependency between a firmware and the microejruntime.a.
How can I be sure I am using the correct microejruntime.a? Is there a built-in mechanism? Will it always fail at link-time? Will the application crash with weird errors?



Yes, microejapp.o is tightly coupled with microejruntime.a: it must be generated from the Platform where microejruntime.a has been extracted.

In case you try to link a microejapp.o with microejruntime.a from an other Architecture version, SNI_startVM function will return the error code -1. This error code is defined in LLMJVM.h. See also error codes documentation for more details.

You may also get unexpected link errors if the internal dependencies between the two files have changed.


1 Like