-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
base: main
Are you sure you want to change the base?
Conversation
bdkrae
commented
Sep 17, 2024
•
edited
Loading
edited
- 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
8dcebca
to
1040ef9
Compare
e457e8c
to
cd60bc4
Compare
@henrikbrixandersen Who is responsible for reviewing this? Bot assigned neither reviewers nor assignees. |
cd60bc4
to
ca498e2
Compare
@bdkrae thanks for your patience. I will try to review next week after 4.0 release is out |
ca498e2
to
51fe4c6
Compare
boards/pjrc/teensy4/doc/index.rst
Outdated
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdkrae ping? :) |
51fe4c6
to
519d38f
Compare
- 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]>
519d38f
to
c80ea4e
Compare