I compared the 2 version of "ipcfg.c" and apply the modification at line 808. I also verify that "ipcfg_bind_autoip_internal_actual" is never called.
I put the call to the function "ipcfg_unbind" before "ipcfg_bind_staticip" but it doesn't work.
I copy in our "ipcfg.c" file the "ipcfg_release_device", "ipcfg_release_interface" and "ipcfg_del_interface" functions from your file. After that, I put the next code before to call "ipcfg_unbind" to change IP at Runtime.
Step 1)
if(ipcfg_release_device(device) != RTCS_OK)
{
return;
} // OK it work
Step 2)
ENET_get_mac_address(device, newMac, mac);
result = ipcfg_init_device(device, mac); // KO
The step 2 failed in "ipcfg_init_interface" on call to:
| if (_lwsem_create (&ipcfg_data[device].control_semaphore, 1) != MQX_OK) |
| { |
| | return RTCSERR_IPCFG_INIT; |
| } |
and the program end to breakpoint on "_int_unexpected_isr" function.