MicroEJ-SDK problem going through Getting started guide of stm32f7508 kit

Hello,

I have followed the Getting Started Guide tutorial on the stm32f7508 kit..

After going successfully through prerequisite step and 1.1 chapter, on the last step of the 1.2 section I encounter a problem when trying to run the simulation.

Go to Run > Run Configurations... > MicroEJ Application,

Select DemoWidget (SIM) launcher,

Click on the Run button.

I am not able to click on “Run” button (grayed out). Instead I have the following error on the top of the window: [

Execution]: Invalid MicroEJ location. Please check MicroEJ tab in preferences.

After checking the MicroEJ tab in preferences, the following path is set in “MicroEJ repository”:

~/.microej/repositories/MicroEJ-SDK-Dist-21.11

Is there any missing on the configuration of MicroEJ?

Thank you for your help.

----------------------- VERSION -------------------
NAME=“Linux Mint”
VERSION=“21.1 (Vera)”

MicroEJ® SDK
Dist. 21.11

Hi @fuopgua

What are the permissions of the MicroEJ repository location? Could you give us a quick ls so that we are sure that MicroEJ SDK can “see” the directory and write in it.

Thank you.
Gaëtan for MicroEJ

Repository permission is as follow:

$whoami
deadbeef
$ ls -l
total 4
drwxrwxr-x 3 deadbeef deadbeef 4096 Jun 9 17:41 MicroEJ-SDK-Dist-21.11

After few tries, I decide to re-install from scratch just to make sure I did not do anything wrong by mistake. And I get a slight different behavior now because I realize I was missing a step:

The Getting started guide mention:

Your first VEE Port is imported in your workspace and now you can build it.

Right click on stm32f7508-freertos-configuration.

Select Build Module.

The build starts. It may takes few minutes. Then the project STM32F7508-Platform-CM7hardfp_GCC48-1.5.0 is automatically refreshed and compiles without error.

After a successful build of ‘stm32f7508_freertos-configuration’ project, I previously directly skip to DemoWidget Step. But now, I am trying to build the project 'STM32F7508-Platform-CM7hardfp_GCC48-1.5.0". I have the following error when building this “Module” (Build Module):

[ERROR] Cannot find ‘module.ivy’ file for project ‘STM32F7508-Platform-CM7hardfp_GCC48-1.6.0’.

Also worth noting, now I have checkout out the latest from main branch which is tag 1.6.0

The Widget Demo project is also failing to build with following error message:

  • Problem Report:

No loaded Platform.
Possible options to load a platform are:

  • (1) Set the property platform-loader.target.platform.file to a Platform file absolute path.
  • (2) Set the property platform-loader.target.platform.dir to a Platform directory absolute path.
  • (3) Declare a dependency in module.ivy using the platform configuration (e.g. <dependency org="com.mycompany" name="myplatform" rev="M.m.p" conf="platform->default"/>).
  • (4) Copy/Paste a Platform file into the folder defined by the property platform-loader.target.platform.dropins (by default its value is dropins).
    A Platform declared using (1) or (2) is loaded prior to (3) or (4).
Full log of the build

[easyant-configure-easyant] :: Apache Ivy 2.7.0-local-20230210142119 - 20230210142119 :: Home | Apache Ivy ™ ::
[easyant-configure-easyant] :: loading settings :: file = /home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/482/data/repositories/microej-build-repository/ivysettings.xml
Loading System Plugins…
[easyant-load-module] Loading build module : /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/module.ivy
[echo] Building com.microej.demo widget with com.is2t.easyant.buildtypes#build-firmware-singleapp…
[easyant-load-module] :: loading settings :: file = /home/deadbeef/.microej/microej-ivysettings-5.4.xml

clean-std:clean:
[echo] Cleaning /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~…
[delete] Deleting directory /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~

clean-artifacts:preinit:
[echo] clean.artifacts.force.skip = true

clean-artifacts:dir-exists:
[echo] clean.artifacts.module.dir = /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/${clean.artifacts.repository}/${clean.artifacts.organisation}/${clean.artifacts.module}/${clean.artifacts.branch}

-ivy-provisioning:resolve:
[ivy:resolve] Configure microej module manager semantic cache for microEJForgeCentral resolver.
[ivy:resolve] Configure microej module manager semantic cache for microEJForgeDeveloper resolver.
[ivy:resolve] Configure microej module manager semantic cache for microEJCentral resolver.
[ivy:resolve] Configure microej module manager semantic cache for microEJLocal resolver.
[check-available-confs] Try default
[check-available-confs] Try test
[check-available-confs] Try provided

-ivy-provisioning:resolve-main-confs:
Topological sort auto enabled : true

-ivy-provisioning:resolve-test-confs:
Topological sort auto enabled : true

-ivy-provisioning:resolve-provided-confs:
Topological sort auto enabled : true

