summaryrefslogtreecommitdiff
path: root/examples/readme.md
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-09-01 12:02:25 +0700
committerhathach <[email protected]>2020-09-01 12:02:25 +0700
commitbe708bb8a444a6e8f8676be842fcfd02a583ed0b (patch)
treea72cd5e5491ade67c40b0a5f152d9d697420caaf /examples/readme.md
parentd108ea4326d824da73da0a4f9632c5da6aa2e3ec (diff)
parentf10b8145afb6d7b78fbf31b525951b4137e1d774 (diff)
Merge branch 'master' into update-host
Diffstat (limited to 'examples/readme.md')
-rw-r--r--examples/readme.md34
1 files changed, 28 insertions, 6 deletions
diff --git a/examples/readme.md b/examples/readme.md
index 1c85214e9..f6cd380b6 100644
--- a/examples/readme.md
+++ b/examples/readme.md
@@ -32,17 +32,39 @@ Then compile with `make BOARD=[your_board] all`, for example
$ make BOARD=feather_nrf52840_express all
```
-### Debug Log
+**Port Selection**
-### Log Level
+If a board has several ports, one port is chosen by default in the individual board.mk file. Use option `PORT=x` To choose another port. For example to select the HS port of a STM32F746Disco board, use:
+
+```
+$ make BOARD=stm32f746disco PORT=1 all
+```
+
+**Port Speed**
+
+A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option `SPEED=full/high` e.g To force F723 operate at full instead of default high speed
+
+```
+$ make BOARD=stm32f746disco SPEED=full all
+```
+
+### Debug
+
+To compile for debugging with debug symbols add `DEBUG=1`, for example
+
+```
+$ make BOARD=feather_nrf52840_express DEBUG=1 all
+```
+
+#### Log
Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional `LOG=`. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet.
```
-$ make LOG=2 BOARD=feather_nrf52840_express all
+$ make BOARD=feather_nrf52840_express LOG=2 all
```
-### Logger
+#### Logger
By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols:
@@ -56,8 +78,8 @@ By default log message is printed via on-board UART which is slow and take lots
- Software viewer should be provided along with your debugger driver.
```
-$ make LOG=2 LOGGER=rtt BOARD=feather_nrf52840_express all
-$ make LOG=2 LOGGER=swo BOARD=feather_nrf52840_express all
+$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all
+$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all
```
## Flash