Forum Discussion
networking without OS Support
Hello ,
I am trying to run networking application without Uc/OS-II Support, (not using standard UDP_Offload or Super_Loop) for this i have choose the simple socket server server (RGMII) example and strip out OS feature one by one, at the end it gives some error regarding 1. FindLastFlashSector 2. generate_and_store_mac_address 3. get_board_mac_addr etc. though i have add the network_utilities.c and network_utilities.h but still i am facing the problem (see the attached printscreen of error) i am using Altera Cyclone-II Development Board "Embedded Development board" i have attached the c files 1.network_utilities.c 2.network_utilities.h 3.simple_socket_server.c 4.tse_my_system Regards kaushal23 Replies
- Altera_Forum
Honored Contributor
Those errors are due to a typo in simple_socket_server.c
You included # include "network_utilities.c" instead of # include "network_utilities.h" - Altera_Forum
Honored Contributor
Not done this myself, though might get there in the next few months. But I note that it says "multiple definitions" rather than not defined. If you look at your error list, it shows that you have one definition on line 23 and it is redefined on line 300 (or similar - can't see your attachment at the moment!). Have you got two copies of the code here?
Simon - Altera_Forum
Honored Contributor
--- Quote Start --- Those errors are due to a typo in simple_socket_server.c You included# include "network_utilities.c" instead of# include "network_utilities.h" --- Quote End --- Hello Thanking you by adding network_utilities.h the error has gone once again thanking you. Regards kaushal - Altera_Forum
Honored Contributor
where do i put alt_iniche_init() and netmain() function so that my network hardware initialize , till now i have put these two function in network_utilitiese.c and simple_socket_server.c but it haven't yet initilize and during run time (when i do run as a nios hardware) it says
panic: unlock NET dtrap -need breakpoint (please see attached print screen) regards kaushal - Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
I've not told you in the previous post, but I was concerned you would be able to run an interniche application with neither OS nor superloop mode.
The alt_iniche_init and netmain functions are supposed to create specific tasks with OS. If you call them in a non-OS environment they probably generate some sort of exception or they are possibly blocking, thus preventing your application from working. - Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
TK_SLEEP is a OS specific function (or maybe a macro): it is supposed to release the control to other tasks, but you don't have any, so you can't use it.
I've seen non-OS implementations of sleep functions but they are blocking and they are only meant to add the time delay. - Altera_Forum
Honored Contributor
so is there any other way to go forward ...i mean what make hardware initialize up to "Auto Negotiation pass" not beyond that.
it seems that it going to work...if it go up to auto negotiation. Regards kaushal - Altera_Forum
Honored Contributor
Up to MAC and PHY initialization, OS is not involved, since those are execute-once functions.
You need OS features, superloop or any other interrupt scheduled process after inizialization when you really start sending and transmitting packets, especially if you need to manage a complex trasport protocol like tcp.