avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introducing SerialUPDI programmer


From: Joerg Wunsch
Subject: Re: Introducing SerialUPDI programmer
Date: Tue, 30 Nov 2021 21:02:01 +0100

As Dawid Buchwald wrote:

> Anyway, as for the implementation, I’m still working on it, and
> probably will, at least for a while. What I do need to know right
> now, is whether it is OK to change some of the core AVRDUDE serial
> code. The thing is that for this particular implementation I need to
> be able to change serial connection parameters - UPDI uses slightly
> different ones. What I did was change to union pinfo, like so:

It's certainly OK to change things if needed.

> And, obviously, changed each and every occurrence to set the values to 
> default, like so:
> 
> pinfo.serialinfo.baud = 19200;
> pinfo.serialinfo.cflags = SERIAL_DEFAULT_FLAGS;

Well, the biggest issue here is, that entire baudrate switching code
is there since the old JTAGICEmkII uses two different baud rates: it
attaches with 19200 Bd, but after initialization switches to 115200
Bd.

XBee has another hack to decide between two different baud rates, but
only during startup, not back and forth as with the JTAGICEmkII.

For all other devices, if a baudrate is needed at all, it's either
specified by the user on the command-line, or a default from the "pgm"
object is used.

Not sure what your cflags is about though. Is that the termios.c_cflag
value? It can probably be handled there if needed.

> Bonus question: should it all go in one huge patch, or should there
> be one first, containing only change enabling different serial
> connection parameters, followed later on by the one related to
> SerialUPDI implementation only? Any preference?

It would be cool if you sketch out some of the implementation details
here in the mailinglist before coding everything.

Otherwise, use good judgement for what belongs into a single patch,
and what would better be separated.

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]