diff options
| author | alt-0191 <[email protected]> | 2026-03-02 23:58:06 +0800 |
|---|---|---|
| committer | alt-0191 <[email protected]> | 2026-03-18 15:23:28 +0800 |
| commit | 2159c295e9318f888a0763dd6ad28562c2e0ca5a (patch) | |
| tree | 290c224160d60b8a6ef5c54c886134aab52fab60 | |
| parent | 6c7d9d0a21a0df5afc38a43ba5b196c81075fda2 (diff) | |
test: fix ch58x linker errors by adding libc/libgcc and libISP583
| -rw-r--r-- | hw/bsp/ch58x/family.cmake | 7 | ||||
| -rw-r--r-- | hw/bsp/ch58x/family.mk | 9 |
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 \ |
