Skip to content

Commit

Permalink
Corrected documents than includes Linux steps
Browse files Browse the repository at this point in the history
  • Loading branch information
brianesquilona committed Nov 28, 2018
1 parent 7093e15 commit c6372ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/AUTOMATED_TESTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automated Tests

DAPLink has an extensive automated test suite. It can be run on the current development environment (Windows only) or a release package (Windows, Mac or Linux). Test results are written to the current directory and printed to the console.
DAPLink has an extensive automated test suite. It can be run on the current development environment (Windows and Linux) or a release package (Windows, Mac or Linux). Test results are written to the current directory and printed to the console.

Tests are launched by running ``python test/run_test.py`` in the Python virtual environment. The test logic discovers connected DAPLink boards and targets only those boards. Likewise, it detects what firmware you have built and targets only that firmware. Specify --help to view testing options (``run_test.py --help``).

Expand Down
52 changes: 19 additions & 33 deletions docs/DEVELOPERS-GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# DAPLink Developers Guide

## Setup
DAPLink development requires Keil MDK-ARM, which runs on Windows only. The following instructions apply to Windows. See [here](AUTOMATED_TESTS.md) for test instructions on Linux and Mac.
DAPLink sources can be compiled using Keil MDK-ARM or mbed cli tool with arm compiler, which could be run both on Linux and Windows. See [here](AUTOMATED_TESTS.md) for test instructions on both OS and Mac.

Install the necessary tools listed below. Skip any step where a compatible tool already exists.

* Install [Python 2, 2.7.11 or above](https://www.python.org/downloads/) . Add to PATH.
* Install [Git](https://git-scm.com/downloads) . Add to PATH.
* Install [Keil MDK-ARM](https://www.keil.com/download/product/), preferably version 5. Set environment variable "UV4" to the absolute path of the UV4 executable if you don't install to the default location. Note that "UV4" is what's used for both MDK versions 4 and 5.
* Install virtualenv in your global Python installation eg: `pip install virtualenv`
* Install [Keil MDK-ARM](https://www.keil.com/download/product/), preferably version 5. Set environment variable "UV4" to the absolute path of the UV4 executable if you don't install to the default location. Note that "UV4" is what's used for both MDK versions 4 and 5. This step can be skipped if you plan to use mbed cli.
* Install virtualenv in your global Python installation eg: `pip install virtualenv`.


**Step 1.** Get the sources and create a virtual environment

Expand All @@ -19,16 +20,16 @@ $ pip install virtualenv
$ virtualenv venv
```

**Step 2.** Update tools and generate project files. **This should be done every time you pull new changes**
Uvision progen compile
```Windows
**Step 2.1** For uvision progen compilation, update tools and generate project files. **This should be done every time you pull new changes**

```
$ venv/Scripts/activate
$ pip install -r requirements.txt
$ progen generate -t uvision
$ venv/Scripts/deactivate
```

Mbedcli project lists compile
**Step 2.2** For mbed cli project compilation
```
$ venv/Scripts/activate
$ pip install -r requirements.txt
Expand Down Expand Up @@ -75,24 +76,9 @@ optional arguments:
Valid projects are listed on help.

Generate files needed by mbedcli
* `custom_profile.json` Toolchain profile or compile flags parsed from the yaml files
* `custom_targets.json` Platform information for specific hics
* `.mbedignore` Filter all files not needed for the projects

Currently invoking `mbed compile` as a process.

### Changes/Additions
-Tools:
There is an intermediate step in uvision environment in creating a release directory. This step is not needed in mbedcli environment but to make this equivalent directory invoke
`copy_release_files.py --project-tool mbedcli`
To make a release directory(used by mbedcli_compile.py and uvision environment to make release directory)
`package_release_files.py SRC_DIR DEST_DIR VERSION_NUMBER --toolchain ARM`


-Test:
An option to search for the daplink firmware build in uvision and mbedcli build folders.
`run_test.py --project-tool mbedcli`

* `custom_profile.json` lists toolchain profile or compile flags parsed from the yaml files
* `custom_targets.json` contains platform information for specific hics.
* `.mbedignore` filters all files not needed for the project.

## Port
There are three defined ways in which DAPLink can be extended. These are adding target support, adding board support and adding HIC support. Details on porting each of these can be found below.
Expand All @@ -106,7 +92,7 @@ There are three defined ways in which DAPLink can be extended. These are adding
DAPLink has an extensive set of automated tests written in Python. They are used for regression testing, but you can use them to validate your DAPLink port. Details are [here](AUTOMATED_TESTS.md)

An option to search for the daplink firmware build in uvision and mbedcli build folders.
`run_test.py --projecttool mbedcli ...` or `run_test.py --projecttool uvision ...`.
`python test/run_test.py --projecttool mbedcli ...` or `python test/run_test.py --projecttool uvision ...`.

## Release

Expand All @@ -132,12 +118,12 @@ $ pip install -r requirements3.txt
$ tools/mbedcli_compile.py --release_version 0250 --release_folder firmware
```

## MDK
If you want to use the MDK (uVision) IDE to work with the DAPLink code, you must launch it in the right environment. The project will fail to build otherwise. To launch uVision properly, use ``tools/launch_uv4.bat``
There is an intermediate step in uvision environment in creating a release directory. This step is not needed in mbedcli environment but to make this equivalent directory invoke
`copy_release_files.py --project-tool mbedcli`
To make a release directory from the step above.
`package_release_files.py SRC_DIR DEST_DIR VERSION_NUMBER --toolchain ARM`

This script can take arguments to override default virtual environment and python packages to be installed.
## MDK
If you want to use the MDK (uVision) IDE to work with the DAPLink code, you must launch it in the right environment. The project will fail to build otherwise. To launch uVision properly, use ``tools/launch_uvision.bat``

For example in python 2.7
-tools\launch_uvision.bat env27 requirements.txt
In python 3.7
-tools\launch_uvision.bat env37 requirements3.txt
This script can take arguments to override default virtual environment and python packages to be installed. For example `tools\launch_uvision.bat other_env other_requirements.txt`

0 comments on commit c6372ca

Please sign in to comment.