Commit 283e227c authored by Jan Lübbe's avatar Jan Lübbe
Browse files

doc: add hints on udev configuration

When using the debug board, udev rules are useful to keep the functions
separate, even when enumerating in a different order.
parent 7949d71e
Pipeline #2325 passed with stages
in 53 seconds
...@@ -7,6 +7,36 @@ it. The debugger looks like either one in the following pictures: ...@@ -7,6 +7,36 @@ it. The debugger looks like either one in the following pictures:
.. image:: static/debuggers.png .. image:: static/debuggers.png
First of all, you need to connect your debugger and card10. There are three
connections that you need (take a look at the above diagram for more info):
* ``HDK``: This connection provides debugging (SWD) and UART.
* ``DEV``: This connection provides power (battery charger) and the native USB
connection (bootloader).
* ``USB-C``: Connect the proved USB-C cable with the side which has the blue
dot, so the blue dots have the same side.
Console
-------
When using the debugger, you will usually have two /dev/ttyACM* devices (one
each for ``HDK`` and ``DEV``). To avoid confusion, allow access without
``sudo`` and tell ModemManager to ignore them, you can use the following udev
rule file (saved under ``/etc/udev/rules.d/99-card10.rules``):
.. code-block:: text
SUBSYSTEM=="tty", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0664", GROUP="plugdev", SYMLINK+="ttyACM-card10-hdk", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0b6a", ATTRS{idProduct}=="003c", MODE="0664", GROUP="plugdev", SYMLINK+="ttyACM-card10-dev", ENV{ID_MM_DEVICE_IGNORE}="1"
After changing udev rules, you need to tell the udev daemon:
.. code-block:: shell-session
$ sudo udevadm control --reload
Now, additional symlinks (``/dev/ttyACM-card10-hdk`` and
``/dev/ttyACM-card10-dev``) will be created when connecting the card10.
OpenOCD OpenOCD
------- -------
For debugging card10, you need our `own fork`_ of OpenOCD. It contains a patch For debugging card10, you need our `own fork`_ of OpenOCD. It contains a patch
...@@ -55,15 +85,6 @@ that package from your distros repositories: ...@@ -55,15 +85,6 @@ that package from your distros repositories:
Debugging Debugging
--------- ---------
First of all, you need to connect your debugger and card10. There are three
connections that you need (take a look at the above diagram for more info):
* ``HDK``: This connection provides debugging (SWD) and UART.
* ``DEV``: This connection provides power (battery charger) and the native USB
connection (bootloader).
* ``USB-C``: Connect the proved USB-C cable with the side which has the blue
dot, so the blue dots have the same side.
Run OpenOCD from the ``openocd/scripts`` directory in the firmware repository. Run OpenOCD from the ``openocd/scripts`` directory in the firmware repository.
Call it as ``openocd -f interface/cmsis-dap.cfg -f target/max32665.cfg``. If Call it as ``openocd -f interface/cmsis-dap.cfg -f target/max32665.cfg``. If
the debugger and card10 are connected correctly, you should see the following the debugger and card10 are connected correctly, you should see the following
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment