summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/bsp/ch58x/family.cmake7
-rw-r--r--hw/bsp/ch58x/family.mk9
2 files changed, 10 insertions, 6 deletions
diff --git a/hw/bsp/ch58x/family.cmake b/hw/bsp/ch58x/family.cmake
index 3e12efb7a..b4835cb41 100644
--- a/hw/bsp/ch58x/family.cmake
+++ b/hw/bsp/ch58x/family.cmake
@@ -42,6 +42,9 @@ function(family_add_board BOARD_TARGET)
${SDK_SRC_DIR}/StdPeriphDriver/inc
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
)
+ target_link_libraries(${BOARD_TARGET} PUBLIC
+ ${SDK_SRC_DIR}/StdPeriphDriver/libISP583.a
+ )
target_compile_definitions(${BOARD_TARGET} PUBLIC
CFG_TUD_WCH_USBIP_USBFS=1
FREQ_SYS=60000000
@@ -86,8 +89,8 @@ function(family_configure_example TARGET RTOS)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_link_options(${TARGET} PUBLIC
- -nostdlib -nostartfiles
- --specs=nosys.specs
+ -nostartfiles
+ --specs=nosys.specs --specs=nano.specs
-Wl,--defsym=__FLASH_SIZE=${LD_FLASH_SIZE}
-Wl,--defsym=__RAM_SIZE=${LD_RAM_SIZE}
"LINKER:--script=${LD_FILE_GNU}"
diff --git a/hw/bsp/ch58x/family.mk b/hw/bsp/ch58x/family.mk
index 7b62af646..71c2cada6 100644
--- a/hw/bsp/ch58x/family.mk
+++ b/hw/bsp/ch58x/family.mk
@@ -24,12 +24,13 @@ CFLAGS += \
-DFREQ_SYS=60000000 \
-DDISK_LIB_ENABLE=0 \
-DINT_SOFT \
-
-CFLAGS += -Wno-error=strict-prototypes
+ -Wno-error=strict-prototypes
LDFLAGS_GCC += \
- -nostdlib -nostartfiles \
- --specs=nosys.specs \
+ -nostartfiles \
+ --specs=nosys.specs --specs=nano.specs \
+
+LIBS += $(TOP)/$(SDK_SRC_DIR)/StdPeriphDriver/libISP583.a
SRC_C += \
src/portable/wch/dcd_ch58x_usbfs.c \