Joerg Wunsch wrote:
> As Michal Ludvig wrote:
> 
>> one outstanding problem with the BusPirate programmer that should be
>> addressed before the next release is the behaviour when avrdude gets
>> killed (for instance with Ctrl-C) during programming. That leaves
>> the BusPirate in a non-default mode that isn't very easy to get out
>> from.
> 
> I've got my doubts we'll be able to fix that before the next
> release...

One thing is reseting BusPirate during unclean exit (that may not be
cleanly doable) and another thing is detecting that BP is in a
non-default state and resetting it upon next avrdude run. At least that
should be implemented so that people can run avrdude, Ctrl-C it and run
avrdude again without power-bouncing the BusPirate (as it doesn't have a
reset button :-/ )

What's your deadline for the next release by the way?

> . There are still many functions in libavrdude that directly call
>   exit(1).  They should not do that.  Instead, they should propagate
>   their failure through a return code, and leave it up to the caller
>   to handle it.  The only file that should ever call exit(1) is
>   main.c.

You can register a cleanup function with atexit() to ensure it's called
after any exit(). However that doesn't kick in for exits triggered by
signals.

Michal


_______________________________________________
avrdude-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to