Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: teensy4: Update documentation #78593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bdkrae
Copy link

@bdkrae bdkrae commented Sep 17, 2024

  • insert various additional information content
  • use tabs to distinguish board versions
  • west flash is now usable for flashing
  • show steps for using USB-console
  • move images to img subfolder

@bdkrae bdkrae force-pushed the Fix-board-documentation branch 4 times, most recently from 8dcebca to 1040ef9 Compare September 23, 2024 21:27
@bdkrae bdkrae force-pushed the Fix-board-documentation branch 2 times, most recently from e457e8c to cd60bc4 Compare October 6, 2024 16:31
@bdkrae
Copy link
Author

bdkrae commented Oct 15, 2024

@henrikbrixandersen Who is responsible for reviewing this? Bot assigned neither reviewers nor assignees.

@kartben
Copy link
Collaborator

kartben commented Nov 14, 2024

@bdkrae thanks for your patience. I will try to review next week after 4.0 release is out

@bdkrae bdkrae force-pushed the Fix-board-documentation branch from ca498e2 to 51fe4c6 Compare November 14, 2024 21:03
Comment on lines 291 to 332
By default console output is mapped to teensy pins 0 (RX1) and 1 (TX1). Connect a usb-to-serial adapter
to use this serial console. Use the following settings with your serial terminal of choice (minicom, putty,
etc.):

- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1

.. group-tab:: USB-Console

By mapping the console output to USB, a usb-to-serial adapter is no longer required.
At minimum this needs the following steps. See :ref:`usb_device_stack` for more detailed information.

#. Add these lines to the ``prj.conf`` file.

.. code-block:: kconfig

CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_CDC_ACM=y

#. Add a overlay file to project, e.g. ``teensy41.overlay``.

.. code-block:: devicetree

/ {
chosen {
zephyr,console = &cdc_acm_uart0;
};
};

&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};

#. Extend application ``main.c``.

.. code-block::

#include <zephyr/usb/usb_device.h>
...
usb_enable(NULL);

#. After application startup a serial device named like
``tty.usbmodem14201 - ZEPHYR`` should appear on your host computer.
You can use e.g. ``Serial Monitor`` plugin for VScode to monitor.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like a job for https://docs.zephyrproject.org/latest/snippets/cdc-acm-console/README.html?
It looks like you could drop most/all of this and just mention that people can use that snippet if they care about USB console?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this snippet would be absolutely great, but building
west build -p -b teensy40 -S cdc-acm-console samples/basic/blinky

fails with a missing include anywhere in the NXP-Hal:

phy.c.obj.d -o modules/hal_nxp/hal_nxp/CMakeFiles/..__modules__hal__nxp.dir/mcux/middleware/mcux-sdk-middleware-usb/phy/usb_phy.c.obj -c /Users/bernhardkramer/zephyrlatest/modules/hal/nxp/mcux/middleware/mcux-sdk-middleware-usb/phy/usb_phy.c
In file included from /Users/bernhardkramer/zephyrlatest/modules/hal/nxp/mcux/middleware/mcux-sdk-middleware-usb/phy/usb_phy.c:9:
/Users/bernhardkramer/zephyrlatest/modules/hal/nxp/mcux/middleware/mcux-sdk-middleware-usb/include/usb.h:14:10: fatal error: fsl_os_abstraction.h: No such file or directory
   14 | #include "fsl_os_abstraction.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

still searching for the reason, any idea?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating my repo solved the problem, but still no luck with the snippet

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked this section to make use of this snippet. Especially no application code changes are necessary to enable cdc-acm-console.

Behavior is also explained here:
#53182 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't resolve conversations yourself, it's up to the person requesting the change to come back to it and resolve themselves. Having contributors resolving the conversation themselves just makes this task harder :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kartben
Copy link
Collaborator

kartben commented Nov 30, 2024

@bdkrae ping? :)

@bdkrae bdkrae force-pushed the Fix-board-documentation branch from 51fe4c6 to 519d38f Compare December 1, 2024 12:01
- insert various additional information content
- use tabs to distinguish board versions
- west flash is now usable for flashing
- show steps for using USB-console
- move images to img subfolder

Signed-off-by: Bernhard Krämer <[email protected]>
@bdkrae bdkrae force-pushed the Fix-board-documentation branch from 519d38f to c80ea4e Compare December 1, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants