Das ist natürlich nicht richtig. Wenn du avrdude dabei hast geht das mit WinAVR.
So hab ich das mal gemacht:
Code:
REM %1 ProjectDir, %2 InputFileName, %3 OutDir
SET "OutDir=%3"
SET "LogFile=%OutDir%\erstellen.log"
ECHO "Programming %3\flash.hex eeprom.hex ..." >> %LogFile%
ECHO "Programming %3\flash.hex eeprom.hex ..."
SET OldDir=%CD%
CD %1
SET PrjDir=%CD%
CD %OldDir%
REM Programming support using avrdude. Settings and variables.
REM Programming hardware: alf AVR910 avrisp Bascom bsd
REM dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
SET AVRDUDE_PROGRAMMER=avrisp
SET AVRDUDE_PORT=com1
REM SET AVRDUDE_PORT=lpt1
SET AVRDUDE_WRITE_LFUSE=-U lfuse:w:0x24:m
SET AVRDUDE_WRITE_HFUSE=-U hfuse:w:0xd9:m
SET AVRDUDE_WRITE_LOCK =-U lock:w:0x2f:m
SET AVRDUDE_WRITE_FLASH=-U flash:w:flash.hex
SET AVRDUDE_WRITE_EEPROM=-U eeprom:w:eeprom.hex
SET AVRDUDE_FLAGS=-p atmega8 -P %AVRDUDE_PORT% -c %AVRDUDE_PROGRAMMER%
CD %3
REM liest den Inhalt des Flashspeichers vom ATMega8 in die Datei flash.bin r=raw i=intel s=motorola
ECHO "%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% -U flash:r:"./flash.bin":r >> %LogFile%
"%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% -U flash:r:"./flash.bin":r
REM liest den Inhalt des EEPROM (512Byte) vom ATMega8 in die Datei eeprom.bin
ECHO "%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% -U eeprom:r:"./eeprom.bin":r >> %LogFile%
"%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% -U eeprom:r:"./eeprom.bin":r
ECHO "%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% %AVRDUDE_WRITE_FLASH% %AVRDUDE_WRITE_EEPROM% %AVRDUDE_WRITE_LFUSE% %AVRDUDE_WRITE_HFUSE% >> %LogFile%
"%PrjDir%\BuildTools\WinAVR\bin\avrdude.exe" %AVRDUDE_FLAGS% %AVRDUDE_WRITE_FLASH% %AVRDUDE_WRITE_EEPROM% %AVRDUDE_WRITE_LFUSE% %AVRDUDE_WRITE_HFUSE% >> %LogFile%
CD %OldDir%
Wenn ich mich nicht allzusehr irre, hatte das damals geklappt.
Ansonsten hilft es manchmal auch, sich die Optionen anzusehen:
Code:
Usage: avrdude [options]
Options:
-p <partno> Required. Specify AVR device.
-b <baudrate> Override RS-232 baud rate.
-B <bitclock> Specify JTAG/STK500v2 bit clock period (us).
-C <config-file> Specify location of configuration file.
-c <programmer> Specify Programmer type.
-D Disable auto erase for flash memory
-i <delay> ISP Clock Delay [in microseconds]
-P <port> Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U <memtype>:r|w|v:<filename>[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a scrip
t.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E <exitspec>[,<exitspec>] List Programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y <number> Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.
avrdude project: <URL:http://savannah.nongnu.org/projects/avrdude>
Hoffe ich konnte helfen
sast
Lesezeichen