Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
docs/USERS-GUIDE.md@0:01f31e923fe2, 2020-04-07 (annotated)
- Committer:
- Pawel Zarembski
- Date:
- Tue Apr 07 12:55:42 2020 +0200
- Revision:
- 0:01f31e923fe2
hani: DAPLink with reset workaround
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | # DAPLink users guide |
Pawel Zarembski |
0:01f31e923fe2 | 2 | |
Pawel Zarembski |
0:01f31e923fe2 | 3 | DAPLink provides three interfaces. These are drag-and-drop programming, a serial port and debugging support. In addition, you can update DAPLink firmware using the drag-and-drop programming interface of the bootloader. |
Pawel Zarembski |
0:01f31e923fe2 | 4 | |
Pawel Zarembski |
0:01f31e923fe2 | 5 | ## Drag-and-drop programming |
Pawel Zarembski |
0:01f31e923fe2 | 6 | |
Pawel Zarembski |
0:01f31e923fe2 | 7 | Program the target microcontroller by copying or saving a file in one of the supported formats to the DAPLink drive. Upon completion, the drive remounts. If a failure occurs, the file `FAIL.TXT` appears on the drive containing information about the failure. |
Pawel Zarembski |
0:01f31e923fe2 | 8 | |
Pawel Zarembski |
0:01f31e923fe2 | 9 | Supported file formats: |
Pawel Zarembski |
0:01f31e923fe2 | 10 | |
Pawel Zarembski |
0:01f31e923fe2 | 11 | - Raw binary file. |
Pawel Zarembski |
0:01f31e923fe2 | 12 | - Intel Hex. |
Pawel Zarembski |
0:01f31e923fe2 | 13 | |
Pawel Zarembski |
0:01f31e923fe2 | 14 | ## Serial port |
Pawel Zarembski |
0:01f31e923fe2 | 15 | |
Pawel Zarembski |
0:01f31e923fe2 | 16 | The serial port is connected directly to the target MCU allowing for bidirectional communication. It also allows the target to be reset by sending a break command over the serial port. |
Pawel Zarembski |
0:01f31e923fe2 | 17 | |
Pawel Zarembski |
0:01f31e923fe2 | 18 | Supported baud rates: |
Pawel Zarembski |
0:01f31e923fe2 | 19 | |
Pawel Zarembski |
0:01f31e923fe2 | 20 | - 9600 |
Pawel Zarembski |
0:01f31e923fe2 | 21 | - 14400 |
Pawel Zarembski |
0:01f31e923fe2 | 22 | - 19200 |
Pawel Zarembski |
0:01f31e923fe2 | 23 | - 28800 |
Pawel Zarembski |
0:01f31e923fe2 | 24 | - 38400 |
Pawel Zarembski |
0:01f31e923fe2 | 25 | - 56000 |
Pawel Zarembski |
0:01f31e923fe2 | 26 | - 57600 |
Pawel Zarembski |
0:01f31e923fe2 | 27 | - 115200 |
Pawel Zarembski |
0:01f31e923fe2 | 28 | |
Pawel Zarembski |
0:01f31e923fe2 | 29 | Note: Most DAPLink implementations support other baud rates in addition to the ones listed here. |
Pawel Zarembski |
0:01f31e923fe2 | 30 | |
Pawel Zarembski |
0:01f31e923fe2 | 31 | ## Debugging |
Pawel Zarembski |
0:01f31e923fe2 | 32 | |
Pawel Zarembski |
0:01f31e923fe2 | 33 | You can debug with any IDE that supports the CMSIS-DAP protocol. Some tools capable of debugging are: |
Pawel Zarembski |
0:01f31e923fe2 | 34 | |
Pawel Zarembski |
0:01f31e923fe2 | 35 | - [pyOCD](https://github.com/mbedmicro/pyOCD). |
Pawel Zarembski |
0:01f31e923fe2 | 36 | - [uVision](http://www.keil.com/). |
Pawel Zarembski |
0:01f31e923fe2 | 37 | - [IAR](https://www.iar.com/). |
Pawel Zarembski |
0:01f31e923fe2 | 38 | |
Pawel Zarembski |
0:01f31e923fe2 | 39 | ## Firmware update |
Pawel Zarembski |
0:01f31e923fe2 | 40 | |
Pawel Zarembski |
0:01f31e923fe2 | 41 | To update the firmware on a device, hold the reset button while attaching USB. The device boots into bootloader mode. From there, copy the appropriate firmware onto the drive. If successful, the device leaves bootloader mode and starts running the new firmware. Otherwise, the bootloader displays `FAIL.TXT` with an explanation of what went wrong. |
Pawel Zarembski |
0:01f31e923fe2 | 42 | |
Pawel Zarembski |
0:01f31e923fe2 | 43 | ## No MSD builds |
Pawel Zarembski |
0:01f31e923fe2 | 44 | |
Pawel Zarembski |
0:01f31e923fe2 | 45 | MSD or drag-and-drop support is automatically detected and enabled when the target flash algorithm is in the DAPLink build. But there are builds that does not have a particular target and can retarget any families which have DAPLink support by using a debugger or pyocd without the MSD DAPLink drive. The script `tools/post_build_script.py` can take a board id, family id, flm elf or axf file as flash algo bin and bind it to a DAPLink binary build. The ram boundaries also needed to be specified as parameters. This is useful in all-family builds which has no board target originally but can target all existing families and retarget a particular target. The DAPLink MSD drive will be automatically enabled when there is a flash algoritm embedded in the binary file. The reverse use case of disabling the MSD even with a target support can also be done, please see `docs/MSD_COMMANDS.md` for details. |