Garmin Connect IQ-Start build simulator on command line

How to build the program and start the simulator on the command line.

Build

The command has the following form.

java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar 'SDK jar file' -o 'Executable output file name (extension is prg)' -w -y 'Developer key' -d 'Device name' -f 'monkey.jungle filename'

ユーザーが指定するものは以下の5項目。

  • Connect IQ SDK jar file
  • Executable output file name (extension is prg)
  • Developer key file name
  • Device name
  • Monkey.jungle filename

Connect IQ SDK jar file

After 3.2, the SDK is stored in the following folder.

%APPDATA%garminGarminConnectIQSdks

Also used in Eclipse
(Or it is specified as Current SDK in SDK Manager)

The SDK is described in the following file.

%APPDATA%garminGarminConnectIQcurrent-sdk.cfg

In my environment, the following path names are specified.

C:Users\usr2\AppData\Roaming\Garmin\ConnectIQ\Sdksconnectiq-sdk-win-3.2.3-2020-10-13-c14e609bd
The jar file used in the build will use binmonkeybrains.jar starting from the above folder (hereinafter referred to as SDK base).

Executable output file name

If the extension is prg, there seems to be no problem in creating it in any folder.

Developer key file name

Specify the file specified in the Eclipse settings.

Device name

The program seems to be created for each device.
There is no program that is common to all devices. Therefore, it is necessary to directly specify the device to operate.

For the device name, use the product name described in manifest.xml in the Eclipse project.

Monkey.jungle filename

Specify the monkey.jungle file name in the eclipse project.

Supplementary information

For the build command, I refer to the output result that appears on the console screen when the program is started in Eclipse, so please refer to that when actually running it.

Simulator

Start-up

The executable format of the simulator is “SDK base\binsimulator.exe”.
Start this first.
When the simulator is running, specify the Garmin program and device name from the command line as follows.

SDK base\binmonkeydo.bat 'Program name' 'Device name'
  • Program name
    File name with extension ‘prg’ created by build operation.
  • Device name
    The same string as the device name specified in the build.
    fr45 etc.

The program and device information are loaded on the running simulator, and the simulator operates.

Stop

To stop the simulator itself, press “File-Quit” to stop the simulator window.
To stop only the program in the simulator, select “File-Kill Device”.

This clears the device and program running in the window, allowing “monkeydo.bat” to call another device and program.

コメント

Copied title and URL