> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/adk-os-platform/readme/developing-applications/developer-setup.md).

# Developer Setup

## Host PC Requirements

A minimum hardware requirement for the host PC is as follows:

* modern PC hardware (e.g. younger than Intel Core 4th generation)
* HDD size minimum 80GB
* RAM size of minimum 8GB

### Recommended Environment

* Native Linux machine
* Windows PC with Linux-VM (VirtualBox)

In case of Linux, a Debian based distribution is required because of the install package management system. Recommendation is to use [Linux Mint](https://linuxmint.com/download.php) (no preference in regards to download variant Cinnamon, Mate or XFCE).

## Toolchain Setup

* Install toolchain (compiler, debugger, ...)
* Packaging Tool (packman)

## System Development Kit

* Install SDK

## Integration with IDE

Suggested IDE is [Visual Studio Code](https://code.visualstudio.com/), which can be obtained by package manager inside the Linux distribution or directly by downloading installer packages from the website. This IDE is very customizable to your needs and thus powerful to fit your workflow.

It's recommended to install the "[clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd)" extension from the extensions panel (sidebar icon) inside Visual Studio Code.

### Configure Project Compilation

To get a nice integration of the **make** build system, it's recommended to install [**bear**](https://manpages.ubuntu.com/manpages/bionic/man1/bear.1.html) from your Linux distributions package manager. This tool parses the compiler output and generates compilation database for clangd tooling.

Inside Visual Studio Code you can define custom tasks to be executed on demand, like "make vos3-release" or "make clean". So-called "problemMatchers" can be configured to parse the task output. This can for example be used to jump directly to compilation errors. To run a task, simply hit F1 key, type in "run task" and hit enter key. You should now see a list of your configured tasks. Select the desired task and confirm with enter key.

To do that, create a file **.vscode/tasks.json** inside your project folder. Following file is an example:

<details>

<summary><strong>tasks.json</strong></summary>

```json
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "make dist",
            "type": "shell",
            "command": "bear -- make dist",
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "make clean",
            "type": "shell",
            "command": "make clean",
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Upload to Terminal",
            "type": "shell",
            "command": "mxdownload 192.168.0.2 dist/dl.vos3_demo.tar",
            "dependsOn": [ "make dist" ]
        }
    ]
}
```

</details>

### Configure Project Debugging

You can configure to use Visual Studio Code directly for remote debugging on the terminal. This configuration is done in a configuration file called **.vscode/launch.json**. Important part of this configuration is the parameter **miDebuggerServerAddress**. This is where you need to configure the remote IP address of your running gdbserver on the terminal.

Following file is an example to debug binary vos3demo on remote host 192.168.0.2 at running gdbserver port 22222:

<details>

<summary><strong>launch.json</strong> Expand source</summary>

```
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "VOS3 SDI Server",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/vos3-debug/vos3demo",
            "miDebuggerServerAddress": "192.168.0.2:22222",
            "MIMode": "gdb",
            "miDebuggerPath": "/opt/vos3/bin/arm-none-linux-gnueabihf-gdb",
            "cwd": "${workspaceRoot}",
            "additionalSOLibSearchPath": "${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}/lib:${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}/usr/lib:${workspaceFolder}/vos3-debug",
            "logging": {"moduleLoad": true},
            "environment": [
                {
                    "name": "vos3_SYSROOT_SUBDIR",
                    "value": "sdk-19"
                }
            ],
            "symbolLoadInfo": {
                "loadAll": true,
                "exceptionList": ""
            },
            "setupCommands": [
                {
                    "text": "handle SIGILL pass nostop noprint",
                    "ignoreFailures": true
                },
                {
                    "text": "-gdb-set sysroot ${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}",
                    "ignoreFailures": false
                },
                {
                    "text": "-gdb-set solib-absolute-prefix ${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}",
                    "ignoreFailures": false
                },
                {
                    "text": "-gdb-set solib-search-path ${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}/lib:${env:HOME}/sdk/vos3/${env:vos3_SYSROOT_SUBDIR}/usr/lib:${workspaceFolder}/vos3-debug",
                    "ignoreFailures": false
                },
                {
                    "text": "-gdb-set breakpoint pending on",
                    "ignoreFailures": false
                },
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}
```

</details>

## Other Tools

| **Tool**                      | **Purpose**                                      | **Source**                                                                                                             |
| ----------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| **Fastboot Tools**            | bootloader commands                              | [SDK Platform Tools release notes \| Android Developers](https://developer.android.com/studio/releases/platform-tools) |
| **mxdownloader**              | Downloader tool for Netloader installation       | Verifone                                                                                                               |
| **packman**                   | package creation and simulation signing          | Verifone                                                                                                               |
| **Compiler suite**            | VOS3 pre-built compiler toolchain                | Verifone                                                                                                               |
| **Production signing portal** | All signing will be done through signing portals | Verifone                                                                                                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/adk-os-platform/readme/developing-applications/developer-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
