cancel
Showing results for 
Search instead for 
Did you mean: 

Open source *nix based flasher

geoff2399
Associate II
Posted on June 29, 2010 at 13:54

Open source *nix based flasher

10 REPLIES 10
alexalex9
Associate II
Posted on May 17, 2011 at 13:56

Sloadhost is fixed (at least the bzeroing behavior)  and moderately retested now.

I haven't touched or retested (yet) the Windows side code. 

Thanks, the link for serial documentation you posted is very good, and I also looked at your code, which is clear.  Do you have a style guide you follow?

It does leave me wondering, glibc has the cfmakeraw() function, why they didn't also do a nice wrapper for setting all the options or safely leaving them alone.

Cheers,

Alex

 

From: mcrae.geoffrey

Posted: Monday, July 05, 2010 3:41 AM

Subject: Open source *nix based flasher

Hi Alex,

bzeroing is a major issue, it can and will stomp on driver flags that may/will be set by the serial driver in the kernel, you should AND/OR the existing values to setup the structure. Have a look at serial_linux.c in stm32flash for an example of how to properly configure the device.

I am also restoring the old configuration on close, but that does not fix the problem, your code may fail to run on some systems as you are stomping on flags in the structure you don't know about.

I found this site much more complete and up to date:

http://www.easysw.com/~mike/serial/serial.html

, that howto you linked is very old.