cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135F-DK - Netx Duo WebServer - unable program application to STM32MP135F-DK

ravo
Senior

Dears,

I am able to compile Nx_WebServer demo. But when I try to run/debug it will halt.

I read all notes in NetXDuo/Nx_WebServer/readme.html - the last chapter "How to use it ?"

  • Open your preferred toolchain
  • Rebuild and run DDR_Init example to initialize the DDR memory
  • Rebuild all files and load your image into target memory
  • For STM32CubeIDE, in order to keep DDR initialized, please remove “monitor reset” line in “Debug Configurations->Startup>Initialization Commands”
  • Run the application

But I end on red line - unable load image - Where could be problem ?

I am able to compile and debug another aplication ftom STM32Cube_FW_MP13_V1.0 like UART, ADC examples withou error.

ravo_0-1706110928654.png

Error in final launch sequence:

 

Failed to execute MI command:

target extended-remote localhost:3333

 

Error message from debugger back end:

Remote communication error. Target disconnected.: (undocumented errno 10061).

Failed to execute MI command:

target extended-remote localhost:3333

 

Error message from debugger back end:

Remote communication error. Target disconnected.: (undocumented errno 10061).

Remote communication error. Target disconnected.: (undocumented errno 10061).

 

Console log:

Info : SWD DPIDR 0x6ba02477

Warn : target STM32MP135FAFx.ap1 examination failed

Warn : target STM32MP135FAFx.axi examination failed

Error: Could not initialize the APB-AP

Warn : target STM32MP135FAFx.cpu examination failed

Info : gdb port disabled

Info : gdb port disabled

Info : starting gdb server for STM32MP135FAFx.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : accepting 'gdb' connection on tcp/3333

Error: Target not examined yet

Error executing event gdb-attach on target STM32MP135FAFx.cpu:

 

Info : New GDB Connection: 1, Target STM32MP135FAFx.cpu, state: unknown

Error: Target STM32MP135FAFx.cpu not examined yet, refuse gdb connection 1!

Error: attempted 'gdb' connection rejected

shutdown command invoked

 

Best Regards

Radim

14 REPLIES 14
ravo
Senior

Dear @DBELL.1 

I have also tried to comment out creation of DHCPClient and appropriate callback

318: // ret = nx_dhcp_create(&DHCPClient, &IpInstance, "dhcp_client"); in app_netxduo.c

350: // ret = nx_ip_address_change_notify(&IpInstance, ip_address_change_notify_callback, NULL);

392: // ret = nx_dhcp_start(&DHCPClient);

Note: Also commented error handler for each statement "if (ret != NX_SUCCESS) {...}"

 

At end of initialization code in function UINT MX_NetXDuo_Init(VOID *memory_ptr) i put these lines:

ret = nx_ip_address_get(&IpInstance, &IpAddress, &NetMask);

PRINT_IP_ADDRESS(IpAddress);
PRINT_IP_ADDRESS(NetMask);

and it will report correct IP address...

So I suppose that IP was set and should be working. But application is still not working... What must I do to use static IP instead of using DHCP client ?

Best Regards

Radim

DBELL.1
ST Employee

hello @ravo ,

This question seems to be a tricky one.
I asked some specialist people.
And I will post an answer as soon as I have it.

regards,
David

Dear @DBELL.1 ,

thanks for your support.

And in meanwhile I browse source code again and found

line 398:

/* wait until an IP address is ready */
if(tx_semaphore_get(&Semaphore, TX_WAIT_FOREVER) != TX_SUCCESS)
{
Error_Handler();
}

When I remove waiting for this semaphore it will continue in App_Main_Thread_Entry and finish initialization of WebServer application.

 

So now it seems all works fine.

I will wait for your answer... if I need only these lines remove... or if there better way, some #define or etc.

Radim

DBELL.1
ST Employee

Hello @ravo ,

 

I didn't receive any lowlight from expert about your modification.
So I guess, it's fine and you can go with it.

regards,
David

Dear @DBELL.1 ,

thanks for all.

Maybe there was some incompatibility with dhcpserver downloaded from https://www.dhcpserver.de/cms/download/ 

This will hang somewhere in initialization sequence.

Now with HW router with enabled DHCP or using STATIC IP address all works fine.

 

Regards

Radim