ivy-retrieve:retrieve:
[ivy:retrieve] :: retrieving :: com.microej.demo#widget [sync]
[ivy:retrieve] confs: [default]
[ivy:retrieve] 9 artifacts copied, 0 already retrieved (402kB/5ms)

-build-firmware-singleapp:init:
[mkdir] Created dir: /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/ant
[copy] Copying 3 files to /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/ant/lib
[copy] Copying /home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/482/data/repositories/microej-build-repository/org/apache/ant/ant/1.9.9/ant-1.9.9.jar to /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/ant/lib/ant-1.9.9.jar
[copy] Copying /home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/482/data/repositories/microej-build-repository/org/apache/ant/ant-launcher/1.9.9/ant-launcher-1.9.9.jar to /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/ant/lib/ant-launcher-1.9.9.jar
[copy] Copying /home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/482/data/repositories/microej-build-repository/org/apache/ant/ant-junit/1.8.4/ant-junit-1.8.4.jar to /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/ant/lib/ant-junit-1.8.4.jar

-addon-processor:post-customization:compute-application-classpath:
[ivy:retrieve-forked] :: retrieving :: com.microej.demo#widget
[ivy:retrieve-forked] confs: [default, provided, documentation, platform, vdruntime, source, dist, test]
[ivy:retrieve-forked] 13 artifacts copied, 0 already retrieved (897kB/9ms)

-addon-processor:partialCompile:
[mkdir] Created dir: /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/adppartialclasses
[echo] Warning: the following compilation may fail without consequences on the build result.
[javac] Compiling 158 source files to /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/adppartialclasses
[javac] ----------
[javac] 1. WARNING in /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/src/main/java/com/microej/demo/widget/wheel/widget/Choice.java (at line 7)
[javac] import java.util.NoSuchElementException;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import java.util.NoSuchElementException is never used
[javac] ----------
[javac] 1 problem (1 warning)

-addon-processor:run:
[adp-executor] :: loading settings :: url = jar:file:/home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/481/0/.cp/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml

-addon-processor:run:copy-main-resources:
[mkdir] Created dir: /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/main/classes

-addon-processor:run:copy-test-resources:
[mkdir] Created dir: /home/deadbeef/repos/github.com/microej/Demo-Widget/com.microej.demo.widget/target~/test/classes

platform-loader:set-use-platform-dependency:
Topological sort auto enabled : true

BUILD FAILED
Found an error when building widget

  • Where

File : /home/deadbeef/MicroEJ/MicroEJ-SDK-21.11/rcp/configuration/org.eclipse.osgi/482/data/repositories/microej-build-repository/com/is2t/easyant/plugins/platform-loader/1.3.2/platform-loader-1.3.2.ant
Line : 307 column : 55

  • Problem Report:

No loaded Platform.
Possible options to load a platform are:

  • (1) Set the property platform-loader.target.platform.file to a Platform file absolute path.
  • (2) Set the property platform-loader.target.platform.dir to a Platform directory absolute path.
  • (3) Declare a dependency in module.ivy using the platform configuration (e.g. <dependency org="com.mycompany" name="myplatform" rev="M.m.p" conf="platform->default"/>).
  • (4) Copy/Paste a Platform file into the folder defined by the property platform-loader.target.platform.dropins (by default its value is dropins).
    A Platform declared using (1) or (2) is loaded prior to (3) or (4).
  • Recommendation…

Run easyant with -verbose or -debug option to get more details.

Total time: 1 second

Once you build the -configuration project, the build result is the STM32F7508-Platform-CM7hardfp_GCC48-1.6.0 project.
You successfully built the VEE port, and you can find in Window > Preferences > MicroEJ > Platform in workspace if it is detected.

Building the application it is not the same as launching/running the application.
Building the application is akin to building a module (in this case building the application would need you to add properties in the module.ivy and you should point to STM32F7508-Platform-CM7hardfp_GCC48-1.6.0/source).

If you want to launch the application (simulated or on device) you would need to use Run Configurations..

Here are some useful links:
Launching an application:
https://docs.microej.com/en/latest/ApplicationDeveloperGuide/launches.html
Platform (former name of VEE port) creation and structure:
https://docs.microej.com/en/latest/VEEPortingGuide/platformCreation.html

Enjoy!

Platform selection for builds:
https://docs.microej.com/en/latest/ApplicationDeveloperGuide/platformSelection.html

tahnk you for all the information. So a few steps are required for running application on my host:

1# Build -configuration project

  • Build shown in the log is successful
    • and the output of this build is the content of the platform project ‘STM32F7508-Platform-CM7hardfp_GCC48-1.6.0’

From there I should see as you describe platform under the workspace directory

You successfully built the VEE port, and you can find in Window > Preferences > MicroEJ > Platform in workspace if it is detected.

First Problem: I do not see any “pltaform” file extension either under workspace or project directory:

