A few clicks left before entering the MicroEJ world.
The MicroEJ firmware should now run on your evaluation board. You can also read the RELEASE-NOTES of the firmware.
Program LPC-Link2 with Segger J-Linkscript. With a default installation, it's located here:
NXPin the drop-down menu.
LPC54608J512, click OK, and keep the other setups at their default value (Interface:
FMW-BLUE-OM13092-PQ9Y4-1.6.1-0x10000000-EXTERNAL.hexin the unzipped folder.
FMW-BLUE-OM13092-PQ9Y4-1.6.1-0x00000000-INTERNAL.hexin the unzipped folder.
The MicroEJ firmware should now run on your evaluation board.
The Android companion is an application that connects to a MicroEJ application store (communitystore.microej.com store by default) to install apps on an embedded device running a MicroEJ firmware using a Wifi or Bluetooth interface.
Settingsand activate the
The MicroEJ Companion has several steps to be followed before managing applications with your device.
+icon, enter a name and an IP (the IP can be found on the default Settings page available from the icon, also take note of your Device UID for future use.).
In this section, we are going to install an app (Google Edge Plug Agent) that is a service to connect to Google Cloud IoT Core. A second application (ThermoPub) is a simple GUI that is using the Google Edge Plug Agent service to publish a temperature.
The published data can either be seen locally on the GUI or accessed through the Google Cloud Console.
IoT Coreproduct in the
Registry IDand your
MQTT protocol(we do not need the HTTP protocol for the Google Edge Plug Agent).
Default telemetry topic.
Before entering the information about the device, we need a private key and a public certificate for this device. To generate them we'll use
openssl. Use this bash script to generate your key.
#!/bin/bash # Copyright 2017 Google Inc. # Copyright 2019 MicroEJ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. openssl req -x509 -newkey rsa:2048 -keyout $1_private.pem -nodes -out $1_cert.pem -subj "/CN=unused" openssl pkcs8 -topk8 -inform PEM -outform DER -in $1_private.pem -nocrypt > $1_private_pkcs8
Copy the content of the above script into a
generate_keys.sh file (it is a script that can be used on Linux/macos or Windows for example by using WSL) and use it.
You will get two files in the directory you executed the script:
Back to Google Cloud Console and the Device creation wizard.
Enter manuallywhen asked about the authentication input method.
Public key value.
We are now done configuring Google Cloud IoT Core.
You will need now to configure the device that is our LPCXpresso54608 board.
gcp_data_agent.propertiesfile on your SDcard created by running the agent for the first time
broker.uri=mqtt.googleapis.com project.id=my-sample-project-811256 cloud.region=us-central1 registry.id=MyRegistry device.id=i_am_a_device_id device.key=i_am_a_device_id_private_pkcs8.der
i_am_a_device_id_private_pkcs8next to the
Configuration & state history.
In the following sections, we're going to install MicroEJ Studio, develop a new application and locally deploy it on our board.
MicroEJ Studio is an IDE built on Eclipse for creating applications for the MicroEJ VEE (Virtual Execution Environment).
MicroEJ Studio runs on the following operating systems:
A Java™ Runtime Environment 8 is needed on your host computer for running MicroEJ Studio. Download Java™ from http://java.com/en/.
Download the installer package corresponding to your host computer OS from the download link.
Window > Preferences > MicroEJ > Platformsmenu.
Import...button and select the Virtual Device file previously downloaded (its extension is .jpf ).
Finish. The MicroEJ Virtual Device is successfully installed.
Learn how to develop applications with our demo application samples.
File > Import > General > Existing Projects into Workspace.
Select archive fileand browse
Run As > MicroEJ Application.
Once the MicroEJ Firmware is flashed on your evaluation board.
Settingsmenu by clicking the icon on the main screen.
Run > Run Configurations...
Execute on Device
Configurationtab and set
Hostoption with the board IP address.
Run. The application is deployed on board and is started.
Get the full technical documentation to develop your first apps.
Leverage the curated developer resources from MicroEJ to enrich your apps with powerful new features.
Learn about the MicroEJ Firmware and their flavors. This MicroEJ Firmware is BLUE.
Publish your app. Show what you can do with MicroEJ Studio! Upload your app to MicroEJ Store.
To get access to debug traces: