Filter results by

Prepare Development Environment

To develop software from source code, you'll need to set up a development environment on your PC. Here we offer a couple of options that work well for us; you may come up with a better solution.

Method Looks Like This
Windows VirtualBox running Ubuntu – a general-purpose virtual machine environment, in which an ARM Linux virtual machine has been set up to run the Ubuntu Linux OS.
Linux PC running Ubuntu – a native Linux setting for running a flexible GNU development environment. This method is probably the best if you are already doing other Linux development.

Ubuntu Linux

In this article we'll be working from an Ubuntu 16.04 Linux environment.

  • If you are using a Linux PC using the Ubuntu Linux OS, you're already prepared to start installing tools. Go directly to the software section below.

  • If you are using a Windows PC, you will first need to provide a "virtual" environment. You can set up a number of virtual machines using the Oracle VirtualBox® program.

    Click for instructions to install VirtualBox and to then load the Ubuntu OS in a virtual Linux machine.

    When your installation is complete, return here and proceed with the steps below.

Locating Required Software

The clone and build procedures we provide here are taken from the GitHub build-artik repository site listed below.

In case of conflicts, consider the GitHub information as most current.

Create working directory

Create a working directory. We'll make reference to this throughout the procedures.

For example:

mkdir ~/ARTIK530S
cd ~/ARTIK530S

Access repositories

Code for ARTIK Linux-based modules is open-source. You'll find it on GitHub. You'll need to clone several repositories. Take note of the branch choices.

  • Code branches for standard modules will be named as A530_os_x.x.x, A710_os_x.x.x, etc.

  • "s" module branches will be named as A530s_os_x.x.x, A533s_os_x.x.x, or A710s_os_x.x.x

Click on the links below to view the repositories.



Repositories

For ARTIK 530s 1G modules, use artik533s files.

Boot code:
https://github.com/SamsungARTIK/u-boot-artik/

Linux code:
https://github.com/SamsungARTIK/linux-artik/

Security binaries:
https://github.com/SamsungARTIK/boot-firmwares-artik530s
https://github.com/SamsungARTIK/boot-firmwares-artik533s
https://github.com/SamsungARTIK/boot-firmwares-artik710s

Build scripts:
https://github.com/SamsungARTIK/build-artik/

Ubuntu files:
https://github.com/SamsungARTIK/ubuntu-build-service/

The easiest way to retrieve these repositories is to follow the instructions in the Build Guide of the build-artik repo. Or to learn more about the process, click to

Clone from GitHub

To clone the files to your development PC, first change to your working directory. We'll use artik530s for our example and clone the repositories under it.

Start by installing Git.

sudo apt install git

If you are going through a corporate proxy, you'll also need to specifically set the proxy information to let `git` commands make it through the proxy.

Now you can proceed to clone each repository listed. For each repo, you can click on the Clone or Download button to copy the link text to use in your clone command. Then, for linux-artik, for example:

  1. Change to your working directory.
    cd ~/artik530s
  2. Clone the repo.
    git clone https://github.com/SamsungARTIK/linux-artik.git
  3. Change to this repo directory.
    cd linux-artik
  4. Select a specific branch to work on. Here we'll use the 'A530s_os_3.0.0' branch as an example. Use the `git` command line instructions to list those branches and select the one you want.
            git branch -a
            git checkout A530s_os_3.0.0
You could also have added the branch name to the end of the clone command, like this.
git clone https://github.com/SamsungARTIK/linux-artik.git -b A530s_os_3.0.0
Make sure you return to your top-level working directory before cloning the next repo.

Copy security packages

The file bundles here are required for "s" module use. You will need to copy them into the correct locations of your workspace before you can compile the code you cloned.

Upon clicking the button to download in Procedure (below), you will be presented with a license agreement. Read it through and accept to proceed.

When you uncompress to your development PC, you'll see these files. REQ'D indicates the files that must be present in order to build a usable image.

Name req'd Description
security-b2b X TrustZone daemon
secureos.img or
fip-secure.img
X TrustWare Secure OS,
supplied as a binary image
libsee-linux-trustware X TrustWare HAL
libartik-security X* Security API library
libartik-security-dev   Security API development headers
libartik-security-test   Executable binary for testing API calls
libartik-security-doc   Optional online documentation
artikXXXs_codesigner X Local code signing tool

*Needed only if secure applications using the APIs will be running on the module.

Procedure. You need to copy certain security files into your cloned repositories.

1. Download the file set, then copy the security binary image files.

a) Click Download 530s files
and uncompress to the ~/Downloads/ARTIK530S directory.

b) From your working directory, change to the correct subdirectory.
cd boot-firmwares-artik530s

c) Copy the secureOS.
cp ~/Downloads/ARTIK530S/secureos.img .

d) Copy the code signer tool.
cp ~/Downloads/ARTIK530S/artik530s_codesigner .

e) Make the file executable.
chmod 777 artik530s_codesigner

a) Click Download 530s 1G files
and uncompress to the ~/Downloads/ARTIK533S directory.

b) From your working directory, change to the correct subdirectory.
cd boot-firmwares-artik533s

c) Copy the secureOS.
cp ~/Downloads/ARTIK533S/secureos.img .

d) Copy the code signer tool.
cp ~/Downloads/ARTIK533S/artik533s_codesigner .

e) Make the file executable.
chmod 777 artik533s_codesigner

a) Click Download 710s files
and uncompress to the ~/Downloads/ARTIK710S directory.

b) From your working directory, change to the correct subdirectory.
cd boot-firmwares-artik710s

c) Copy the secureOS.
cp ~/Downloads/ARTIK710S/fip-secure.img .

d) Copy the code signer tool.
cp ~/Downloads/ARTIK710S/artik710s_codesigner .

e) Make the file executable.
chmod 777 artik710s_codesigner

2. Copy required security packages.

a) Create a subdirectory for the security files.
cd ubuntu-build-service/prebuilt/armhf
mkdir artik530s
cd artik530s

b) Copy security packages.
cp ~/Downloads/ARTIK530S/security-b2b* .
cp ~/Downloads/ARTIK530S/libsee* .

a) Create a subdirectory for the security files.
cd ubuntu-build-service/prebuilt/armhf
mkdir artik533s
cd artik533s

b) Copy security packages.
cp ~/Downloads/ARTIK533S/security-b2b* .
cp ~/Downloads/ARTIK533S/libsee* .

a) Create a subdirectory for the security files.
cd ubuntu-build-service/prebuilt/arm64
mkdir artik710s
cd artik710s

b) Copy security packages.
cp ~/Downloads/ARTIK710S/security-b2b* .
cp ~/Downloads/ARTIK710S/libsee* .

3.  Optionally, incorporate other security development packages as needed.

libartik-security_*
libartik-security-dev*
libartik-security-test*
libartik-security-doc*

You have a choice in how to use them:

  • Copy them into the same directory where you put the required packages; they will become part of your final image. You will likely want to do this only for libartik-security_* to use security API calls in your applications.

  • Build and load the image to your ARTIK board, then copy just the files you want for development to the board and use the following command to install them.
    dpkg -i libartik-security-*

Optional support software

You may need additional software installations. Refer to the links below for details.

ARTIK SDK – ARTIK API calls

E2E software – device management client, OTA client, Edge node manager, etc.

Cross-compilation toolchain

For either a pure Linux environment or a Windows/VirtualBox emulated environment, you'll need to do a small amount of setup that is covered in the repository Build Guide for your module type. Start with our steps below, then go to your selected repository branch on GitHub to follow the Build Guide steps.

  1. Add necessary support packages.
    sudo apt update
    sudo apt install kpartx u-boot-tools device-tree-compiler android-tools-fsutils

  2. Install the appropriate ARM toolchain for your module development.
    For ARTIK 710/710s (64-bit):
    sudo apt install gcc-aarch64-linux-gnu
    For ARTIK 530/530s (32-bit):
    sudo apt install gcc-arm-linux-gnueabihf

You're ready now to start modifying and compiling code in the next article.

Last updated on: