Skip to content

Commit

Permalink
Modifications to build on Windows x64.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Foreman committed Jun 10, 2020
1 parent 3a78a01 commit 7d63ff7
Show file tree
Hide file tree
Showing 12 changed files with 2,728 additions and 34 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/*.o
tiny-AES-c/*.o
stlink-tool
stlink-tool
stlink-tool.exe
/.vscode
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CFLAGS := -Wall -Wextra -Werror $(shell pkg-config --cflags libusb-1.0)
LDFLAGS := $(shell pkg-config --libs libusb-1.0)
CC := gcc.exe
CFLAGS := -Wall -Wextra -Werror -Ilibusb
LDFLAGS := -Llibusb -lusb-1.0 -lWs2_32 -lmsvcrt

OBJS := src/main.o src/stlink.o src/crypto.o tiny-AES-c/aes.o
OBJS := src/main.o src/getopt.o src/stlink.o src/crypto.o tiny-AES-c/aes.o

%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
Expand All @@ -10,5 +11,5 @@ stlink-tool: $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) -o $@

clean:
rm -f src/*.o
rm -f stlink-tool
del /f src\*.o
del /f stlink-tool
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# stlink-tool

_This fork is for building on Windows x64. It no longer compiles on linux._

libusb tool for flashing chinese ST-Link dongles. Please note that similarly to ST's updater, the uploaded firmware won't replace the bootloader (meaning that you should be able to reflash the original afterwards using [ST's firmware update utility](http://www.st.com/en/development-tools/stsw-link007.html)).

```
Expand Down
504 changes: 504 additions & 0 deletions libusb/COPYING

Large diffs are not rendered by default.

Binary file added libusb/libusb-1.0.a
Binary file not shown.
Loading

0 comments on commit 7d63ff7

Please sign in to comment.