MCUXpressor RT1060 ThreadX NetX Demo Failing

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

MCUXpressor RT1060 ThreadX NetX Demo Failing

1,175 Views
chadgraham
Contributor V

Hi,

When trying to integrate the IMX NetX ping example, the compiler complains that several items within the NX library are not referenced.  The problem seems to be related to the "VOID nx_driver_imx( NX_IP_DRIVER *driver_req_ptr)" integration.  Any help would be appreciated.

Command in code copied directly from sample_netx_duo_ping.c:

  /* Create an IP instance.  */

  status = nx_ip_create(&ip_0,

    "NetX IP Instance 0",

    #ifdef NX_ENABLE_DHCP

      IP_ADDRESS(0,0,0,0),

      IP_ADDRESS(0,0,0,0),

    #else

      IP_ADDRESS(192, 2, 2, 149),

      0xFFFFFF00UL,

    #endif

    &pool_0, nx_driver_imx,

    (UCHAR*)ip_thread_stack,

    sizeof(ip_thread_stack),

    1);

Errors reported by MCUXpresso:

Description Resource Path Location Type
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_arp_packet_deferred_receive.o): in function `_nx_arp_packet_deferred_receive': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_driver_imxrt1062.o): in function `enet_init': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ip_create.o): in function `_nx_ip_create': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ip_packet_deferred_receive.o): in function `_nx_ip_packet_deferred_receive': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ip_periodic_timer_entry.o): in function `_nx_ip_periodic_timer_entry': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ip_thread_entry.o): in function `_nx_ip_thread_entry': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ipv4_packet_receive.o): in function `_nx_ipv4_packet_receive': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ipv6_multicast_join.o): in function `_nx_ipv6_multicast_join': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ipv6_multicast_leave.o): in function `_nx_ipv6_multicast_leave': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_ipv6_process_fragment_option.o): in function `_nx_ipv6_process_fragment_option': RtController C/C++ Problem
..\RtControllerRtosNxdLibrary\Debug\libRtControllerRtosNxdLibrary.a(nx_rarp_packet_deferred_receive.o): in function `_nx_rarp_packet_deferred_receive': RtController C/C++ Problem
make: *** [makefile:75: RtController.axf] Error 1 RtController C/C++ Problem
undefined reference to `_printf' nx_driver_imxrt1062.c /RtControllerRtosNxdLibrary/source line 1626 C/C++ Problem
undefined reference to `_tx_event_flags_create' RtController line 210, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_create.c C/C++ Problem
undefined reference to `_tx_event_flags_get' RtController line 233, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_thread_entry.c C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_arp_packet_deferred_receive.c /RtControllerRtosNxdLibrary/source line 135 C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_ip_packet_deferred_receive.c /RtControllerRtosNxdLibrary/source line 111 C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_ip_periodic_timer_entry.c /RtControllerRtosNxdLibrary/source line 84 C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_ipv4_packet_receive.c /RtControllerRtosNxdLibrary/source line 603 C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_ipv6_process_fragment_option.c /RtControllerRtosNxdLibrary/source line 205 C/C++ Problem
undefined reference to `_tx_event_flags_set' nx_rarp_packet_deferred_receive.c /RtControllerRtosNxdLibrary/source line 134 C/C++ Problem
undefined reference to `_tx_mutex_create' nx_ip_create.c /RtControllerRtosNxdLibrary/source line 207 C/C++ Problem
undefined reference to `_tx_mutex_get' RtController line 236, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_thread_entry.c C/C++ Problem
undefined reference to `_tx_mutex_get' nx_ip_thread_entry.c /RtControllerRtosNxdLibrary/source line 138 C/C++ Problem
undefined reference to `_tx_mutex_get' nx_ipv6_multicast_join.c /RtControllerRtosNxdLibrary/source line 91 C/C++ Problem
undefined reference to `_tx_mutex_get' nx_ipv6_multicast_leave.c /RtControllerRtosNxdLibrary/source line 89 C/C++ Problem
undefined reference to `_tx_mutex_put' RtController line 230, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_thread_entry.c C/C++ Problem
undefined reference to `_tx_mutex_put' RtController line 96, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ipv6_multicast_leave.c C/C++ Problem
undefined reference to `_tx_mutex_put' RtController line 97, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ipv6_multicast_join.c C/C++ Problem
undefined reference to `_tx_thread_identify' RtController line 213, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_create.c C/C++ Problem
undefined reference to `_tx_thread_preemption_change' RtController line 218, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_create.c C/C++ Problem
undefined reference to `_tx_thread_preemption_change' RtController line 291, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_create.c C/C++ Problem
undefined reference to `_tx_timer_create' RtController line 231, external location: c:\nxp\mcuxpressoide_11.1.1_3241\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728\tools\arm-none-eabi\bin\ld.exe: ..\RtControllerRtosNxdLibrary\source\nx_ip_create.c C/C++ Problem

Labels (1)
0 Kudos
5 Replies

1,033 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Chad Graham ,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
According to the error messages, they indicate that fail to utilize the library, however, the error messages provide the clue to fix, such as

undefined reference to `_printf' nx_driver_imxrt1062.c /RtControllerRtosNxdLibrary/source line 1626 C/C++ Problem
undefined reference to `_tx_event_flags_create' RtController line 210, external location‍‍

Obviously, they will take some time, so please be patient to do this 'duty work'.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,033 Views
chadgraham
Contributor V

Hi,

Thank you for looking into this.  After commenting out the nx_ip_create() function, I continued to integrate the demo code and found more issues.  Additional failures are located in the nx_tcp_enable() and nx_icmp_enable() functions and appear to be the same/similar to the ones generated by the nx_ip_create() and nx_driver_imx() functions.

Edit:

Please also check the FX and UX source files for errors.  Trying to work from the USBX Host Mass Storage sample and the compiler complains that a _tx_timer_create and a _txe_mutex_create are undefined references in fx_system_initialize.c and ux_utility_mutex_create.c files. 

0 Kudos

1,033 Views
jeremyzhou
NXP Employee
NXP Employee

HiChad Graham ,

Thanks for your reply.
To provide the fastest possible support, I'd highly recommend you refer to the post: https://www.softwaretestinghelp.com/cpp-errors/ to figure out the reason for the Undefined Reference error.

Have a great day,

TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,033 Views
chadgraham
Contributor V

Hello,

Per your suggestion, I have been looking more closely at the undefined references and have found an interesting situation.

Using only the project demo "sample_usbx_host_mass_storage" and linking it to the tx, fx, ux and mimxrt1060_library projects generates a case where a file (ux_host_stack_hcd_thread_entry.c) is unable to locate a #define UX_DISABLE_INTS.  The ux_host_stack_hcd_thread_entry.c includes the ux_api.h file which includes the ux_port.h file that contains that actual definition for UX_DISABLE_INTS.

If I build only the UX library project, the system compiles without issues and generates the expected output files.  However, if I build the sample_usbx_host_mass_storage project, the system generates the unresolved reference to the defined symbol.  Why would a defined symbol in an included file not be recognized when the files are in the same source folder and clicking on the #include lines correctly jumps to the proper file.

0 Kudos

1,033 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Chad Graham,

Thanks for your reply.
1)  Why would a defined symbol in an included file not be recognized when the files are in the same source folder and clicking on the #include lines correctly jumps to the proper file?
-- According to your description, it seems this issue is related to files or library path, please check it.

Have a great day,

TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos