Mleaf / stm32flash

Automatically exported from code.google.com/p/stm32flash
0 stars 0 forks source link

'merging' branch doesn't build on OS X. #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patch fixes some build issues on OS X.

Note that when selecting baud rates, many posix systems (Linux, BSD, OS X) will 
happily accept any numeric value, not just the B* defines.

Original issue reported on code.google.com by DrZip...@gmail.com on 6 Dec 2012 at 7:42

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! I missed the warning about missing utils.h include because the 
parsers/Makefile was incomplete. I have fixed both issues (locally).

The guarding of baud rates macros make sense. Maybe we should do it 
systematically for all non-posix speeds.

Note that on Linux, the numeric value is not the same as the baud rate, so we 
need to always use the B* macros there.

Original comment by lists.to...@gmail.com on 8 Dec 2012 at 6:29

GoogleCodeExporter commented 9 years ago
Huh, odd.  I was pretty sure that Linux supported arbitrary serial rates in a 
sensible fashion, but apparently not (or perhaps it's just that people got 
upset... there's a Debian bug specifically complaining that arbitrary speeds 
can be set...) Anyway, many thanks.

Original comment by DrZip...@gmail.com on 9 Dec 2012 at 12:25

GoogleCodeExporter commented 9 years ago
I think Linux supports arbitrary serial rates, but not through the 
cfsetispeed() interface.

In your patch you also check for B460800 but that seems to be defined also on 
Mac: http://src.gnu-darwin.org/src/sys/sys/termios.h.html

I have fixed up the commit which adds the new speeds to check for GNU C 
library, so it should build fine on OS X now. Testing is welcome.

Original comment by lists.to...@gmail.com on 10 Dec 2012 at 10:09

GoogleCodeExporter commented 9 years ago
This has now been fixed in the official repository and is included in version 
0.3beta2.

Original comment by lists.to...@gmail.com on 9 Dec 2013 at 11:23