summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoralt-0191 <[email protected]>2026-02-27 01:30:39 +0800
committeralt-0191 <[email protected]>2026-03-18 15:23:28 +0800
commit2e913256073a07a993b3d3cb9abe8e1db97686db (patch)
tree3dee6fbc80c89ca8a3e80d46a21bcd491af91c28 /hw
parentc3e5fcadadcbefcfb884f2bf6ef9af87ae9b581c (diff)
ch58x: fix build flags and driver bugs
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/ch58x/family.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/hw/bsp/ch58x/family.mk b/hw/bsp/ch58x/family.mk
index 566842f93..7b62af646 100644
--- a/hw/bsp/ch58x/family.mk
+++ b/hw/bsp/ch58x/family.mk
@@ -1,3 +1,9 @@
+# https://www.embecosm.com/resources/tool-chain-downloads/#riscv-stable
+#CROSS_COMPILE ?= riscv32-unknown-elf-
+
+# Toolchain from https://nucleisys.com/download.php
+#CROSS_COMPILE ?= riscv-nuclei-elf-
+
# Toolchain from https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack
CROSS_COMPILE ?= riscv-none-elf-
@@ -9,17 +15,21 @@ CPU_CORE ?= rv32imac-ilp32
CFLAGS += \
-flto \
- -msmall-data-limit=8 \
+ -msmall-data-limit=16 \
-mno-save-restore \
-fmessage-length=0 \
-fsigned-char \
-DCFG_TUSB_MCU=OPT_MCU_CH58X \
-DCFG_TUD_WCH_USBIP_USBFS=1 \
-DFREQ_SYS=60000000 \
+ -DDISK_LIB_ENABLE=0 \
+ -DINT_SOFT \
+
+CFLAGS += -Wno-error=strict-prototypes
LDFLAGS_GCC += \
-nostdlib -nostartfiles \
- --specs=nosys.specs --specs=nano.specs \
+ --specs=nosys.specs \
SRC_C += \
src/portable/wch/dcd_ch58x_usbfs.c \