-
Qt 5.5.1
Download from qt.io.
For Linux, use package "Qt 5.5.1 for Linux 64-bit".
For Windows, use package "Qt 5.5.1 for Windows 32-bit (MinGW 4.9.2)"
-
J-Link SDK 5.02k
Download from SEGGER, not publicly available.
Other versions can probably be used, but the qmake file for the J-Link plugin must be changed accordingly.
The build uses 3 directories:
- source code directory (git checkout)
- build directory
- release directory
We will refer to these directories in the rest of this documentation as {SRCDIR}, {BUILDDIR} and {RELEASEDIR}. {RELEASEDIR} must be an absolute path.
The Qt installation directory will be referred to as {QTDIR}.
SAM-BA can be built either using command-line commands or using Qt Creator.
-
Checkout the source in {SRCDIR}
-
Create directory {BUILDDIR}
-
(optional) Change path of J-Link SDK in
plugins/connection/jlink/jlink.pro
-
Go in directory {BUILDDIR} and run
{QTDIR}/5.5/gcc_64/bin/qmake -r {SRCDIR}/sam-ba.pro
. This will generate the makefiles in {BUILDDIR} from the qmake templates in the source tree. -
Go in directory {BUILDDIR} and run
make INSTALL_ROOT={RELEASEDIR} install
-
The release material should now be present in {RELEASEDIR} directory.
-
Checkout the source in {SRCDIR}
-
Create directory {BUILDDIR}
-
(optional) Change path of J-Link SDK in
plugins\connection\jlink\jlink.pro
-
Go in directory {BUILDDIR} and run:
{QTDIR}\5.5\mingw492_32\bin\qmake -r {SRCDIR}\sam-ba.pro
. This will generate the makefiles in {BUILDDIR} from the qmake templates in the source tree. -
Add MingW32 directory to path:
set path=%path%;{QTDIR}\Tools\mingw492_32\bin
-
Go in directory {BUILDDIR} and run:
mingw32-make INSTALL_ROOT={RELEASEDIR} install
-
The release material should now be present in {RELEASEDIR} directory.
-
Start Qt Creator
-
Load
sam-ba.pro
from {SRCDIR} -
Select kit "Desktop Qt 5.5.1 GCC 64bit" and click "Configure Project"
-
(optional) Change path of J-Link SDK in
plugins/connection/jlink/jlink.pro
. -
(optional) In the bottom of the left toolbar, click on the "sam-ba Release" or " sam-ba Debug" icon to select the desired build configuration.
-
Click on the "Projects" icon in the left toolbar
-
Select "Build" from the "Build | Run" selector below the kit name
-
Set the "Build directory:" field to {BUILDDIR}
-
Select "Run" from the "Build | Run" selector below the kit name
-
In "Deployment", click "Add Deploy Step" and select "Make"
-
In "Make arguments:" fields, type:
INSTALL_ROOT={RELEASEDIR} install
-
In the "Build" menu, click "Build All"
-
Click "4 Compile Output" at the bottom of the screen to see the build progress
-
Once the build is complete, in the "Build" menu, click "Deploy All"
-
The release material should now be present in {RELEASEDIR} directory.
-
Start Qt Creator
-
Load
sam-ba.pro
from {SRCDIR} -
Select kit "Desktop Qt 5.5.1 MingW 32 bit" and click "Configure Project"
-
(optional) Change path of J-Link SDK in
plugins\connection\jlink\jlink.pro
. -
(optional) In the bottom of the left toolbar, click on the "sam-ba Release" or " sam-ba Debug" icon to select the desired build configuration.
-
Click on the "Projects" icon in the left toolbar
-
Select "Build" from the "Build | Run" selector below the kit name
-
Set the "Build directory:" field to {BUILDDIR}
-
Select "Run" from the "Build | Run" selector below the kit name
-
In "Deployment", click "Add Deploy Step" and select "Make"
-
In "Make arguments:" fields, type:
INSTALL_ROOT={RELEASEDIR} install
-
In the "Build" menu, click "Build All"
-
Click "4 Compile Output" at the bottom of the screen to see the build progress
-
Once the build is complete, in the "Build" menu, click "Deploy All"
-
The release material should now be present in {RELEASEDIR} directory.