kurte@kurte-rpi4:~ $ uname -a
Linux kurte-rpi4 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
kurte@kurte-rpi4:~/github $ git clone https://github.com/PaulStoffregen/teensy_loader_cli.git
Cloning into 'teensy_loader_cli'...
remote: Enumerating objects: 255, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 255 (delta 13), reused 29 (delta 12), pack-reused 223
Receiving objects: 100% (255/255), 313.67 KiB | 3.20 MiB/s, done.
Resolving deltas: 100% (119/119), done.
kurte@kurte-rpi4:~/github $ cd teensy_loader_cli/
kurte@kurte-rpi4:~/github/teensy_loader_cli $ make
cc -O2 -Wall -s -DUSE_LIBUSB -o teensy_loader_cli teensy_loader_cli.c -lusb
teensy_loader_cli.c:228:10: fatal error: usb.h: No such file or directory
228 | #include <usb.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:15: teensy_loader_cli] Error 1
kurte@kurte-rpi4:~/github/teensy_loader_cli $ sudo apt-get install libusb-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libusb-0.1-4
The following NEW packages will be installed:
libusb-0.1-4 libusb-dev
0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded.
Need to get 59.0 kB of archives.
After this operation, 299 kB of additional disk space will be used.
..
kurte@kurte-rpi4:~/github/teensy_loader_cli $ make
cc -O2 -Wall -s -DUSE_LIBUSB -o teensy_loader_cli teensy_loader_cli.c -lusb
...
kurte@kurte-rpi4:~/github/teensy_loader_cli $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
kurte@kurte-rpi4:~/github/teensy_loader_cli $ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ bullseye main
...
kurte@kurte-rpi4:~/github/teensy_loader_cli $ ./teensy_loader_cli
Filename must be specified
Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] <file.hex>
-w : Wait for device to appear
-r : Use hard reboot if device not online
-s : Use soft reboot if device not online (Teensy 3.x & 4.x)
-n : No reboot after programming
-b : Boot only, do not program
-v : Verbose output
Use `teensy_loader_cli --list-mcus` to list supported MCUs.
For more information, please visit:
http://www.pjrc.com/teensy/loader_cli.html
kurte@kurte-rpi4:~/github/teensy_loader_cli $