cancel
Showing results for 
Search instead for 
Did you mean: 

How to develop Http server application on STM32F4 Discovery Board using STM32CubeMX and Keil

it
Associate
Posted on May 02, 2016 at 11:01

Dear all,

Actually we are designing a hardware using STM32f407VGT6 micro-controller, already we are accessing this hardware with usb, but in addition we want Ethernet based communication to operate that hardware(access data and control both), so we start to test it first on STM32F4 Discovery kit and Base Board.

We download demo code for Http Server using LWIP Stack and run it using Keil ide, the demo code working fine, we were unable to access that web application using IP, that is code to microcontroller.

But when we are trying to create a code using STM32CubeMX, it only create lwip code not Http Server code.

We don't want to run or use democode, that was ok only for initial demo, now we want to create own using STM32Cube Mx and Keil.

So plz anyone help us in this project guide us, ''How to develop Http server application on STM32F4 Discovery Board using STM32CubeMX and Keil''

Thank you Members

Regards,

Mohit

#lwip #stm32cubemx #stm32cubemx #stm32f4 #stm32f4 #!stm32f4 #discovery #discovery #!stm32f4
6 REPLIES 6
slimen
Senior
Posted on May 02, 2016 at 19:20

Hi,

I'd recommend you to have a look to the paragraph B.3.6 LwIP in the

http://www2.st.com/content/ccc/resource/technical/document/user_manual/10/c5/1a/43/3a/70/43/7d/DM00104712.pdf/files/DM00104712.pdf/jcr:content/translations/en.DM00104712.pdf

User manual.

Regards

it
Associate
Posted on May 03, 2016 at 09:07

Hello forumstm32,

First of all thank you for reply.

I check that PDF file and we already apply, that is given in this.

Actually, when we try to run demo(downloaded form st or keil website), its working fine.

We got output on screen using web browser by access ip 192.168.0.10 (i.e. asign to microcontroller), like this as showing in this video

https://www.youtube.com/watch?v=xXVLaop9W4M

But when we are generating the code through STM32CubeMX, it consist only lwip stack middleware library, not have web code or folder that should be access through web browser, i mean that generated code not consist the Html files folder.

So how can we create that, any idea?

Thank you

Regards,

Mohit

Posted on May 03, 2016 at 14:48

Cube is just a framework tool, it is not going to create complicated applications.

You'd want to look at how the other ETH/LwIP examples in-line a file system. Specifically the use of tools to create .C/.H files encapsulating files in a directory.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Lobo.Nimal
Associate
Posted on August 04, 2016 at 18:07

Hi Clive,

Do you have any pointers on how to create a file system and link functionality back to the MCU?  Maybe a book, tutorial or manual?  

I see there is an existing example, but not much went into how it was created.  I am a controls engineer so this is a bit out of my domain.

Thanks.

Posted on August 04, 2016 at 21:29

I'm an Electronics Engineer

The tool, or script, in question is makefsdata

https://github.com/goertzenator/lwip/tree/master/contrib-1.4.0/apps/httpserver_raw/makefsdata

A quick Google found a Windows GUI tool for doing this.

http://developers.stf12.net/Ethernet-demo/latest-news/Added-Makefsdata-utility

It is a basically tool that navigates a sub-directory, and outputs .C and .H files, as required, to describe the data in a way that can be compiled into the application. The abstraction is managed by the FS.C code, which emulates open, close, read interfaces to the file system encapsulated in the creation step.

To read files off an SD Card would require replacing some or all of the file system layer of the web server.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
stm32cube-t
Senior III
Posted on October 07, 2016 at 17:33

Dear Mohit,

You can use the example code provided as reference into STM32Cube firmware package.

STM32CubeMX has downloaded this package to a repository folder on your PC (Check updater settings for repository location): go to the project directory, then to the EVAL board directory, and application folder. There you'll find LwIP examples such as the ''LwIP_HTTP_Server_Netconn_RTOS'' example project.

Best regards