cancel
Showing results for 
Search instead for 
Did you mean: 

Generating code for HTTPD in NUCLEO-H745ZI Board

ggowd.1
Associate III

Hi Team,

"I am trying to configure an HTTP server on the Nucleo-H745ZIT6 board, which has two Cortex cores. I am using Cortex-M7 for this. After enabling HTTP in middleware inside LwIP, and generating the code, LwIP is placed inside the Cortex-M7 folder, but the HTTP code is generated outside of it. When compiling, I get an error saying 'fsdata.c: No such directory.' They are adding the HTTP image inside the HTTP folder, but I need to configure the resources configuration but not getting the option and I'm not sure how. Can you help me with this?"

i am using stmcubeide 1.15.1 software

Best Regards,
Gagan Gowda

5 REPLIES 5
Ghofrane GSOURI
ST Employee

Hello @ggowd.1 

First I recommend you  to use the latest version of CubeMX 6.12.1 and CubeIDE 1.16.1 

After checking your IOC , all you need to do is to add the fsdata.c manually  to your project ,

If "fsdata.c" has not been copied in your project, it can be taken from the Firmware Repository (Menu Help > Updater Settings...) Software Package folder within Middlewares\Third_Party\LwIP\src\apps\http folder.

actually those informations  are mentioned in parameter description 

GhofraneGSOURI_0-1729251389977.png

GhofraneGSOURI_1-1729251455307.png

GhofraneGSOURI_2-1729251872285.png

 

THX

Ghofrane

 

Hi @Ghofrane GSOURI 

I added fsdata.c and fsdata_custom.c to the HTTP folder. After that, when I called httpd_init(), I received a warning: 'implicit declaration of function httpd_init'. What should I do to resolve this?"

PFA of http folder i am not arrow of that folder

Best Regards,
Gagan Gowda

Hi @Ghofrane GSOURI 

"The HTTP folder is generated outside the Cortex-M7 core, which is why the httpd_init() function is showing an implicit function declaration warning. As a result, the down arrow is not appearing on that folder."

This suggests that there might be an issue with the folder structure or file linking in your project. You may need to adjust the file paths or move the HTTP-related files inside the Cortex-M7 core directory to resolve the issue.


Best Regards,
Gagan Gowda

The warning "implicit declaration of function ''httpd_init'' indicates that the compiler encountered a call to the "httpd_init" function before it had seen a declaration or definition for that function.

httpd_init function is declared in httpd.c file and you want to use it in fs.c file  ,just Include this header in your fs.c file:

#include "lwip/apps/httpd.h"

 

Hi @Ghofrane GSOURI 

After adding the include library, clicking on a function takes me to the declaration in the .h file, but the .c files appear black. If they were enabled, they should appear in white. Please help me out.

PFA of image

Best Regards,
Gagan Gowda