[add] stlinkv1_macosx_driver from marco.cassinerio@gmail.com

pull/39/head
Fabien Le Mentec 2011-12-16 14:07:17 -06:00
rodzic 2e6f2b6a65
commit 62ea3faf1e
3 zmienionych plików z 80 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,57 @@
# make ... for both stlink v1 and stlink v2 support
##
VPATH=src
SOURCES_LIB=stlink-common.c stlink-usb.c stlink-sg.c uglylogging.c
OBJS_LIB=$(SOURCES_LIB:.c=.o)
TEST_PROGRAMS=test_usb test_sg
LDFLAGS=-L. -lstlink -lusb-1.0
CFLAGS+=-g
CFLAGS+=-DDEBUG=1
CFLAGS+=-std=gnu99
CFLAGS+=-Wall -Wextra
LIBRARY=libstlink.a
all: $(LIBRARY) flash gdbserver $(TEST_PROGRAMS)
$(LIBRARY): $(OBJS_LIB)
@echo "objs are $(OBJS_LIB)"
$(AR) -cr $@ $^
@echo "done making library"
test_sg: test_sg.o $(LIBRARY)
@echo "building test_sg"
$(CC) test_sg.o $(LDFLAGS) -o $@
test_usb: test_usb.o $(LIBRARY)
@echo "building test_usb"
$(CC) test_usb.o $(LDFLAGS) -o $@
@echo "done linking"
%.o: %.c
@echo "building $^ into $@"
$(CC) $(CFLAGS) -c $^ -o $@
@echo "done compiling"
clean:
rm -rf $(OBJS_LIB)
rm -rf $(LIBRARY)
rm -rf test_usb*
rm -rf test_sg*
$(MAKE) -C flash clean
$(MAKE) -C gdbserver clean
flash:
$(MAKE) -C flash
gdbserver:
$(MAKE) -C gdbserver CONFIG_USE_LIBSG="$(CONFIG_USE_LIBSG)"
osx_stlink_shield:
./osx/install.sh
.PHONY: clean all flash gdbserver

Wyświetl plik

@ -0,0 +1,23 @@
from: marco.cassinerio@gmail.com
to: texane@gmail.com
Hi,
i managed to get the stlink v1 working under os x and i would like to share the solution so maybe you can
add it in your package.
The problem is that os x claims the device as scsi and libusb won't be able to connect to it.
I've created what is called a codeless driver which claims the device and has a higher priority then the
default apple mass storage driver, so the device can be accessed through libusb.
I tested this codeless driver under OS X 10.6.8 and 10.7.2. I assume it works with any 10.6.x and 10.7.x
version as well.
Attached to this mail you'll find the osx folder with the source code of the driver, both drivers (for
10.6.x and 10.7.x), an install.sh script and the modified Makefile, i only added a line at the end which
invoke the install.sh.
To install the driver the user have only to do:
sudo make osx_stlink_shield
no reboot required.

Plik binarny nie jest wyświetlany.