Skip to content

Commit 85f6573

Browse files
committed
snippets: Added teensy bootloader snippet
Added a snippet that includes all Kconfig options and a dt overlay to allow for easy use of the teensy bootloader. Signed-off-by: Jan Behrens <[email protected]>
1 parent 8e7dffc commit 85f6573

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. _snippet-pjrc-teensy-bootloader:
2+
3+
PJRC Teensy Bootloader (pjrc-teensy-bootloader)
4+
#########################################
5+
6+
.. code-block:: console
7+
8+
west build -S pjrc-teensy-bootloader [...]
9+
10+
Overview
11+
********
12+
13+
This snippet makes the nessecary configurations to allow flashing of Teensy 4
14+
based boards without triggering the reset pin. This is done via a CDC ACM UART.
15+
16+
Requirements
17+
************
18+
19+
A board that supports flashing via the teensy cli tools.
20+
21+
A devicetree node with node label ``zephyr_udc0`` that points to an enabled USB
22+
device node with driver support. This should look roughly like this in
23+
:ref:`your devicetree <get-devicetree-outputs>`:
24+
25+
.. code-block:: DTS
26+
27+
usb1: zephyr_udc0: usbd@402e0000 {
28+
compatible = "nxp,ehci";
29+
/* ... */
30+
};
31+
32+
The Teensy 4.0 and 4.1 boards have this node by default, but others might not.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CONFIG_BOOTLOADER_TEENSY=y
2+
CONFIG_USB_DEVICE_VID=0x16c0
3+
CONFIG_USB_DEVICE_PID=0x0483
4+
5+
CONFIG_USB_DEVICE_STACK=y
6+
CONFIG_USB_CDC_ACM=y
7+
CONFIG_CDC_ACM_DTE_RATE_CALLBACK_SUPPORT=y
8+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y
9+
CONFIG_BOARD_LATE_INIT_HOOK=y
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2025 Navimatix GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&zephyr_udc0 {
8+
snippet_pjrc_teensy_bootloader_uart {
9+
compatible = "zephyr,cdc-acm-uart";
10+
label = "USB CDC-ACM";
11+
};
12+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: pjrc-teensy-bootloader
2+
append:
3+
EXTRA_CONF_FILE: pjrc-teensy-bootloader.conf
4+
EXTRA_DTC_OVERLAY_FILE: pjrc-teensy-bootloader.overlay

0 commit comments

Comments
 (0)