Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom baud rate code fails to build on mips* #98

Open
jcowgill opened this issue Mar 21, 2018 · 3 comments
Open

Custom baud rate code fails to build on mips* #98

jcowgill opened this issue Mar 21, 2018 · 3 comments

Comments

@jcowgill
Copy link

Enabling USE_CUSTOM_BAUD in the Makefile and then building on MIPS fails with:

cc -Wall -g -DVERSION_STR=\"3.2a\" -DTTY_Q_SZ=0 -DHIGH_BAUD -DUSE_FLOCK -DHISTFILE=\".picocom_history\" -DLINENOISE -DUSE_CUSTOM_BAUD -o term.o -c term.c
In file included from term.c:73:0:
term.c: In function ‘term_get_baudrate’:
termios2.h:41:41: error: ‘struct termios’ has no member named ‘c_ispeed’
 #define cfgetispeed_custom(tiop) ((tiop)->c_ispeed)
                                         ^
term.c:860:31: note: in expansion of macro ‘cfgetispeed_custom’
                     *ispeed = cfgetispeed_custom(&term.currtermios[i]);
                               ^~~~~~~~~~~~~~~~~~
termios2.h:40:41: error: ‘struct termios’ has no member named ‘c_ospeed’
 #define cfgetospeed_custom(tiop) ((tiop)->c_ospeed)
                                         ^
term.c:871:22: note: in expansion of macro ‘cfgetospeed_custom’
             ospeed = cfgetospeed_custom(&term.currtermios[i]);
                      ^~~~~~~~~~~~~~~~~~
Makefile:65: recipe for target 'term.o' failed
make: *** [term.o] Error 1

On MIPS, glibc's copy of struct termios does not have any c_ispeed or c_ospeed fields.

@npat-efault
Copy link
Owner

As is clearly stated in the documentation, custom baudrate support is not available for all OS and architecture combinations. MIPS / Linux is obviously not one of them.

Naturally, any patch to fix this (and add support for MIPS/Linux) would be greatly appreciated.

I may try to add support myself at some point, but: (a) since MIPS libc does not have the c_ispeed and c_ospeed fields, the patch will not be totally trivial (requires some thought and work) (b) I don't have the hardware to test it on. Because of these, it would be preferable if someone better equipped would provide the patch...

@npat-efault
Copy link
Owner

For MIPS / Linux, the default picocom build (without forcing baudrate support) should work ok, (but without custom baudrate support)

@rc-matthew-l-weber
Copy link

Similar recent failure.

#100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants