Re: [Openocd-development] making the target scripts a bit less verbose (?yvind Harboe)

2010-12-19 Thread Øyvind Harboe
On Fri, Dec 17, 2010 at 5:33 PM, Peter Stuge wrote: > Øyvind Harboe wrote: >> > In my opinion the if/then version makes it easier for new users >> > to customize cfg files.  And since most users will need to >> > customize at least one cfg file, I think simplicity trumps short >> > files. >> >> I

Re: [Openocd-development] making the target scripts a bit less verbose (?yvind Harboe)

2010-12-17 Thread Øyvind Harboe
On Fri, Dec 17, 2010 at 5:33 PM, Peter Stuge wrote: > Øyvind Harboe wrote: >> > In my opinion the if/then version makes it easier for new users >> > to customize cfg files.  And since most users will need to >> > customize at least one cfg file, I think simplicity trumps short >> > files. >> >> I

Re: [Openocd-development] making the target scripts a bit less verbose (?yvind Harboe)

2010-12-17 Thread Peter Stuge
Øyvind Harboe wrote: > > In my opinion the if/then version makes it easier for new users > > to customize cfg files.  And since most users will need to > > customize at least one cfg file, I think simplicity trumps short > > files. > > I think you raise important enough points that unless they are

Re: [Openocd-development] making the target scripts a bit less verbose (?yvind Harboe)

2010-12-17 Thread Øyvind Harboe
On Fri, Dec 17, 2010 at 5:03 PM, John Hartman (NoICE) wrote: > ?yvind Harboe wrote: >> Which is better? (whatever "better" is) >> >> This: >> >> if {[info exists CHIPNAME]} { >>    set  _CHIPNAME $CHIPNAME >> } else { >>    set  _CHIPNAME at91r40008 >> } >> or this: >> >> set _CHIPNAME [defaultval

Re: [Openocd-development] making the target scripts a bit less verbose (?yvind Harboe)

2010-12-17 Thread John Hartman (NoICE)
?yvind Harboe wrote: > Which is better? (whatever "better" is) > > This: > > if {[info exists CHIPNAME]} { >set _CHIPNAME $CHIPNAME > } else { >set _CHIPNAME at91r40008 > } > or this: > > set _CHIPNAME [defaultval $CHIPNAME at91r40008] As someone who USES OpenOCD but doesn't live and