Hi, It's some confidential my application; however, I copied all initialization of RTCS of the demo "eth_to_serial" to my app.
#if RTCSCFG_ENABLE_IP4
IPCFG_IP_ADDRESS_DATA ip_data;
uint32_t ip4_addr = ENET_IPADDR;
#endif
uint32_t error;
sockaddr addr;
_enet_address enet_addr = ENET_MAC;
uint32_t retval = 0;
SOCKETS_STRUCT sockets;
uint32_t conn_sock;
uint32_t client_sock;
_task_id rx_tid;
_task_id tx_tid;
FILE_PTR ser_device;
uint32_t option;
#if MQX_USE_IO_OLD
uint32_t param[3];
#endif
TASK_PARAMS task_p = {0};
rtcs_fd_set rfds;
int32_t err;
#if RTCSCFG_ENABLE_IP6
uint32_t n = 0;
uint32_t i = 0;
IPCFG6_GET_ADDR_DATA data[RTCSCFG_IP6_IF_ADDRESSES_MAX];
char prn_addr6[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
#endif
conn_sock = 0;
sockets.sock4 = 0;
sockets.sock6 = 0;
/* Initialize RTCS */
_RTCSPCB_init = 4;
_RTCSPCB_grow = 2;
_RTCSPCB_max = 20;
_RTCS_msgpool_init = 4;
_RTCS_msgpool_grow = 2;
_RTCS_msgpool_max = 20;
_RTCS_socket_part_init = 4;
_RTCS_socket_part_grow = 2;
_RTCS_socket_part_max = 20;
error = RTCS_create();
if (error != RTCS_OK)
{
fputs("Fatal Error: RTCS initialization failed.", stderr);
_task_block();
}
#if RTCSCFG_ENABLE_IP4
ip_data.ip = ENET_IPADDR;
ip_data.mask = ENET_IPMASK;
ip_data.gateway = ENET_IPGATEWAY;
#endif
/* Initialize ethernet */
error = ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, enet_addr);
The problem is that my code stucks in ipcfg_init_device(); I'm sure that it isn't advance because I debug it. I have some _task_create after this line, and I checked in the task summary that they aren't created. I try to debug in steps, but it's very long to step all functions inside of ipcfg_init_device().
BR,
Norberto Jiménez