RA6M4 Azure RTOS nxd_bsd.c raw socket

Hi,

I am trying to use raw socket on nxd_bsd.c, but running into some errors. I can't find the function for _nx_driver_hardware_packet_received_callback and _nx_driver_hardware_packet_send.

Please can someone help me locate where these functions are?

Thanks in advance,

Victor

Parents
  • Hello Victor,

    Thanks for reaching out Renesas Engineering Community!

    Could you please give us more information about your application?

    Thank you!

    Best Regards,

    IK

  • Hello,

    The application is implementing EtherNet/IP protocol on RA6m4 using BSD addon. EtherNet/IP protocol requires LLDP to pass certification. To support LLDP, I think I need to use raw socket. To use raw socket I need to define it in nxd_bsd.h.

    When I define this, it enables some codes in nxd_bsd.h and nxd_bsd.c. I do have error message on the code below.

    I don't know where _nx_driver_hardware_packet_send and _nx_driver_hardware_packet_received_callback are defined. I have looked in every file in netxduo folder with no success.

    On ST github, I see they have _nx_driver_hardware_packet_send defined in https://github.com/STMicroelectronics/x-cube-azrtos-h7/blob/33d13302a3d58ec4c86091a6e81185996f3f75c8/Middlewares/ST/netxduo/common/drivers/nx_stm32_eth_driver.c. It looks like we are missing some RA driver files.

    Please, I need help locating the files.

    Thanks,

    Victor

  • Hello Victor,

    When using Azure RTOS NetX Duo BSD Support stack with all the necessary configuration a folder named BSD in location ra/microsoft/azure-rtos/netxduo/addons/BSD is generated which includes two files nx_bsd.c and nx_bsd.h file. If you will search on these files you will see that: 

    #ifdef NX_BSD_RAW_SUPPORT
    _nx_driver_hardware_packet_received_callback = _nx_bsd_hardware_packet_received;
    #endif /* NX_BSD_RAW_SUPPORT */

    in function bsd_initialize() at line 431.

    The implementation of _nx_bsd_hardware_packet_received() function starts from line 12865.

    Regarding function _nx_driver_hardware_packet_send() ,in the same file nx_bsd.c you will find out that this function is called by function _nx_bsd_hardware_internal_sendto(). The implementation of _nx_bsd_hardware_internal_sendto() starts at line 12681.

    What kind of error message are you getting on your code?

    Hope it helps!
    Best Regards,

    IK

  • Hello IK,

    Thanks for looking into this for me. Your explanation is correct, but the I am having is undefined reference on both _nx_driver_hardware_packet_received_callback and _nx_driver_hardware_packet_send(). 

    _nx_driver_hardware_packet_received_callback error

    _nx_driver_hardware_packet_send() error

    I can not find where these two are defined. Please can you help tell me where they are defined?

    Thanks very much for spending your time to look at this.

    Victor

Reply
  • Hello IK,

    Thanks for looking into this for me. Your explanation is correct, but the I am having is undefined reference on both _nx_driver_hardware_packet_received_callback and _nx_driver_hardware_packet_send(). 

    _nx_driver_hardware_packet_received_callback error

    _nx_driver_hardware_packet_send() error

    I can not find where these two are defined. Please can you help tell me where they are defined?

    Thanks very much for spending your time to look at this.

    Victor

Children