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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

14 REPLIES 14
OlivierK
ST Employee

Dear @ravo 

 

I do not reproduce this error at my end in running this particular example after following the readme file.

 

This typical error msg usually indicates that 

1- you haven't run the DDR init example prior running the NX_webserver project

2. you haven't changed the NX_webserver/debug properties as mentioned in the readme file (please remove “monitor reset” line )

 

Board boot pins must be set in "Engineering boot mode" But you said you were already familiar with other HAL examples so I don't think this was your issue.

 

Best Regards

Olivier

 

Dear @OlivierK ,

Thanks for answer.

As I wrote earlier I have already run DDR Init, and monitor reset lin in debug prop in startup section was removed. But how to verify if it is running ok?

 

Maybe I do something wrong here:   

Rebuild all files and load your image into target memory

I am doing it using STM32CubeIde with Debug command, is it ok?

Regards Radim

 

 

Small update,

I have looked that blue led is blinking (after DDR_Init - but only when it is running in DEBUG mode, when RUN then nothing...)

Then I am able to start DEBUG for NETX Duo application... But then it will show warning...

ravo_0-1706259063970.png

When I push Resume button, then it will start... 

I got info in UART that project is running. But unable to continue...

When stop and restart debug once more it will never send data to UART...

May I doing still something wrong ?

Regards

Radim

 

Hi @ravo 

 

Yes, CubeIDE projects are made to be debugged directly in Engineering mode by plugging a stlink usb cable,

I use the bug button to enter debug:

OlivierK_0-1706260915727.png

 

  • Rebuild and run DDR_Init example to initialize the DDR memory

It means you need to run the DDR_init example first, if properly done you should see the blue led toggling (DK-board) indicating the DDR is properly initialized. Once there, you should quit the DDR init project without resetting the board.

  • Build the Nx_WebServer_A7 project as is.
  • Modify the Nx_WebServer_A7 project debug configuration ( remove "monitor reset")
  • Enter debug.

Regarding the projet build itself, there is nothing to change it works as is. If you want to enable the  Nx_WebServer_A7 debug symbol  you can modify :

  • Nx_WebServer_A7 project properties/ C/C++ build/Settings/MCU GCC Assembler/Debugging -> Debug level Maximum.
  • Nx_WebServer_A7 project properties/ C/C++ build/Settings/MCU GCC Compiler/Debugging -> Debug level Maximum.

Regards,

Olivier

 

Dear @OlivierK 

thanks for your comments.

Really I must do "Rebuild and run DDR_Init example to initialize the DDR memory" every time prior to start new debug session for Nx_WebServer application ?

I only receive "Nx_Webserver application started.." in UART terminal

nothing else... 

So I tried adding more debug prints... and I see that all initialization is done successfully.

Can I define specific IP address instead using DHCP ?

Best regards

Radim

 

Second update.

I found how change to static IP:

In file Applications/NetXDuo/Nx_WebServer/NetXDuo/App/app_netxduo.c 

 

 

line 175:

ret = nx_ip_create(&IpInstance, "NetX IP Instance 0", STATIC_IP_ADDRESS, MASK_IP_ADDRESS, &EthPool, nx_stm32_eth_driver,

pointer, 2 * DEFAULT_MEMORY_SIZE, DEFAULT_PRIORITY);

 

when define:

#define STATIC_IP_ADDRESS IP_ADDRESS(192,168,0,2)

#define MASK_IP_ADDRESS IP_ADDRESS(255,255,255,0)

 

Then when I try ping board it answer correctly. So application is running and it is connected to network

But still no mor logs... is it normal ?

I copy content of ..\Applications\NetXDuo\Nx_WebServer\Web_Content\ to root of microSD formated as FAT.

But I only get ping response, unable to get running web server on http://192.168.0.2/

I have read readme.html once more... but I can't find where is the error.

Thanks in advance for your help.

Regards Radim

 

DBELL.1
ST Employee

Hello @ravo ,

 

It seems you have the same DHCP server problem to provide the address as the other post.
https://community.st.com/t5/stm32cubeide-mpus/nx-iperf-a7-unable-run-tcp-test-both-client-server-and-udp/td-p/634463

 

Did it work well now?

 

regards,
David

Dear @DBELL.1 

Yes you are correct, now the application is running normally. But I have some notes:

(1) When opening http://IP@/about.html is OK as it was written in readme.html. But there should be better to retarget from http://IP@/ or usage index.html for better usage.

(2) And for last How to setup NetXDuo to use static IP address ? As I wrote in previous post. I am able to start using:

ret = nx_ip_create(&IpInstance, "NetX IP Instance 0"STATIC_IP_ADDRESS, MASK_IP_ADDRESS, &EthPool, nx_stm32_eth_driver,

pointer, 2 * DEFAULT_MEMORY_SIZE, DEFAULT_PRIORITY);

when define:

#define STATIC_IP_ADDRESS IP_ADDRESS(192,168,0,2)
#define MASK_IP_ADDRESS IP_ADDRESS(255,255,255,0)

But then NetXDuo application did not work correctly (only ping response)

What could be here wrong...

 

Best Regards

Radim

DBELL.1
ST Employee

Hello @ravo ,

 

Further in the code, in the same function, there are:
ret = nx_dhcp_create(&DHCPClient, &IpInstance, "dhcp_client");
and
ret = nx_ip_address_change_notify(&IpInstance, ip_address_change_notify_callback, NULL);

and in App_Main_Thread_Entry():
ret = nx_dhcp_start(&DHCPClient);
where the address is set.

That's why your modification shouldn't be taken into account.

regards
David