Skip to content
Snippets Groups Projects
Commit 71c1b4b3 authored by cnlohr's avatar cnlohr
Browse files

Merge branch 'master' of https://github.com/cnlohr/ch32v003fun

parents 1a5122a2 f95d19cc
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,27 @@ CFLAGS:=-O0 -g3 -Wall
ifeq ($(OS),Windows_NT)
LDFLAGS:=-lpthread -lusb-1.0 -lsetupapi
else
LDFLAGS:=-lpthread -lusb-1.0 -ludev
OS_NAME := $(shell uname -s | tr A-Z a-z)
ifeq ($(OS_NAME),linux)
LDFLAGS:=-lpthread -lusb-1.0 -ludev
endif
ifeq ($(OS_NAME),darwin)
LDFLAGS:=-lpthread -lusb-1.0 -framework CoreFoundation -framework IOKit
CFLAGS:=-O0 -Wall -Wno-asm-operand-widths -Wno-deprecated-declarations -Wno-deprecated-non-prototype -D__MACOSX__
INCLUDES:=-I /opt/homebrew/Cellar/libusb/1.0.26/include/libusb-1.0
LIBINCLUDES:=-L /opt/homebrew/Cellar/libusb/1.0.26/lib
INCS:=$(INCLUDES) $(LIBINCLUDES)
endif
endif
minichlink : minichlink.c pgm-wch-linke.c pgm-esp32s2-ch32xx.c nhc-link042.c
gcc -o $@ $^ $(LDFLAGS) $(CFLAGS)
gcc -o $@ $^ $(LDFLAGS) $(CFLAGS) $(INCS)
minichlink.so : minichlink.c pgm-wch-linke.c pgm-esp32s2-ch32xx.c nhc-link042.c
gcc -o $@ $^ $(LDFLAGS) $(CFLAGS) -shared -fPIC
gcc -o $@ $^ $(LDFLAGS) $(CFLAGS) $(INCS) -shared -fPIC
install_udev_rules :
cp 99-WCH-LinkE.rules /etc/udev/rules.d/
......
......@@ -794,7 +794,7 @@ static int DefaultWriteWord( void * dev, uint32_t address_to_write, uint32_t dat
iss->currentstateval += 4;
return 0;
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment