cancel
Showing results for 
Search instead for 
Did you mean: 

start code execution problem with MX_LWIP_Init

S_bgh99
Associate III

Hi

I add ethernet communication to my program with STM32CubeMx and I just compiled and run it. I have a problem:

if I disconnect Jlink the board I have a ping error. but I run the code with 3 times click on run in MDK-ARM the board will ping.

I also try my app without

MX_LWIP_Init();

if I comment this line all thing is good.

you can find 3-time click video here

8 REPLIES 8
alister
Lead
SKast.1
Associate II

Hi, S_bgh99,

Did you find the solution for the problem you mentioned?

If Yes, can you suggest me what is the way to figure out this issue.

NAham.1
Associate II

Hello S_bgh99,

I am facing the above said issue

Could you please guide me to fix this issue

Thanks in Advance!

NAham.1
Associate II

Hi,

I got the solution for this issue

Thanks!

Would you tell me a bit more about how have solved this issue? I have very similar problems and looking for a solution. Thank you in advance!

jezo
Associate

I had the same problem. This is caused by the use of printf in the LWIP library. The Retarget.c file must be added to the project, or just add this smal code to main.c

 

struct __FILE { int handle; };
FILE __stdout;

int fputc(int c, FILE *f) {
  return (0);
}

 

 


Hi, I have the exact same problem with STM32H743VIT6, how did you solve the issue ? Can you please share some solution ? 
Thanks for the interest and time.

NAham.1
Associate II

Hi,

Try with enabling microLib option

NAham1_0-1724052065602.png

 

Thanks & Regards