Question

I've recently programmed a client server program in C where the server was running on an embedded board that had a Linux OS and the client was running on a Linux machine. All I had to do was specify the board's IP address to the client running on the machine to establish a connection.

But now I'm doing essentially the same thing but the server is running on an embedded board that has no OS. I'm still establishing a tcp/ip connection between the server and the client, but I'm using a standard library called uIP (microIP).

I was told that the code that would run on the embedded board (the server) would be very tricky to write since it would have to be platform specific, i.e I'd be better off getting a code that was already intented for the platform. My question is though: why is it that much harder to program a C file on a board to establish a connection when the board has no OS, when it was relitavely "easy" to do so on the board with an OS. All I did for the latter was write the code on the Linux machine, then transfer the code on the OS board with scp, compile it, and execute it. Why can't the same be done for the OS'less board? I know I wouldn't be able to compile on the board, but can't I cross compile the server on a machine, and load it onto the board without having to worry about anything else? Why is this circumstance so much more complicated than if I were working with an OS board?

Was it helpful?

Solution

The uIP library most likely implements just the TCP stack. It still needs a way to talk to the hardware. This is what OS is for. Setting up DMA, managing buffers, serving interrupts (and interacting mainline code with ISRs).

With no OS you'd have to implement everything manually.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top