$ pwd
/home/deadbeef/repos/github.com/microej/VEEPort-STMicroelectronics-STM32F7508-DK
$ find . -name “.zip" -o -name ".ptf” -o -name “.jpf" -o -name ".vde”
(nothing)

$ cd ~/.microej/workspaces/
$ find . -name “.zip" -o -name ".ptf” -o -name “.jpf" -o -name ".vde”
./MicroEJ-SDK-Dist-21.11/.metadata/.mylyn/repositories.xml.zip

2# Build the Widget Demo application

According to what you said, I have fixed the dependency of demo.widget by adding this new configuration of the module.ivy file of widget.demo project. The build is now successful. (I don’t still quite understand why it was not resolve automatically as mention in the getting started guide but … ok).

<ea:build organisation=com.is2t.easyant.buildtypes module=build-firmware-singleapp revision=1.+>
<ea:property name=platform-loader.target.platform.dir value=/home/deadbeef/repos/github.com/microej/VEEPort-STMicroelectronics-STM32F7508-DK/STM32F7508-Platform-CM7hardfp_GCC48-1.6.0/source/>
</ea:build>

3# Run the application (simulated)

  • Using Run configuration → MicroEJ Application → Demo Widget SIM
  • Under Execution tab, the platform is detected
    • STM32F7508-Platform-CM7hardfp_GCC48-1.6.0’

Second problem: when clicking run, I got the following log and not simulation start.

No HIL client implementor found (timeout)

Logs

=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
Invalid HIL client connected from port 43041
Exception in thread “main” @T:ej.microui.MicroUIException@: MicroUI: Issue when loading SystemMicroUI implementation class.
at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
at java.lang.Throwable.(Throwable.java:37)
at java.lang.Exception.(Exception.java:18)
at java.lang.RuntimeException.(RuntimeException.java:18)
at ej.microui.MicroUIException.(MicroUIException.java:93)
at ej.microui.MicroUI.getMicroUIImpl(MicroUI.java:133)
at ej.microui.MicroUI.(MicroUI.java:26)
at com.microej.demo.widget.common.Navigation.start(Navigation.java:47)
at com.microej.demo.widget.common.Navigation.main(Navigation.java:40)
at java.lang.MainThread.run(Thread.java:914)
at java.lang.Thread.runWrapper(Thread.java:387)
Caused by: @T:java.lang.UnsatisfiedLinkError@: No HIL client implementor found (timeout)
at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
at java.lang.Throwable.(Throwable.java:37)
at java.lang.Error.(Error.java:18)
at java.lang.LinkageError.(LinkageError.java:18)
at java.lang.UnsatisfiedLinkError.(UnsatisfiedLinkError.java:10)
at ej.trace.Tracer.(Tracer.java:111)
at ej.microui.Log.create(Log.java:78)
at ej.microui.MicroUI.(MicroUI.java:41)
at ej.microui.SystemMicroUI.(SystemMicroUI.java:24)
at ej.microui.SystemMicroUIImpl.(SystemMicroUIImpl.java:18)
at ej.microui.MicroUI.getMicroUIImpl(MicroUI.java:126)
at ej.microui.MicroUI.(MicroUI.java:26)
at com.microej.demo.widget.common.Navigation.start(Navigation.java:47)
at com.microej.demo.widget.common.Navigation.main(Navigation.java:40)
at java.lang.MainThread.run(Thread.java:914)
at java.lang.Thread.runWrapper(Thread.java:387)
Exception in thread “main” @T:java.lang.NullPointerException@
at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
at java.lang.Throwable.(Throwable.java:32)
at java.lang.Exception.(Exception.java:14)
at java.lang.RuntimeException.(RuntimeException.java:14)
at java.lang.NullPointerException.(NullPointerException.java:6)
at ej.microui.MicroUI.start(MicroUI.java:50)
at com.microej.demo.widget.common.Navigation.start(Navigation.java:47)
at com.microej.demo.widget.common.Navigation.main(Navigation.java:40)
at java.lang.MainThread.run(Thread.java:914)
at java.lang.Thread.runWrapper(Thread.java:387)
=============== [ Completed Successfully ] ===============

SUCCESS

Thanks to this post I was able to run the simulation project on my setup.

I deleted the .jar file under the directory drpoins/S3/S3/HIL*.jar.

So to clarify, the build results in an Eclipse project, there are no files, the VEE port is in the source folder of STM32F7508-Platform-CM7hardfp_GCC48-1.6.0.

The dropins folder in the -configuration project allows us to override software components during build. By removing the S3 HIL Engine file (the codename for the simulator is S3), you removed a patched version of the HIL engine that could lead to the error you got (HIL being the protocol used to communicate between the simulator and the mocks).

I’m glad you were being able to run your application on the simulator.

If you have further questions, do not hesitate to post other topics.

Thx!
Gaëtan for Microej