You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DAPlink is an open source project that implements the embedded firmware required for a Cortex debug probe. The project is hosted on GitHub and is published under an Apache 2.0 license, making it attractive for commercial developments.
4
4
5
5
The software project is complemented by a series of reference designs for creating the DAPLink debug probe hardware, which is available [here](https://docs.mbed.com/docs/mbed-hardware-development-kit/en/latest/).
6
6
7
-
## DAPLink features
7
+
###DAPLink features
8
8
9
9
A DAPLink debug probe connects to your host computer through USB and connects to your target system (the one to be programmed and debugged) through a standard [Cortex debug connector](http://infocenter.arm.com/help/topic/com.arm.doc.faqs/attached/13634/cortex_debug_connectors.pdf). It provides three main features - all over a single USB connection.
10
10
11
-
### HID interface
11
+
####HID interface
12
12
13
-
The driver-less HID interface provides a channel over which the CMSIS-DAP debug protocol runs. This enables all the leading industry standard toolchains to program and debug the target system.
13
+
The driver-less HID interface provides a channel over which the CMSIS-DAP debug protocol runs. This enables all the leading industry standard toolchains to program and debug the target system.
14
14
15
15
Supported tools include:
16
16
17
17
* Keil MDK.
18
18
* IAR Workbench.
19
19
* pyOCD.
20
20
21
-
### USB disk drag and drop programming
21
+
####USB disk drag and drop programming
22
22
23
23
DAPLink debug probes appear on the host computer as a USB disk. Program files in binary (``.bin``) and hex (``.hex``) formats can be copied onto the USB disk, which then programs them into the memory of the target system.
24
24
25
25
<spanclass="notes">**Note:** The DAPLink probe needs to contain the programming algorithms specific to the target system. Therefore, the version of the DAPLink firmware you use must match the target system.</span>
26
26
27
-
## USB serial port
27
+
###USB serial port
28
28
29
29
The DAPLink debug probe also provides a USB serial port, which can be bridged through to a TTL UART on the target system.
30
30
The USB serial port will appear on a Windows machine as a COM port, or on a Linux machine as a /dev/tty interface.
31
31
32
32
For more information on configuring your host computer to use this feature, please [see here](../getting_started/serial_communication.md).
Copy file name to clipboardExpand all lines: docs/test_debug/compile_time_errors.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Compile time errors
1
+
##Compile time errors
2
2
3
3
Compile time errors and warnings that incorrect syntax, or misuse of variables or functions, causes. An error prevents the compile process from completing (and therefore no binary file will be created). A warning does not prevent the binary from being created, but you should still review the warning because it may mean that your code is not going to do what you had intended.
4
4
@@ -9,4 +9,4 @@ Common errors are:
9
9
* Missing quotes or brackets (`""`, `()`, `[]` or `{}`). These are used in pairs to contain various types of statement. The compiler reports an error if you have not used them in correct pairings.
10
10
* Always tackle the first reported error because later errors may be as a result of the first one and will disappear you correct the first one.
11
11
12
-
If you see a compile time error or warning that you do not understand, you can usually find explanations of the error message on Google, or post to the [mbed forums](https://developer.mbed.org/questions/).
12
+
If you see a compile time error or warning that you do not understand, you can usually find explanations of the error message on Google, or post to the [mbed forums](https://developer.mbed.org/questions/).
Copy file name to clipboardExpand all lines: docs/test_debug/debug_builds_cli.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# Producing debug builds with mbed CLI
1
+
##Producing debug builds with mbed CLI
2
2
3
3
After you've set up your [local debug toolchain](toolchain.md), you'll need firmware that includes program symbols (an `.elf` file). Because the Online Compiler only produces binaries that omit the program symbols, you need to compile locally using [mbed CLI](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/cli/).
4
4
5
5
<spanclass="notes">**Note:** Make sure to do a clean build when switching to and from debug and release by removing the `BUILD` folder.</span>
You can also enable debug symbols when [exporting your project](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/cli/#exporting-to-desktop-ides) by using:
At the heart of mbed is the [Online Compiler](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/online_comp/). While that is incredibly convenient for getting a project started or while prototyping, chances are that at some point you'll miss a debugger, or you'll want to develop while not having an active internet connection. Through debugging, you can do things such as set breakpoints, set watchpoints, view registers, view disassembly, browse memory and examine the callstack. These docs will help you debug your applications.
4
4
5
5
The simplest way to debug your code is to augment your code with log statements, which can be observed from your computer. To set this up, read [Debugging with printf() calls](printf.md).
6
6
7
-
## Compile time and runtime errors
7
+
###Compile time and runtime errors
8
8
9
9
If your program will not compile, first read [Debugging compile time errors](compile_time.md).
10
10
11
11
If your development board blinks very fast, or shows 'siren lights', see [Lights of dead](lights_of_dead.md).
12
12
13
-
## Debugging from an IDE
13
+
###Debugging from an IDE
14
14
15
15
Keil uVision natively supports debugging mbed OS applications. To set up uVision, read [Debugging with Keil uVision](Keil.md).
16
16
@@ -21,7 +21,7 @@ mbed also supports debugging using any IDE that supports GDB. To set up the debu
21
21
1. Debugging with [Visual Studio Code](vscode.md).
22
22
1. Debugging with [other IDEs that support GDB](other_ides.md).
23
23
24
-
## Links to other sources
24
+
###Links to other sources
25
25
26
26
*[Using CMSIS-DAP to debug a device after it crashes](https://developer.mbed.org/blog/entry/Post-mortem-debugging-with-ARM-mbed/).
27
27
*[Debugging the micro:bit with pyOCD and GDB](debugging_microbit.md).
Copy file name to clipboardExpand all lines: docs/test_debug/eclipse_pyocd.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Debugging mbed OS 5 applications with Eclipse
1
+
##Debugging mbed OS 5 applications with Eclipse
2
2
3
3
This document explains how to build and debug mbed OS applications using Eclipse. Before starting, please [configure your local debug toolchain](toolchain.md).
4
4
5
-
## Installing Eclipse
5
+
###Installing Eclipse
6
6
7
7
You need to install Eclipse CDT with the GNU ARM Eclipse plugins to begin:
8
8
@@ -20,11 +20,11 @@ You need to install Eclipse CDT with the GNU ARM Eclipse plugins to begin:
20
20
1. Click **Next** repeatedly, and accept the license agreements.
21
21
1. Click **Finish**. If prompted to restart Eclipse, click **Yes**.
22
22
23
-
## Exporting a project
23
+
###Exporting a project
24
24
25
25
To export your project to Eclipse, you can use either the mbed Online Compiler or mbed CLI.
26
26
27
-
### Online compiler
27
+
####Online compiler
28
28
29
29
1. Right click on your project.
30
30
1. Select *Export Program...*.
@@ -35,7 +35,7 @@ To export your project to Eclipse, you can use either the mbed Online Compiler o
_**G**eneric **re**gression **en**vironment for **te**st **a**utomation_
7
5
8
-
## Introduction
6
+
###Introduction
9
7
10
8
Greentea is the automated testing tool for mbed OS development. It automates the process of flashing mbed boards, driving the test and accumulating test results into test reports. Developers use it for local development as well as for automation in a Continuous Integration environment.
11
9
12
10
This document should help you start using Greentea. Please see the [htrun documentation](https://github.com/ARMmbed/htrun), the tool Greentea uses to drive tests, for the technical details of the interactions between the platform and the host machine.
13
11
14
-
###Prerequistes
12
+
#### Prerequisites
15
13
16
14
Greentea requires [Python version 2.7](https://www.python.org/downloads/). It supports the following OSes:
17
15
18
16
- Windows
19
17
- Linux (Ubuntu preferred)
20
18
- OS X (experimental)
21
19
22
-
### Installing
20
+
####Installing
23
21
24
22
Tools that depend on Greentea usually install it. Determine if Greentea is already installed by running:
25
23
```
@@ -33,15 +31,15 @@ You can also install it manually via pip.
33
31
pip install mbed-greentea
34
32
```
35
33
36
-
## Test specification JSON format
34
+
###Test specification JSON format
37
35
38
36
The Greentea test specification format decouples the tool from your build system. It provides important data, such as test names, paths to test binaries and the platform on which the binaries should run.
39
37
40
38
Greentea automatically looks for files called `test_spec.json` in your working directory. You can also use the `--test-spec` argument to direct Greentea to a specific test specification file.
41
39
42
40
When you use the `-t` / `--target` argument with the `--test-spec` argument, you can select which "build" should be used. In the example below, you could provide the arguments `--test-spec test_spec.json -t K64F-ARM` to only run that build's tests.
43
41
44
-
### Example of test specification file
42
+
####Example of test specification file
45
43
46
44
In the below example, there are two defined builds:
47
45
* Build `K64F-ARM` for NXP `K64F` platform compiled with `ARMCC` compiler.
@@ -96,12 +94,12 @@ In the below example, there are two defined builds:
96
94
97
95
The examples below use the above test specification file.
98
96
99
-
## Command-line usage
97
+
###Command-line usage
100
98
This section highlights a few of the capabilities of the Greentea command-line interface. For a full list of the available options, please run `mbedgt --help`.
101
99
102
100
Assume for the examples below that the above `test_spec.json` file is in the current directory.
103
101
104
-
### Listing all tests
102
+
####Listing all tests
105
103
You can use the `-l` argument to list all available tests:
106
104
107
105
```
@@ -117,7 +115,7 @@ mbedgt: available tests for built 'K64F-ARM', location 'BUILD/tests/K64F/ARM'
117
115
test 'tests-mbedmicro-rtos-mbed-mail'
118
116
```
119
117
120
-
### Executing all tests
118
+
####Executing all tests
121
119
The default action of Greentea is to execute all tests that were found.
122
120
```
123
121
$ mbedgt
@@ -531,7 +529,7 @@ mbedgt: completed in 53.59 sec
531
529
532
530
```
533
531
534
-
### Limiting tests
532
+
####Limiting tests
535
533
You can select test cases by name using the `-n` argument. This command executes all tests named `tests-mbedmicro-rtos-mbed-mail` from all builds in the test specification:
536
534
```
537
535
$ mbedgt -n tests-mbedmicro-rtos-mbed-mail
@@ -553,7 +551,7 @@ You can use a comma (`,`) to separate test names (argument `-n`) and build names
You can limit which boards Greentea uses for testing by using the `--use-tids` argument.
558
556
559
557
```
@@ -576,39 +574,41 @@ $ mbedls
576
574
```
577
575
In this case, you won't test one target, the LPC1768.
578
576
579
-
### Creating reports
577
+
####Creating reports
580
578
Greentea supports a number of report formats.
581
579
582
-
#### HTML
580
+
#####HTML
583
581
This creates an interactive HTML page with test results and logs.
584
582
```
585
583
mbedgt --report-html html_report.html
586
584
```
587
585
588
-
#### JUnit
586
+
#####JUnit
589
587
This creates an XML JUnit report, which you can use with popular Continuous Integration software, such as [Jenkins](https://jenkins.io/index.html).
590
588
```
591
589
mbedgt --report-junit junit_report.xml
592
590
```
593
591
594
-
#### JSON
592
+
#####JSON
595
593
This creates a general JSON report.
596
594
```
597
595
mbedgt --report-json json_report.json
598
596
```
599
597
600
-
#### Plain text
598
+
#####Plain text
601
599
This creates a human-friendly text summary of the test run.
602
600
```
603
601
mbedgt --report-text text_report.text
604
602
```
605
603
606
-
## Host test detection
604
+
###Host test detection
607
605
When developing with mbed OS, Greentea detects host tests automatically if you place them in the correct location. All tests in mbed OS are placed under a `TESTS` directory. You may place custom host test scripts in a folder named `host_tests` in this folder. For more information about the mbed OS test directory structure, please see the [mbed CLI documentation](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/dev_tools/cli/#test-directory-structure).
608
606
609
-
## Common issues
607
+
### Common issues
608
+
609
+
#### `IOERR_SERIAL` errors
610
610
611
-
### `IOERR_SERIAL` errors
612
611
Possible causes:
612
+
613
613
- Another program is using the serial port. Be sure all terminals and other instances of Greentea are closed before trying again.
614
614
- The mbed interface firmware is out of date. Please see the platform's page on [developer.mbed.org](https://developer.mbed.org/) for details about how to update it.
0 commit comments