# VEE Port for Actions ATS3085S/E_DEMO_DVB

This project is used to build a VEE Port for the ATS3085S/E_DEMO_DVB
development board.

![Board Front](./images/actions_ats3085s_board_HD.jpg "Board Front")

## Related Files

This directory also contains:

* [CHANGELOG](./CHANGELOG.md) to track the changes in the VEE Port for ATS3085S/E_DEMO_DVB 
* [RELEASE NOTES](./RELEASE_NOTES.md) to list:

  - the supported hardware,
  - the known issues and the limitations,
  - the development environment,
  - the list of the dependencies and their versions.

* [README BSP](bsp/README.md) recommended for users familiar with the
ATS3085S SDK/BSP and advanced usage on how to customize the build
process, debugging and profiling.

## Board Technical Specifications

| Property                | Value                           |
| ----------------------- |---------------------------------|
| Name                    | ATS3085S/E_DEMO_DVB             |
| Revision                | V1.1                            |
| MCU part number         | ATS3085S                        |
| MCU architecture        | ARM Cortex-M33                  |
| MCU max clock frequency | 192 MHz                         |
| Internal flash size     | 0B                              |
| Internal SRAM size      | 1168 KB                         |
| External flash size     | 16 MB                           |
| Internal PSRAM size     | 8 MB                            |
| Power supply            | 5V                              |

Please, contact Actions to get further documentation on the board and the MCU.

## VEE Port Specifications

The Architecture version is `8.1.1`.

This VEE Port provides the following Foundation Libraries:

| Foundation Library  | Version |
| ------------------- |---------|
| EDC                 | 1.3     |
| EVENT               | 2.1     |
| BON                 | 1.4     |
| BLUETOOTH           | 2.2     |
| KF                  | 1.7     |
| FS                  | 2.1     |
| MICROUI             | 3.6     |
| MICROVG             | 1.5     |
| SNI                 | 1.4     |
| TRACE               | 1.1     |
| WATCHDOG            | 1.0     |

The VEE_PORT is derived into:

- a Multi-Sandbox VEE Port

## Requirements

