diff options
| author | hathach <[email protected]> | 2024-05-20 17:26:04 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-05-20 17:26:04 +0700 |
| commit | b19295c1c15de676e7cebd5bd5b6aa53887c6a56 (patch) | |
| tree | 9ebb74af76ea517ba4c48225bef83861783cd693 /examples/build_system | |
| parent | 4a5fee503b1e3783301cde9b605ef30052623327 (diff) | |
use correct wch usbhs, usbfs for ch32v307 using CFG_TUD_MAX_SPEED
Diffstat (limited to 'examples/build_system')
| -rw-r--r-- | examples/build_system/make/rules.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/build_system/make/rules.mk b/examples/build_system/make/rules.mk index 7b6b339ed..102c6db0c 100644 --- a/examples/build_system/make/rules.mk +++ b/examples/build_system/make/rules.mk @@ -134,6 +134,17 @@ OPENOCD_OPTION ?= flash-openocd: $(BUILD)/$(PROJECT).elf openocd $(OPENOCD_OPTION) -c "program $< verify reset exit" +# --------------- openocd-wch ----------------- +# wch-linke is not supported yet in official openOCD yet. We need to either use +# 1. download openocd as part of mounriver studio http://www.mounriver.com/download or +# 2. compiled from https://github.com/hathach/riscv-openocd-wch or +# https://github.com/dragonlock2/miscboards/blob/main/wch/SDK/riscv-openocd.tar.xz +# with ./configure --disable-werror --enable-wlinke --enable-ch347=no +OPENOCD_WCH ?= /home/${USER}/app/riscv-openocd-wch/src/openocd +OPENOCD_WCH_OPTION ?= +flash-openocd-wch: $(BUILD)/$(PROJECT).elf + $(OPENOCD_WCH) $(OPENOCD_WCH_OPTION) -c init -c halt -c "flash write_image $<" -c reset -c exit + # --------------- dfu-util ----------------- DFU_UTIL_OPTION ?= -a 0 flash-dfu-util: $(BUILD)/$(PROJECT).bin |
