Webserver001 app

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Is there anything needed in main.c in order to get the webserver running (able to get pinged)? I can compile without errors and transfer to XMC without problems.

Presently I use the settings from WEBSERVER001_Example2 although some of the underlying Apps seem to be changed in my setup (e.g. CLK001 does have "RTC" and "External Clock Output" tabs in my version but not in the example)

In my main.c I have used the following lines (according to WEBSERVER001_Example2 (which is also not running):

---------------------------------------
#include
#include "netconf.h"
#include "lwip/err.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#include "lwip/tcp.h"
#include "lwip/netif.h"
#include "./Dave/Generated/src/WEBSERVER001/HTTPServer/httpd.h"
#include //SFR declarations of the selected device
---------------------------------
//in main(void):

DAVE_init();
lwIPStack_init();
-------------------------------------
0 Likes
6 Replies
Not applicable
If you use lwIPStack_init() your development board should be able to respond on ping.
When I ping my board I disable the firewall of my antivirus.
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Thanks for the reply!

I did shut down the windows firewall as well as the antivirus firewall. I am able to ping other devices but still not the XMC.

My project can run via Solver/Generate Code/Build/Debug but then just nothing happens.


Does the Webserver001_example2 work with your setup? For me it also doesn't but at least I can build/debug the example project as given but fail for using --> Solver --> Generate Code

--> Syntax error's found in one or more code generation template. Please check the log file more info. (I did attach the ErrorLog.txt)


Using Dave 3.1.2
0 Likes
Not applicable
I tried only WebServer Example1 and I used XMC-HiLight board from Hitex.
Also I have started a simple project with ETH004 App, I configured all the apps, IP, ... , physical pins and in main.c I have just used lwIPStack_init() and then the board is responding on ping.
0 Likes
Not applicable
@ dorinjj: I also used the ETH004 App and configured just the mac adress, the IP adress and the pin assignment. I tried to ping the board with a linux machine and with a windows machine, but the board isn't responding on ping. Is there something else missing for getting started the ethernet interface?

int main(void)
{
status_t status; // Declaration of return variable for DAVE3 APIs

DAVE_Init(); // Initialization of DAVE Apps
status=lwIPStack_init();
if(status != DAVEApp_SUCCESS)
{
ERROR(GID_LWIP, lwIP_INIT_ERROR, 0, NULL);
}
else
{
Toggle(P3_9);
}
while(1)
{

}
return 0;
}
0 Likes
Not applicable
Petzi wrote:
@ dorinjj: I also used the ETH004 App and configured just the mac adress, the IP adress and the pin assignment. I tried to ping the board with a linux machine and with a windows machine, but the board isn't responding on ping. Is there something else missing for getting started the ethernet interface?

int main(void)
{
status_t status; // Declaration of return variable for DAVE3 APIs

DAVE_Init(); // Initialization of DAVE Apps
status=lwIPStack_init();
if(status != DAVEApp_SUCCESS)
{
ERROR(GID_LWIP, lwIP_INIT_ERROR, 0, NULL);
}
else
{
Toggle(P3_9);
}
while(1)
{

}
return 0;
}


Sorry, i can't help you.
0 Likes
Not applicable
@Petzi: I tried example 2 of Webserver and is responding on ping. Maybe your network cable is not a crossover cable.
0 Likes