This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

compilation error in nrf_drv_usbd.c

I have recently upgraded FTD code which was based on nrf sdk for thread and zigbee v2.0.0 to nrf sdk for thread and zigbee v4.0.0

On compiling the FTD I am having the following error..

Compiling file: nrf_drv_usbd.c
../../../../../nrf_sdk_thread/components/drivers_nrf/usbd/nrf_drv_usbd.c: In function 'usbd_ep_iso_capacity':
../../../../../nrf_sdk_thread/components/drivers_nrf/usbd/nrf_drv_usbd.c:1387:9: error: 'NRF_USBD_ISOSPLIT_Half' undeclared (first use in this function)
     if (NRF_USBD_ISOSPLIT_Half == split)
         ^~~~~~~~~~~~~~~~~~~~~~
../../../../../nrf_sdk_thread/components/drivers_nrf/usbd/nrf_drv_usbd.c:1387:9: note: each undeclared identifier is reported only once for each function it appears in
../../../../../nrf_sdk_thread/components/drivers_nrf/usbd/nrf_drv_usbd.c: In function 'nrf_drv_usbd_enable':
../../../../../nrf_sdk_thread/components/drivers_nrf/usbd/nrf_drv_usbd.c:1849:27: error: 'NRF_USBD_ISOSPLIT_Half' undeclared (first use in this function)
     nrf_usbd_isosplit_set(NRF_USBD_ISOSPLIT_Half);
                           ^~~~~~~~~~~~~~~~~~~~~~

Please suggest what can be done.

Parents
  • Hi,

     

    This is defined in nrf_usbd.h. Could you check if ../modules/nrfx/hal is set in your include folder path?

     

    Kind regards,

    Håkon

  • yes it is set in my include folder path

  • i have already set that in my include path

  • Could you check if "NRFX_USBD_ENABLED" is set to '1' in your sdk_config.h?

  • I checked for it, It was not defined in sdk_config.h

    Now after including all the related files and macros in makefile and sdk_config, I am stuck with following compilation error..

    Compiling file: main.c
    Linking target: _build/nrf52840_xxaa.out
    _build/nrf52840_xxaa/nrfx_usbd.c.o: In function `usbd_dmareq_process':
    /home/bhumik/zipnet/app/ftd/pca10056/blank/armgcc/../../../../../nrf_sdk_thread/modules/nrfx/drivers/src/nrfx_usbd.c:1469: undefined reference to `nrfx_systick_delay_us'
    /home/bhumik/zipnet/app/ftd/pca10056/blank/armgcc/../../../../../nrf_sdk_thread/modules/nrfx/drivers/src/nrfx_usbd.c:1477: undefined reference to `nrfx_systick_delay_us'
    /home/bhumik/zipnet/app/ftd/pca10056/blank/armgcc/../../../../../nrf_sdk_thread/modules/nrfx/drivers/src/nrfx_usbd.c:1480: undefined reference to `nrfx_systick_delay_us'
    /home/bhumik/zipnet/app/ftd/pca10056/blank/armgcc/../../../../../nrf_sdk_thread/modules/nrfx/drivers/src/nrfx_usbd.c:1482: undefined reference to `nrfx_systick_delay_us'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `isPortOpened':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:176: undefined reference to `app_usbd_cdc_acm_line_state_get'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `cdcAcmUserEventHandler':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:107: undefined reference to `app_usbd_cdc_acm_read_any'
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:121: undefined reference to `app_usbd_cdc_acm_rx_size'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `processReceive':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:235: undefined reference to `app_usbd_cdc_acm_read_any'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `processTransmit':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:247: undefined reference to `app_usbd_cdc_acm_write'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `otPlatUartSend':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:356: undefined reference to `app_usbd_cdc_acm_write'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o):(.rodata.sAppCdcAcm+0x4): undefined reference to `app_usbd_cdc_acm_class_methods'
    collect2: error: ld returned 1 exit status
    ../../../../../nrf_sdk_thread/components/toolchain/gcc/Makefile.common:292: recipe for target '_build/nrf52840_xxaa.out' failed
    make: *** [_build/nrf52840_xxaa.out] Error 1
    make: Leaving directory '/home/bhumik/zipnet/app/ftd/pca10056/blank/armgcc'
    
    I have already included nrfx_systick.h in main.c and set NRFX_USBD_ENABLED 1 

  • Hi,

    Earlier NRFX_SYSTIC_ENABLED was not defined in sdk_config.h

    Please guide me with following openthread libraries related errors

    Linking target: _build/nrf52840_xxaa.out
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `isPortOpened':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:176: undefined reference to `app_usbd_cdc_acm_line_state_get'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `cdcAcmUserEventHandler':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:107: undefined reference to `app_usbd_cdc_acm_read_any'
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:121: undefined reference to `app_usbd_cdc_acm_rx_size'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `processReceive':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:235: undefined reference to `app_usbd_cdc_acm_read_any'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `processTransmit':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:247: undefined reference to `app_usbd_cdc_acm_write'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o): In function `otPlatUartSend':
    C:\bamboo\xml-data\build-dir\KNG-OL-BOLO\sdk\sdk\nrf5\external\openthread\project\nrf52840\openthread_nrf52840\sdk\usb\armgcc/../../../../../openthread/examples/platforms/nrf528xx/src/usb-cdc-uart.c:356: undefined reference to `app_usbd_cdc_acm_write'
    ../../../../../nrf_sdk_thread/external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-sdk-usb.a(usb-cdc-uart.c.o):(.rodata.sAppCdcAcm+0x4): undefined reference to `app_usbd_cdc_acm_class_methods'
    collect2: error: ld returned 1 exit status
    ../../../../../nrf_sdk_thread/components/toolchain/gcc/Makefile.common:292: recipe for target '_build/nrf52840_xxaa.out' failed
    make: *** [_build/nrf52840_xxaa.out] Error 1
    

  • Try setting sdk_config.h::APP_USBD_CDC_ACM_ENABLED to '1' and see if this helps.

     

    Kind regards,

    Håkon

Reply Children
Related