- PC with any system among Windows, Linux or macOS
- Internet connection to [MicroEJ Central Repository](https://developer.microej.com/central-repository/)
- [SDK6 Installation](https://docs.microej.com/en/latest/SDK6UserGuide/install.html)
- ATS3085S/E_DEMO_DVB board
- Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) 
- [SEGGER J-Link Debug Probe](https://www.segger.com/products/debug-probes/j-link/)
- Install [J-Link software pack](https://www.segger.com/downloads/jlink/)

## VEE_Port Setup

[Open the VEE Port project in your favorite IDE](https://docs.microej.com/en/latest/SDK6UserGuide/importProject.html) 
by selecting the root folder of the repository.

The project contains the following subprojects:

- `vee-port`: Contains the VEE Port configuration description. 
  Some modules are described in a specific sub-folder / with some optional configuration files
  (`.properties` and / or `.xml`).

- `bsp`: Contains a ready-to-use BSP software project for the ATS3085S/E_DEMO_DVB board, an implementation of MicroEJ Core Engine (and extensions) port on Zephyr and the ATS3085S/E_DEMO_DVB board support package.

- `vee-port/extensions/front-panel`: Contains the board description and images for the Simulator. 
  This project is updated once the VEE Port is built.

- `vee-port/mock`: Contains a Mock. This project is updated once the VEE Port is built and depends of the VEE Wear mock module.

- `app`: Contains a sample application which uses the VEE Port. The app launches plenty of coloured rectangles which move on the screen.

By default, the VEE Port is configured as a Multi-Sandbox Evaluation
VEE Port (Please refer to the [RELEASE NOTES](./RELEASE_NOTES.md) limitations section for more details).

## Run an Application on the Simulator

To run an Application on the Simulator, the BSP or C/C++ Toolchain are not required.

- Run the `app` sample Application [on the Simulator](https://docs.microej.com/en/latest/SDK6UserGuide/runOnSimulator.html).
  This automatically builds the VEE Port and uses it.

The build may take several minutes.
The first time, the VEE Port build requires to download modules that are available on the MicroEJ Central Repository.

Wait for the Application start, or for the final message:

```console
BUILD SUCCESSFUL
```

## BSP & Toolchain setup

The VEE Port contains the Actions SDK, located in `bsp/sdk/`. 

The Actions SDK is based on `Zephyr v2.7`, the build process can be divided into 2 main phases: a configuration phase (driven by `CMake`) and a build phase (driven by `ninja`). The compiler used is `gcc-arm-none-eabi`, part of the Arm GNU toolchains.

Refer to this [documentation](https://docs.zephyrproject.org/latest/build/cmake/index.html) to get more information about the Zephyr build system.

The VEE Port provides a Dockerfile that sets up the environment, including the toolchain setup (CMake, ninja, Compiler, python). At first build, a Docker image is built from this file, then a container is created from it, our project is compiled inside this isolated environment.

Refer to the [Docker website](https://www.docker.com/) for further information.

Install Docker Desktop and keep it open while you're building new applications.

_Note_: If you change your folders or if you change between Windows to WSL, you may need to delete the ongoing container.

## Board Setup

Here is the board setup you should follow:

![Board Front connectors](./images/actions_ats3085s_board_HD_info.jpg "Board Front connectors")

### Power Supply

The board is powered by the USB-C cable, please, mind to switch on the button.

### Programming

Connect your J-Link probe to the board (SWD connector and VCC) with wires as this image shows: 

![JLink Probe Connector](./images/jlink_connector.png "JLink Probe Connector")

This JLink Probe will be used for programming and debugging the device.

The ATS3085S/E_DEMO_DVB board can be flashed via the J-Link Commander. You need to add the Actions device to the JLink Devices, besides, on Windows you have to integrate JLink in your System variables.
Follow these steps regarding your OS:

**On Windows:**

Add your JLink software package in the environment variables by following these steps:
1. Press **Win + R**, type `sysdm.cpl`, and hit Enter.
2. Go to the **Advanced tab**.
3. Click **Environment Variables**.
4. Under **System variables**, find and select `Path`, then click **Edit**.
5. Add your path `C:\Program Files\SEGGER\JLink_VXXXx` and click **OK**


_Note_: Some conflicts may happen with other paths, to solve it, move up your variable to the top of the list.

Add the Actions device to your JLink devices, run this command with your `<User>` name from the VEE Port root:

```sh
xcopy "bsp\tools\JLinkDevices\" "C:\Users\<User>\AppData\Roaming\SEGGER\JLinkDevices" /E /I
```

**On Linux:**

```sh
cp -r bsp/tools/JLinkDevices/ $HOME/.config/SEGGER/JLinkDevices
```

**On macOS**

```sh
cp -R bsp/tools/JLinkDevices/ $HOME/Library/Application\ Support/SEGGER/JLinkDevices
```

### Logs Output

This VEE Port uses the UART0 port of the ATS3085S to log. To do so, connect to these GPIO:

| GPIO       | Name           |
| ---------- | -------------- |
| GND        | GND            |
| GPIO63     | UART0 TX       |
| GPIO62     | UART0 RX       |

A COM port is automatically mounted when the board is plugged into a computer using a USB-FTDI cable. All board logs are available through this COM port.
The COM port uses the following parameters:

| Baudrate | Data bits | Parity bits | Stop bits | Flow control |
| -------- | --------- | ----------- | --------- | ------------ |
| 2000000  | 8         | None        | 1         | None         |

## Run an application on device

This section requires that you have followed the BSP & Toolchain and the Board setups.

An evaluation license is needed for building an Application. Please refer to
https://docs.microej.com/en/latest/SDK6UserGuide/licenses.html#evaluation-licenses
for information on how to acquire and activate a license.

- Run the `app` sample Application [on Device](https://docs.microej.com/en/latest/SDK6UserGuide/runOnDevice.html).
  This automatically builds the VEE Port and uses it.

The build may take several minutes.  
The first time, the VEE Port build requires to download modules that are available on the MicroEJ Central Repository.  
The VEE Port will also build the `bsp` project and link it with MicroEJ VEE and the Application to produce an executable.

Wait for the Application start, or for the final message:

```console
BUILD SUCCESSFUL
```

The provided application should display coloured rectangles and output the following on the [logs interface](#logs-output):
```console
MicroEJ START
Hello World from Java!
```

## Testsuite Configuration

To be added on next releases.

## Troubleshooting

None

---
_Markdown_  
_Copyright 2024-2025 MicroEJ Corp. All rights reserved._  
_MicroEJ Corp. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms._  