Atmel doesn't include Socket/Networking files

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So I'm currently working on porting someone's UDP Socket library into a program that uses an SAME54 Xplained Pro to communicate to a host computer over UDP, but the problem I'm running into is that a lot of the files included in the library aren't automatically included in the Atmel Studio Program Files. Files like socket.h, netdb.h, and netinet/in.h are some of the major ones. I've been trying to manually add in all of these files into Atmel's Program Files, but it's been pretty painful, especially when each new included file has five other files that it needs that Atmel doesn't have.

 

It feels like there's a much better solution to this problem, but I can't really tell what that would be as a beginner to Atmel. Any suggestions would be greatly appreciated so that I can stop CTRL+C ing and CTRL+V ing all of these annoying header files.

 

Edit: I'm now realizing that this is a result of Atmel using newlib as its C runtime library (optimized for embedded systems), instead of glibc. Now to figure out how to change/improve newlib to something else...

This topic has a solution.

rlvnt_clwn

Last Edited: Mon. Jul 8, 2019 - 01:00 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

What OS are you using?  Are you adding some UDP-based service to a standard IP/TCP stack, or are you implementing "UDP over bare metal"?
Some of the "small microcontroller" libraries that implement IP Stacks (FreeRTOS+TCP, lwIP, uIP, etc) should include the support files like socket.h, and are probably a better direction to head than trying to port a libc that expects to be working in a Posix-like OS environment...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm on Windows, and I'm trying to implement UDP over bare metal. I knew those libraries did TCP, but I didn't realize they could do UDP as well. I wanted to port this particular library because it was written by one of my superiors and it had a lot of troubleshooting functionality that some of the others didn't. However, I think it's just gonna be too much trouble trying to port glibc into Atmel so looking ahead, I'll try to work on using lwIP or uIP. Thanks!

rlvnt_clwn