Newer
Older
+++
date = "2018-10-17"
weight = 100
title = "Apertis Development Environment"
aliases = [
"/old-wiki/SDK"
]
+++
Apertis provides tools to aid with the development of applications using the
[Canterbury application framework]( {{< ref "canterbury-legacy-application-framework.md" >}} ),
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
which help with the building of applications targeting a hardware platform;
the installation of development versions of the application to the target
device and debugging of the application.
These tools are pre-installed in the Apertis SDK. The SDK images shipped by
Apertis are meant to be run in [VirtualBox]( {{< ref "/virtualbox.md" >}} ).
They provide a common, reproducible environment to build both platform
packages and application-bundles for Apertis.
# Building and debugging app bundles with ade
The following steps can be used to cross-compile an example "Hello World"
agent, deploy it onto the target device and debug it remotely using `gdb` using
the Apertis helper tool called `ade`:
- Setup the `HOST` environment variable for the address of your target board:
<!-- end list -->
HOST=<target IP address or hostname>
- Install sysroot for target board. This will default to installing a sysroot
for `armhf`, using the distribution and release of the current SDK, specify
using the command line arguments if this is not what is required (see
`ade sysroot install --help` for more information):
<!-- end list -->
ade sysroot install
- Create a ssh RSA key (using the legacy PEM format), accepting the default
settings so as not to require any password to access the target board
over SSH and copy it to the target:
<!-- end list -->
ssh-keygen -t rsa -m PEM
ssh-copy-id user@$HOST
- Clone the example application:
<!-- end list -->
git clone https://gitlab.apertis.org/sample-applications/helloworld-simple-agent.git
cd helloworld-simple-agent
- Get `ade` to configure, build and install the application on the target:
<!-- end list -->
ade configure --debug --device user@$HOST
ade export
ade install --device user@$HOST
- Before starting to debug of target, we need to ensure that `gdbserver` is
installed on the remote device:
<!-- end list -->
ssh user@$HOST "sed -e '/target/!d' -e 's/target/development/' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/development.list"
ssh user@$HOST "sudo apt update && sudo apt install gdbserver"
- The following command will start remote debugging:
<!-- end list -->
ade debug --device user@$HOST