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

added windows routines #29

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OS ?= LINUX
#OS ?= WINDOWS
#OS ?= LINUX
OS = WINDOWS
#OS ?= MACOSX
#OS ?= BSD

Expand All @@ -16,11 +16,14 @@ teensy_loader_cli: teensy_loader_cli.c


else ifeq ($(OS), WINDOWS)
CC = i586-mingw32msvc-gcc
#CC = i586-mingw32msvc-gcc
CC ?= gcc
CFLAGS ?= -O2 -Wall
teensy_loader_cli.exe: teensy_loader_cli.c
$(CC) $(CFLAGS) -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi
$(CC) $(CFLAGS) -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi -lwinmm

cleanw:
del /F teensy_loader_cli teensy_loader_cli.exe

else ifeq ($(OS), MACOSX)
ifeq ($(USE_LIBUSB), YES)
Expand All @@ -45,9 +48,7 @@ CFLAGS ?= -O2 -Wall
teensy_loader_cli: teensy_loader_cli.c
$(CC) $(CFLAGS) -s -DUSE_UHID -o teensy_loader_cli teensy_loader_cli.c


endif


clean:
rm -f teensy_loader_cli teensy_loader_cli.exe
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ Required command line parameters:

```
-mmcu=<MCU> : Specify Processor. You must specify the target processor. This syntax is the same as used by gcc, which makes integrating with your Makefile easier. Valid options are:
-mmcu=mk20dx256 : Teensy 3.1 (linux & mac only)
-mmcu=mk20dx128 : Teensy 3.0 (linux & mac only)
-mmcu=mkl26z64 : Teensy-LC (linux & mac only)
-mmcu=mk66fx1m0 : Teensy 3.6
-mmcu=mk64fx512 : Teensy 3.5
-mmcu=mk20dx256 : Teensy 3.1/3.2
-mmcu=mk20dx128 : Teensy 3.0
-mmcu=mkl26z64 : Teensy-LC
-mmcu=atmega32u4 : Teensy 2.0
-mmcu=at90usb1286 : Teensy++ 2.0
-mmcu=at90usb162 : Teensy 1.0
Expand All @@ -40,7 +42,7 @@ Optional command line parameters:

`-r` : Use hard reboot if device not online. Perform a hard reset using a second Teensy running this [rebooter](rebootor) code, with pin C7 connected to the reset pin on your main Teensy. While this requires using a second board, it allows a Makefile to fully automate reprogramming your Teensy. No manual button press is required!

`-s` : Use sort reboot if device not online. Perform a sort reset request by searching for any Teensy running USB Serial code built by Teensyduino. A request to reboot is transmitted to the first device found.
`-s` : Use soft reboot if device not online. Perform a soft reset request by searching for any Teensy running USB Serial code built by Teensyduino. A request to reboot is transmitted to the first device found.

`-n` : No reboot after programming. After programming the hex file, do not reboot. HalfKay remains running. This option may be useful if you wish to program the code but do not intend for it to run until the Teensy is installed inside a system with its I/O pins connected.

Expand Down
Loading