Development Process¶
G3 module applications are typically created using a desktop development environment that supports cross-compilation to the Arm instruction set (API) and the embedded Linux Application Binary Interface (ABI). There are several reasons for this:
There are better tools, often GUI based, on the desktop.
You can often develop most of the application and test it on the desktop at higher speeds resulting in seriously increased productivity.
The target is space constrained, so it does not have a compiler suite installed1.
Compiling decent-sized applications on the target can be excruciatingly, glacially slow2.
The desktop environment also supports on-target debugging.
Footnotes:
- 1
Actually, there is a compiler on the SD card image but not the eMMC image. This is because the SD card image is intended for product development while the eMMC image is intended for shipping products. In any event, the toolchain provided on the SD card image does not have a complete set of include files due to space limitations. This can be worked around as discussed here.
- 2
This can be worked around using a distcc based build farm. However, that is beyond the scope of this manual.
Development Environment Options¶
There are four possible options for setting up a development environment to build applications for the G3 module. They are listed below in decreasing order of recommendation for practical use:
Option |
Description |
---|---|
Use the Yocto SDK and GUI toolkit on a Linux desktop |
|
Use the Reach Technology G3 Developer VM on |
|
Use NFS to mount the Yocto SDK on the target |
|
Windows Desktop |
Run the environment directly on Windows… just say no |
Footnotes:
- 3
Technically, the Reach Technology G3 Developer VM can be run on any host that supports VirtualBox and has the requisite physical resources. However, our primary goal is to accommodate the hoards of developers out there that are stuck on
Windows 10
for whatever reason.If you want to rapidly start development on a Linux host, the Reach Technology G3 Developer VM may be a faster path to get started than installing all the tools natively.
Linux Desktop Development¶
This is the recommended development option for several reasons:
It’s easier to setup and maintain.
It’s generally more performant with lower hardware requirements.
Has no potential source code file line ending or POSIX permission issues.
Has no potential case-blind filesystem issues.
The host uses compilers similar to those on the target so it’s easy to debug many executables right on your desktop so long as they do not use target specific hardware.4
It is much closer to the target environment so it’s easy to test things like any required shell scripts or configuration files right on your desktop.
There are almost no issues with non-deterministic enumeration of USB->serial convertors.5
However, not everyone has the option (or preference) of setting up a Linux machine to develop the end product application for the G3 module. If this is the option you’d like to choose, see Linux Desktop Installation and Linux Desktop Configuration.
Item |
Requirement |
---|---|
CPU |
2 core, hyper-threaded i5 or better (4 hardware threads) |
RAM |
8GB or better |
DISK |
250GB or better (SSD preferred) |
NIC |
100Mbit or Gbit ethernet |
OS |
Linux Mint 20 XFCE, Gentoo AMD64 17.1 Multi-lib XFCE, Ubuntu 18.046 |
Footnotes:
- 4
This can be worked around using “mock” routines to simulate hardware responses during early development.
- 5
So long as USB->serial convertors stay in the same USB port (or hub port), they will always enumerate in the same order. This is not always true with
Windows 10
.- 6
The G3 module specific Yocto SDK has been tested and is known to work on these Linux distros. NO other distros are supported.
VirtualBox7 VM Development¶
This development option generally works better for all but the smallest of
projects than on target development; however, there are a number of potential
“gotchas” that must be avoided. If this is the option you’d like to choose,
see here and here
for Windows 10
desktop installation and configuration directions.
This development option works well on Windows, Mac or Linux platforms with all the benefits - and drawbacks - of a VM.
The benefits are:
The VM operating system runs independently of the host operating system.
The VM is preconfigured with all necessary toolchain installations and sample configuration to enable the target hardware.
The drawbacks are:
The required resources are higher than running a Linux host.
USB enumeration can be problematic.
Opens up the possibility of line ending character problems.
Opens up the possibility of POSIX permission incompatibility problems in the host filesystem.
Opens up the possibility of case blind filesystem problems.
The Reach Technology G3 Developer VM runs Linux Mint 20 XFCE (an Ubuntu derivative without the bloated, bug-infested and almost universally despised Unity desktop) internally.
Item |
Requirement |
---|---|
CPU |
4 core, hyper-threaded i5 or better (8 hardware threads) |
RAM |
16GB or better |
DISK |
500GB or better (SSD preferred) |
NIC |
100Mbit or Gbit ethernet |
VirtualBox Version |
6.1.16 or newer (with the matching Extension Pack) |
Footnotes:
On Target Development¶
This option is suitable only for very small applications or quick fix recompilation and relinking on target. It’s also commonly used when developing your end product application in Python3 using extensions that are coded in C or C++ for speed. You still have to install the Yocto SDK on a Linux host,8 just as in the Linux desktop development option. Also, the SDK needs to be exported via NFS so that it can be mounted on the target, mostly for access to include files.
If you need to do minimal compilation and linking on target, or you are developing in Python3 and using “native” extension packages, see On Target Installation and On Target Configuration for directions.
Footnotes:
- 8
Never ever ever attempt to host the SDK from a Windows (any flavor) host. Although you can find some documentation about setting up the Yocto SDK on a Windows host, just say, “No.” It just doesn’t work.
You can setup the Reach Technology G3 Developer VM on a
Windows 10
host in a way that the SDK can be exported to the target.
Next Steps¶
Once you’ve selected and setup your preferred development environment, please peruse the developer tools “Usage” chapter for further details for each of the available application/GUI toolkit options.