avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] New option-parsing


From: Jan-Hinnerk Reichert
Subject: [avrdude-dev] New option-parsing
Date: Sun, 8 Feb 2004 23:55:09 +0100
User-agent: KMail/1.5.4

Hi,

I currently investigating the option parsing. I have a first working 
hack with programmer dependant options (only "-E") here.

The problem I encounter, is that "main.c" needs to know the option to 
pass it through. In addition it will be hard to avoid option-clashes, 
while new options are invented for both programmers and the main 
application.

So, I think we need a "programmer option"-option. Of course, we can 
translate "-E" for backwards-compatibility.
Let's asseme "-x" (eXtended) for now ;-)

avrdude [...] -x "-a foo -b foo -c -d"

How do we pass this options to the programmer?
I can think of two ways:

1) Pass the whole string to the programmer and let it do all parsing. 
Bad thing is that you have to duplicate the parsing code

2) Pass the options to the programmer one at a time. To do this we 
have to get an option-description first. So, we need another function 
in pgm-struct. We should also add a function for checking consistency 
after all options are through. So we get alot new stuff in the 
pgm-struct.

However, there is no need to define any functions for programmers that 
don't support special options, no matter how we implement this.

Any comments on this?

BTW: Are there plans to remove the deprecated options any time soon? 
Would make some nice cleanup in main...

Cheers
  Jan-Hinnerk





reply via email to

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