Open fanoush opened 2 months ago
Checkout cfb43de44c666d56d341182e591d1c0adb58bb97 and have a try.
I did including git submodule update --recursive
to hopefully get older dependencies but it does not build
fanoush@R7-5825U:~/CherryDAP$ git checkout cfb43de44c666d56d341182e591d1c0adb58bb97
HEAD is now at cfb43de update bl616 sdk, fix chry_dap_usb2uart_handle process
fanoush@R7-5825U:~/CherryDAP$ git submodule update --recursive
fanoush@R7-5825U:~/CherryDAP$ cd projects/bl616/
fanoush@R7-5825U:~/CherryDAP/projects/bl616$ ls
CMakeLists.txt DAP_config.h Makefile README.md bl616dk build flash_prog_cfg.ini main.c proj.conf usb2uart.c usb2uart.h usb_config.h
fanoush@R7-5825U:~/CherryDAP/projects/bl616$ rm -rf build/
fanoush@R7-5825U:~/CherryDAP/projects/bl616$ git status
HEAD detached at cfb43de
nothing to commit, working tree clean
fanoush@R7-5825U:~/CherryDAP/projects/bl616$ make BL_SDK_BASE=$HOME/bouffalo_sdk CROSS_COMPILE=$HOME/toolchain_gcc_t-head_linux/bin/riscv64-unknown-elf-
/home/fanoush/bouffalo_sdk/tools/cmake/bin/cmake -S . -B build -G "Unix Makefiles" -DCROSS_COMPILE=/home/fanoush/toolchain_gcc_t-head_linux/bin/riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR=/home/fanoush/CherryDAP/projects/bl616 -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM5 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y -DCONFIG_COREDUMP=y
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/fanoush/toolchain_gcc_t-head_linux/bin/riscv64-unknown-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/fanoush/toolchain_gcc_t-head_linux/bin/riscv64-unknown-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/fanoush/toolchain_gcc_t-head_linux/bin/riscv64-unknown-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project SDK Version: 2.0.0
-- [register library : libc], path:/home/fanoush/bouffalo_sdk/components/libc
-- [register library : mm], path:/home/fanoush/bouffalo_sdk/components/mm
-- [register library : utils], path:/home/fanoush/bouffalo_sdk/components/utils
-- [register library : lhal], path:/home/fanoush/bouffalo_sdk/drivers/lhal
-- [register extern library : libcsi_xt900p32f_dsp], path:/home/fanoush/bouffalo_sdk/drivers/lhal
-- [register extern library : libpka], path:/home/fanoush/bouffalo_sdk/drivers/lhal
-- [register library : std], path:/home/fanoush/bouffalo_sdk/drivers/soc/bl616/std
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CONFIG_COMX
CONFIG_USB_HS
-- Build files have been written to: /home/fanoush/CherryDAP/projects/bl616/build
make -C build -j8
[ 1%] Building C object CherryUSB/CMakeFiles/cherryusb.dir/core/usbd_core.c.o
[ 1%] Building C object CherryUSB/CMakeFiles/cherryusb.dir/class/cdc/usbd_cdc.c.o
[ 2%] Building C object build_out/components/mm/CMakeFiles/mm.dir/mem.c.o
[ 2%] Building C object build_out/components/utils/CMakeFiles/utils.dir/log/log.c.o
[ 3%] Building C object build_out/components/mm/CMakeFiles/mm.dir/tlsf/tlsf.c.o
[ 4%] Building C object build_out/components/libc/CMakeFiles/libc.dir/newlib/port_memory.c.o
[ 4%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_common.c.o
[ 5%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/start.S.o
[ 5%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/vector.S.o
/home/fanoush/CherryDAP/CherryUSB/class/cdc/usbd_cdc.c: In function 'cdc_acm_class_interface_request_handler':
/home/fanoush/CherryDAP/CherryUSB/class/cdc/usbd_cdc.c:19:28: warning: unused variable 'line_coding_last' [-Wunused-variable]
19 | struct cdc_line_coding line_coding_last;
| ^~~~~~~~~~~~~~~~
[ 6%] Building C object build_out/components/utils/CMakeFiles/utils.dir/ring_buffer/ring_buffer.c.o
[ 7%] Building C object build_out/components/libc/CMakeFiles/libc.dir/newlib/syscalls_nosys.c.o
[ 8%] Building C object build_out/components/utils/CMakeFiles/utils.dir/bflb_block_pool/bflb_block_pool.c.o
[ 9%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_adc.c.o
[ 10%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_acomp.c.o
[ 11%] Building ASM object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/riscv_fpu.S.o
[ 12%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/start_load.c.o
[ 12%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_abs.c.o
[ 13%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/system_bl616.c.o
[ 13%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/startup/interrupt.c.o
[ 14%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atof.c.o
[ 14%] Building C object build_out/components/mm/CMakeFiles/mm.dir/tlsf/bflb_tlsf.c.o
[ 15%] Linking C static library ../build_out/lib/libcherryusb.a
[ 16%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_cks.c.o
[ 17%] Building C object build_out/components/utils/CMakeFiles/utils.dir/bflb_timestamp/bflb_timestamp.c.o
[ 17%] Built target cherryusb
[ 17%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_ef_ctrl.c.o
[ 18%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atoi.c.o
[ 19%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_gpio.c.o
[ 19%] Building C object CMakeFiles/app.dir/home/fanoush/bouffalo_sdk/bsp/sdk_version.c.o
[ 19%] Building C object build_out/components/utils/CMakeFiles/utils.dir/getopt/utils_getopt.c.o
[ 20%] Linking C static library ../../lib/libmm.a
[ 21%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atol.c.o
[ 21%] Built target mm
[ 21%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_atoll.c.o
[ 22%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_bsearch.c.o
[ 23%] Building C object CMakeFiles/app.dir/bl616dk/board.c.o
[ 24%] Building C object CMakeFiles/app.dir/bl616dk/fw_header.c.o
[ 24%] Building C object CMakeFiles/app.dir/usb2uart.c.o
[ 25%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/dap_main.c.o
[ 26%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_checkbase.c.o
[ 27%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_romapi_e907.c.o
[ 28%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_romapi_patch.c.o
[ 29%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_i2c.c.o
/home/fanoush/CherryDAP/dap_main.c:413:18: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
413 | .compat_id = USBD_WinUSBDescriptorSetDescriptor,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fanoush/CherryDAP/dap_main.c:418:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
418 | .string = USBD_BinaryObjectStoreDescriptor,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 30%] Building C object build_out/components/utils/CMakeFiles/utils.dir/coredump/bflb_coredump.c.o
[ 30%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_itoa.c.o
[ 31%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_llabs.c.o
[ 31%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dma.c.o
[ 32%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_lldiv.c.o
[ 34%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_qsort.c.o
[ 34%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/DAP/Source/DAP_vendor.c.o
[ 34%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/stdlib/lib_strtod.c.o
[ 35%] Building C object build_out/components/utils/CMakeFiles/utils.dir/cjson/cJSON.c.o
[ 35%] Building C object build_out/components/utils/CMakeFiles/utils.dir/math/src/utils_base64.c.o
[ 35%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/DAP/Source/DAP.c.o
[ 36%] Building C object build_out/components/utils/CMakeFiles/utils.dir/math/src/utils_crc.c.o
[ 37%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_rtc.c.o
/home/fanoush/CherryDAP/DAP/Source/DAP.c: In function 'DAP_SWJ_Clock':
/home/fanoush/CherryDAP/DAP/Source/DAP.c:408:12: warning: unused variable 'delay' [-Wunused-variable]
408 | uint32_t delay;
| ^~~~~
[ 38%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_aes.c.o
[ 39%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffs.c.o
[ 40%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffsl.c.o
[ 41%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/DAP/Source/JTAG_DP.c.o
[ 41%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_ffsll.c.o
[ 42%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/DAP/Source/SW_DP.c.o
[ 43%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_sha.c.o
[ 44%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_fls.c.o
[ 45%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_flsl.c.o
[ 45%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_flsll.c.o
[ 46%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_index.c.o
[ 47%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memccpy.c.o
[ 48%] Building C object CMakeFiles/app.dir/home/fanoush/CherryDAP/CherryRB/chry_ringbuffer.c.o
[ 48%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_clock.c.o
[ 49%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_common.c.o
[ 50%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_ef_cfg.c.o
[ 51%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_sdh.c.o
[ 52%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memchr.c.o
[ 52%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sec_trng.c.o
[ 53%] Building C object build_out/components/utils/CMakeFiles/utils.dir/math/src/utils_hex.c.o
[ 53%] Linking C static library build_out/lib/libapp.a
[ 53%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memcmp.c.o
[ 53%] Built target app
[ 54%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memmove.c.o
[ 55%] Linking C static library ../../lib/libutils.a
[ 55%] Built target utils
[ 56%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memrchr.c.o
[ 57%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_spi.c.o
[ 58%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_timer.c.o
[ 58%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_uart.c.o
[ 59%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_wdg.c.o
[ 60%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_flash.c.o
[ 60%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_memset.c.o
[ 61%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_stpcpy.c.o
[ 62%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcasecmp.c.o
[ 62%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_stpncpy.c.o
[ 63%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcasestr.c.o
[ 63%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sf_cfg.c.o
[ 64%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_xip_sflash.c.o
[ 65%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sflash.c.o
[ 66%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcat.c.o
[ 67%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strchr.c.o
[ 68%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_sf_ctrl.c.o
[ 68%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_tzc_sec.c.o
[ 69%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_psram.c.o
[ 69%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcmp.c.o
[ 70%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strcspn.c.o
[ 71%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strdup.c.o
[ 71%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strnlen.c.o
[ 71%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_flash_secreg_port.c.o
[ 72%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/flash/bflb_flash_secreg.c.o
[ 73%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strpbrk.c.o
[ 74%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strrchr.c.o
[ 75%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_pm.c.o
[ 75%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/port/bl616_gpio.c.o
[ 76%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strsep.c.o
[ 76%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strspn.c.o
[ 77%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strstr.c.o
[ 78%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dac.c.o
[ 78%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_emac.c.o
[ 79%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strtok.c.o
[ 79%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_strtokr.c.o
[ 80%] Building C object build_out/components/libc/CMakeFiles/libc.dir/nuttx/libc/string/lib_vikmemcpy.c.o
[ 81%] Building C object build_out/components/libc/CMakeFiles/libc.dir/vsnprintf.c.o
[ 82%] Building C object build_out/components/libc/CMakeFiles/libc.dir/snprintf.c.o
[ 82%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_ir.c.o
[ 83%] Building C object build_out/components/libc/CMakeFiles/libc.dir/sprintf.c.o
[ 84%] Building C object build_out/components/libc/CMakeFiles/libc.dir/vsprintf.c.o
[ 85%] Building C object build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/port/bl616_clock.c.o
[ 86%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_mjpeg.c.o
[ 87%] Building C object build_out/components/libc/CMakeFiles/libc.dir/printf.c.o
[ 87%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_pwm_v2.c.o
[ 88%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_cam.c.o
[ 89%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_sdio2.c.o
[ 90%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_i2s.c.o
[ 90%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_dbi.c.o
[ 91%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_audac.c.o
[ 92%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_auadc.c.o
[ 92%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_wo.c.o
[ 93%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_irq.c.o
[ 94%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_l1c.c.o
[ 95%] Linking C static library ../../../../lib/libstd.a
[ 95%] Linking C static library ../../lib/liblibc.a
[ 95%] Built target libc
[ 96%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/src/bflb_mtimer.c.o
[ 96%] Built target std
[ 96%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/include/arch/risc-v/t-head/rv_hart.c.o
[ 98%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/config/bl616/device_table.c.o
[ 98%] Building C object build_out/drivers/lhal/CMakeFiles/lhal.dir/include/arch/risc-v/t-head/rv_pmp.c.o
[ 98%] Linking C static library ../../lib/liblhal.a
[ 98%] Built target lhal
[ 99%] Building C object CMakeFiles/cherrydap_bl616.elf.dir/main.c.o
[100%] Linking C executable build_out/cherrydap_bl616.elf
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `dap_out_callback':
/home/fanoush/CherryDAP/dap_main.c:321: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `dap_in_callback':
/home/fanoush/CherryDAP/dap_main.c:331: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `usbd_cdc_acm_bulk_out':
/home/fanoush/CherryDAP/dap_main.c:350: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `usbd_cdc_acm_bulk_in':
/home/fanoush/CherryDAP/dap_main.c:369: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/dap_main.c:363: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `usbd_event_handler':
/home/fanoush/CherryDAP/dap_main.c:292: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/dap_main.c:295: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `chry_dap_handle':
/home/fanoush/CherryDAP/dap_main.c:486: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/dap_main.c:502: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libapp.a(dap_main.c.o): in function `chry_dap_usb2uart_handle':
/home/fanoush/CherryDAP/dap_main.c:576: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/dap_main.c:570: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_event_ep0_in_complete_handler':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:1098: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:1092: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:1107: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_initialize':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:1295: undefined reference to `usb_dc_init'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_set_endpoint':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:115: undefined reference to `usbd_ep_open'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:118: undefined reference to `usbd_ep_set_stall'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_std_device_req_handler':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:562: undefined reference to `usbd_ep_clear_stall'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_set_configuration':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:394: undefined reference to `usbd_set_address'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_class_event_notify_handler':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:963: undefined reference to `usbd_ep_close'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_reset_endpoint':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:144: undefined reference to `usbd_ep_open'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_event_ep0_out_complete_handler':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:339: undefined reference to `usbd_ep_start_write'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: build_out/lib/libcherryusb.a(usbd_core.c.o): in function `usbd_get_descriptor':
/home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:349: undefined reference to `usbd_ep_start_read'
/home/fanoush/toolchain_gcc_t-head_linux/bin/../lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/fanoush/CherryDAP/CherryUSB/core/usbd_core.c:296: undefined reference to `usbd_ep_set_stall'
Memory region Used Size Region Size %age Used
fw_header_memory: 256 B 4 KB 6.25%
xip_memory: 56156 B 4 MB 1.34%
ram_psram: 0 GB 4 MB 0.00%
itcm_memory: 4972 B 12 KB 40.46%
dtcm_memory: 4 KB 4 KB 100.00%
nocache_ram_memory: 42000 B 60 KB 68.36%
ram_memory: 3572 B 372 KB 0.94%
ram_wifi: 0 GB 32 KB 0.00%
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/cherrydap_bl616.elf.dir/build.make:107: build_out/cherrydap_bl616.elf] Error 1
make[2]: *** [CMakeFiles/Makefile2:516: CMakeFiles/cherrydap_bl616.elf.dir/all] Error 2
make[1]: *** [Makefile:91: all] Error 2
make: *** [/home/fanoush/bouffalo_sdk/project.build:80: build] Error 2
Readme tells you.
thanks, that worked, did a build, flashed and unfortunately it is the same
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 4000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x0d28:0x0204, serial=012345ABCDEF
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: JTAG supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: UART via USB COM port supported
Info : CMSIS-DAP: FW Version = 2.1.1
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 4000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : [nrf52.cpu] Examination succeed
Info : [nrf52.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444
shutdown command invoked
Info : dropped 'telnet' connection
Error: CMSIS-DAP command CMD_DISCONNECT failed.
Error: CMSIS-DAP command CMD_LED failed.
Error: CMSIS-DAP command CMD_LED failed.
the serial=012345ABCDEF
is different so it is probably the older build
I dont know about this, sorry.
don't have more time now but will test with different devices, this nrf52 board works fine with other CMSIS-DAP dongles including cherrydap based CH32V305 WCH Link E but will test more target devices with this build
So tested a bit more and it behaves the same with other target devices too, even if I disconnect the target device first and then do shutdown it does the same thing so it is probably not related to the device connected. Maybe the shutdown never worked properly? anyway I also found that the 3.3V pin on M0S dock is quite weak and cannot safely power other (relatively low power) nrf52832 boards so maybe it is not that good board for CMSIS-DAP dongle.
I have built it from sources for M0S Dock and the device is not stable. Sometime it freezes during communication but typically it cannot be detached from device and hangs when closing the connection.
With openoncd it looks like
and then when starting again
M0S must be disconnected from USB and plugged in again. Then it works until it freezes again - mostly at disconnect time. Same problem happens when using WebUSB dapjs demos https://armmbed.github.io/dapjs/examples/index.html e.g. the RTT one. When stopping RTT it freezes and cannot be properly disconnected and reconnected until it it detached from USB and plugged in again.