EmbDev.net

Forum: ARM programming with GCC/GNU tools yagarto and serial i/o


Author: Carl (Guest)
Posted on:

Rate this post
0 useful
not useful
I'm trying to compile some Linux ARM code using Yagarto, but I'm running 
into difficulties when it comes to configuring serial i/o using the 
'termios' structure. Yagarto doesn't recognize any serial i/o options as 
it does when it's compiled under Linux using the GNU-ARM compiler:

serial.c: In function 'serial_speed':
serial.c:92: error: invalid application of 'sizeof' to incomplete type 
'struct termios'
serial.c:92: warning: left-hand operand of comma expression has no 
effect
serial.c:94: error: invalid use of undefined type 'struct termios'
serial.c:94: error: 'B9600' undeclared (first use in this function)
serial.c:94: error: (Each undeclared identifier is reported only once
serial.c:94: error: for each function it appears in.)
serial.c:94: error: 'CS8' undeclared (first use in this function)
serial.c:94: error: 'CREAD' undeclared (first use in this function)
serial.c:94: error: 'CLOCAL' undeclared (first use in this function)
serial.c:95: error: invalid use of undefined type 'struct termios'
serial.c:95: error: 'IGNPAR' undeclared (first use in this function)
serial.c:96: error: invalid use of undefined type 'struct termios'
serial.c:101: warning: implicit declaration of function 'tcflush'

I have include the header file 'termios.h', but I don't think it's 
finding the right one. The ones in Yagarto are vastly different than the 
ones in Linux.

Author: Jupp (Guest)
Posted on:

Rate this post
0 useful
not useful
I am not sure if this is possible with yagarto. Yagarto is afaik for 
bare metal systems only for it uses the EABI link format.

Have you tried another toolchain like code sourcery for linux targets?

http://www.codesourcery.com/sgpp/lite/arm/portal/s...

The lite edition is free like yargarto.

Author: Carl (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks I'll try it.

I also noticed that Yagarto doesn't contain support for networking. I 
can't find socket.h anywhere. Is this intentional, or will support for 
networking be a future addition?

/carl

Author: Andreas Schwarz (andreas) (Admin) Flattr this
Posted on:

Rate this post
0 useful
not useful
Yagarto is a toolchain for "bare metal" software. It only includes the 
standard library, no socket.h or any other POSIX stuff. If you want to 
run programs that use POSIX or Linux APIs, you need to run an operating 
system like eCOS, RTEMS or Linux, each of which require a special 
toolchain. If you only want to do networking, there are some simpler 
options like uIP, lwIP.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.