diff --git a/README.md b/README.md
index 4b866fb04cfb0a90594719ad9c6994adfa84996c..71d484eb81327e8389c8d48e7727e5ab6f4e6fed 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,8 @@ On WSL or Debian based OSes `apt-get install build-essential libnewlib-dev gcc-r
 
 On Windows, download and install (to system) this copy of GCC10. https://gnutoolchains.com/risc-v/
 
+On macOS install the RISC-V toolchain with homebrew following the instructions at https://github.com/riscv-software-src/homebrew-riscv
+
 You can use the pre-compiled minichlink or 
 
 ## Running
diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h
index 628640f1b3e861f855d1b11a3c17c531a1787571..fc9fa0947788ee95d8ebef2fe30c5e0b3ecb40a2 100644
--- a/ch32v003fun/ch32v003fun.h
+++ b/ch32v003fun/ch32v003fun.h
@@ -4822,8 +4822,13 @@ extern "C" {
 #define DELAY_US_TIME (SYSTEM_CORE_CLOCK / 8000000)
 #define DELAY_MS_TIME (SYSTEM_CORE_CLOCK / 8000)
 
+#if defined(__APPLE__) && defined(__MACH__)
+void handle_reset()            __attribute__((naked)) __attribute((section("__TEXT,.text.ha_re"))) __attribute__((used));
+void DefaultIRQHandler( void ) __attribute__((section("__TEXT,.text.ve_ha"))) __attribute__((naked)) __attribute__((used));
+#else
 void handle_reset()            __attribute__((naked)) __attribute((section(".text.handle_reset"))) __attribute__((used));
 void DefaultIRQHandler( void ) __attribute__((section(".text.vector_handler"))) __attribute__((naked)) __attribute__((used));
+#endif
 
 void DelaySysTick( uint32_t n );
 
diff --git a/minichlink/Makefile.macos b/minichlink/Makefile.macos
new file mode 100644
index 0000000000000000000000000000000000000000..d19f24dc30ea754dc989fbeed9e3721b364b4607
--- /dev/null
+++ b/minichlink/Makefile.macos
@@ -0,0 +1,19 @@
+TOOLS:=minichlink
+
+all : $(TOOLS)
+
+CFLAGS:=-O0 -Wall -Wno-asm-operand-widths -Wno-deprecated-declarations -Wno-deprecated-non-prototype -D__MACOSX__
+LDFLAGS:=-lpthread -lusb-1.0 -framework CoreFoundation -framework IOKit
+
+INCLUDES=-I /opt/homebrew/Cellar/libusb/1.0.26/include/libusb-1.0
+LIBINCLUDES=-L /opt/homebrew/Cellar/libusb/1.0.26/lib
+
+minichlink : minichlink.c pgm-wch-linke.c pgm-esp32s2-ch32xx.c
+	gcc -o $@ $^ $(LDFLAGS) $(CFLAGS) $(INCLUDES) $(LIBINCLUDES)
+
+inspect_bootloader : minichlink
+	./minichlink -r test.bin launcher 0x780
+	riscv64-unknown-elf-objdump -S -D test.bin -b binary -m riscv:rv32 | less
+
+clean :
+	rm -rf $(TOOLS)
diff --git a/minichlink/README.md b/minichlink/README.md
index 6b8d8c6533af2502a3947fd3641a9fdc95299f7e..85b01b07da4ea8f9f729dd1722a258a1e2fe8a9d 100644
--- a/minichlink/README.md
+++ b/minichlink/README.md
@@ -8,6 +8,8 @@ On Windows, if you need to you can install the WinUSB driver over the WCH interf
 
 The exe here is about 12kB and contains everything except for the libusb driver.  In Linux you need `libusb-1.0-dev`.
 
+On macOS compile using `make -f Makefile.macos`, you need libusb installed which can be done with homebrew `brew install libusb`.
+
 ## Usage
 
 ```