[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] Patch for "Safemode" Support
From: |
Colin O'Flynn |
Subject: |
Re: [avrdude-dev] Patch for "Safemode" Support |
Date: |
Thu, 6 Jan 2005 11:26:20 -0400 |
User-agent: |
KMail/1.7.1 |
Hi,
> Yes, I think so. Enable safemode by default, and allow the user to
> opt out of it in case they want to much with the fuse bits.
The attached patch does this. I changed it around a bit - this patch is
against the CVS version, not a patch of my other patch. Patch main.c,
Makefile.am, and dump the safemode.c and safemode.h into the main directory
with everything else. Then run ./bootstrap and whatnot as you normally would.
Now safemode routines are in a seperate file. This is done so that you can
tell safemode to allow certain fuse changes, if for example you wanted
safemode to still be active even when the user has changed the fuse bits.
Right now by default safemode is on, and it will warn the user if lfuse,
hfuse, or efuse is selected to write to. As-is it still allows the operation
to complete, the output looks like this:
address@hidden avrdude-cvs20050104]$ ./avrdude -c stk500 -p m128
-P /dev/ttyS0 -U hfuse:w:out.txt:r
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9702
avrdude: NOTE: FUSE memory has been specified, and safemode is ON
avrdude: This will not allow you to change the fuse bits.
avrdude: To disable this feature, specify the -u option.
avrdude: erasing chip
avrdude: reading input file "out.txt"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against out.txt:
avrdude: load data hfuse data from input file out.txt:
avrdude: input file out.txt contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: safemode: hfuse changed! Read as d0, was 1f
avrdude: safemode: and is now rescued
avrdude: safemode: Fuses OK
avrdude done. Thank you.
address@hidden avrdude-cvs20050104]$
If you try to enter terminal mode with safemode enabled, before you enter
terminal mode it will tell you that:
avrdude: Safemode is enabled, you will NOT be able to change the fuse bits.
Use -u option to disable
Regards,
-Colin
safemode_patch_20050106.tgz
Description: application/tgz
- [avrdude-dev] Patch for "Safemode" Support, Colin O'Flynn, 2005/01/05
- Re: [avrdude-dev] Patch for "Safemode" Support, E. Weddington, 2005/01/05
- Re: [avrdude-dev] Patch for "Safemode" Support, Joerg Wunsch, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, Joerg Wunsch, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, Colin O'Flynn, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, Joerg Wunsch, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support,
Colin O'Flynn <=
- Re: [avrdude-dev] Patch for Patch of "Safemode" Support, Colin O'Flynn, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, Joerg Wunsch, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, E. Weddington, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, E. Weddington, 2005/01/06
- Re: [avrdude-dev] Patch for "Safemode" Support, Brian Dean, 2005/01/06
Re: [avrdude-dev] Patch for "Safemode" Support, E. Weddington, 2005/01/06