libusbh_bm.a error undefined reference to 'debug_printf'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

libusbh_bm.a error undefined reference to 'debug_printf'

640 Views
neilporven
Senior Contributor I

Hi everyone,

When I include the USB library, libusbh_bm.a, I get the following errors.  They are all pointing to

debug_printf.  I think I am missing a path needed, but I don't know which one. Can someone

tell me if I am missing a path or is it something else?

'Building target: K64_USB_HOST_MSD_a01.elf'
'Invoking: Cross ARM C++ Linker'
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -T "MK64FX512xxx12_flash.ld" -Xlinker --gc-sections -L"C:/Vinland/Products/American Changer/Flex-2/USB Test/K64_USB_HOST_MSD_a01/Project_Settings/Linker_Files" -Wl,-Map,"K64_USB_HOST_MSD_a01.map" -specs=nosys.specs -specs=nano.specs -Xlinker -z -Xlinker muldefs -o "K64_USB_HOST_MSD_a01.elf" ./fatfs/fsl_usb_disk/src/msd_diskio.o ./fatfs/fsl_sd_disk/src/fsl_sd_disk.o ./fatfs/diskio.o ./fatfs/ff.o ./USB_HOST/USB_Host.o ./Sources/Display.o ./Sources/Init.o ./Sources/SDmicro.o ./Sources/fsl_sdhc_irq.o ./Sources/main.o ./SDK/composite/src/sdcard/fsl_sdhc_card.o ./Project_Settings/Startup_Code/startup.o ./Project_Settings/Startup_Code/startup_MK64F12.o ./Project_Settings/Startup_Code/system_MK64F12.o C:/Freescale/KSDK_1.3.0/lib/ksdk_platform_lib/kds/K64F12/debug/libksdk_platform.a C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o): In function `usb_class_mass_storage_device_command':
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:287: undefined reference to `debug_printf'
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o): In function `usb_class_mass_call_back_cbw':
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:488: undefined reference to `debug_printf'
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o): In function `usb_class_mass_call_back_dphase':
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:620: undefined reference to `debug_printf'
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o): In function `usb_class_mass_call_back_csw':
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:815: undefined reference to `debug_printf'
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o): In function `usb_class_mass_pass_on_usb':
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:872: undefined reference to `debug_printf'
C:/Freescale/KSDK_1.3.0/usb/usb_core/host/lib/bm/kds/MK64F12/debug/libusbh_bm.a(usb_host_msd_bo.o):C:/Freescale/KSDK_1.3.0/usb/usb_core/host/sources/classes/msd/usb_host_msd_bo.c:896: more undefined references to `debug_printf' follow
collect2.exe: error: ld returned 1 exit status
make: *** [K64_USB_HOST_MSD_a01.elf] Error 1

Thank you,

Neil

Tags (2)
0 Kudos
2 Replies

458 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Neil:

debug_printf is defined in fsl_debug_console.c, please add the 4 files (under utilities) into your project. , please refer to the host_msd_fstfs_bm demo

pastedImage_1.png


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

458 Views
neilporven
Senior Contributor I

Hi Daniel,

I added the utilities folder and the four files as you suggested and now its compiling. I don't have

any code so far, I just wanted to get the SD card and the USB files/folders in the project compiling.

I also enabled both the SD and USB in the preprocessor stage and that seems to be working.

My next step is to start bring in the USB code portion and tackle any issues that might come up.

Thank you,

Daniel

0 Kudos