-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
145 lines (79 loc) · 3.25 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
RawLogger (Garmin ConnectIQ) App
================================
Build and installation instructions
Please note these instructions are targeted towards *nix (Linux or Mac OS X)
command-liners (CLI).
If you are more comfortable with Windows or a Graphical User Interface (GUI),
please refer to the Garmin ConnectID Programmer's Guide:
URL> https://developer.garmin.com/connect-iq/programmers-guide/
Pre-Requesites
--------------
Download and install (decompress) the Garmin ConnectIQ SDK from Garmin website:
URL> https://developer.garmin.com/connect-iq/sdk/
From here, we'll assume the SDK is located (decompressed) in:
PATH> /opt/connectiq-sdk-linux
Get hold of RawLogger source code:
URL> https://github.com/cedric-dufour/connectiq-app-rawlogger
If you haven't already done so, generate a ConnectIQ developer key:
CLI> UMASK=$(umask); umask 077 # you developer key is SECRET!
CLI> mkdir ~/.secret
CLI> openssl genrsa \
-out ~/.secret/GarminConnectIQ-developer-key.pem 4096
CLI> openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER \
-in ~/.secret/GarminConnectIQ-developer-key.pem \
-out ~/.secret/GarminConnectIQ-developer-key.der
CLI> umask ${UMASK}
Build Environment
-----------------
We'll be using GNU make to build and install the project:
URL> https://www.gnu.org/software/make/
The following environment variables are available for you to fine-tune the
build environment:
CIQ_ROOT := /opt/connectiq-sdk-linux
Garmin ConnectIQ SDK installation folder
CIQ_MONKEYC := ${CIQ_ROOT}/bin/monkeyc
Monkey C compiler
CIQ_SIMULATOR := ${CIQ_ROOT}/bin/simulator
ConnectIQ simulator
CIQ_MONKEYDO := ${CIQ_ROOT}/bin/monkeydo
ConnectIQ simulation launcher
CIQ_SDK := 2.4.0
Target SDK version
CIQ_DEVICE := d2charlie
Target device
CIQ_DEVKEY := [no default]
(please see the Makefile.ciq file for more details)
A little help before getting started may be welcome:
CLI> make help
Debug Build and Simulation
--------------------------
Build the project, including debug symbols:
SH> export CIQ_DEVKEY=~/.secret/GarminConnectIQ-developer-key.der
SH> make debug
Launch the project in the device simulator:
SH> make run-debug
Release Build and Installation
------------------------------
Build the project, excluding debug symbols:
SH> export CIQ_DEVKEY=~/.secret/GarminConnectIQ-developer-key.der
SH> make release
Connect your device via USB (as USB storage) and install the application:
SH> export DESTDIR=/path/to/device # NOT including /Garmin/Apps sub-path
SH> make install
Alternate devices
-----------------
RawLogger is being developed primarily for and using a D2 Charlie device.
However, you can readily build and install it on any "compatible" device
(featuring ConnectIQ 2.1 and above), e.g. the Fenix 5X:
SH> export CIQ_DEVICE=fenix5x
SH> export CIQ_SDK=2.4.0
Enjoy!
------
See the USAGE file for usage instructions.
Quirks
------
On Debian 8 (Jessie), you will need the libjpeg8 package from Debian 7 (Wheezy)
to be able to run the ConnectIQ simulator:
URL> https://packages.debian.org/wheezy/libjpeg8
On Debian 9 (Stretch), you will also need the libpng12-0 package from Debian 8 (Jessie):
URL> https://packages.debian.org/jessie/libpng12-0