error code 1

Moderator: Benj

Post Reply
toms
Flowcode v5 User
Posts: 1
Joined: Fri Jan 14, 2011 12:22 am
Contact:

error code 1

Post by toms »

E:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrc.bat reported error code 1
I think the batch file is configured wrong
[Programmer=AVRispMKII
@SET DUDEPort=usb

@SET STKPort=COM7
@SET STKPath="E:\Program Files (x86)\Flocode 6\avr\bin\Stk500.exe"


@REM Select programmer utility
@IF "%1" == "STK500" GOTO STKprog


@REM -------------- AVRDUDE programmer --------------

@SET Fuse1=
@SET Fuse2=
@SET Fuse3=


@REM %6 is the flag to send fuse data instead of the program
@IF "%6"=="1" GOTO Config


:ProgFlash
@SET AVRDUDEcmd="%~dp0..\bin\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -U flash:w:%5
@SHIFT
@GOTO Send


:Config
@SET AVRDUDEcmd="%~dp0..\bin\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -u

@REM %7 is the number of fuses present
@IF "%7"=="1" GOTO ConfigOneFuse


:ConfigThreeFuses
@IF NOT "%8"=="-1" SET Fuse1=-U hfuse:w:%8:m
@IF NOT "%9"=="-1" SET Fuse2=-U lfuse:w:%9:m
@SHIFT
@IF NOT "%9"=="-1" SET Fuse3=-U efuse:w:%9:m
@GOTO Send


:ConfigOneFuse
@IF NOT "%8"=="-1" SET Fuse1=-U fuse:w:%8:m
@SHIFT
@GOTO Send


:Send
@REM Now add any additional command line parameters here
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
@SHIFT
%AVRDUDEcmd% %Fuse1% %Fuse2% %Fuse3% %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
@IF %ERRORLEVEL% NEQ 0 GOTO DUDEError
@GOTO End


:DUDEError
@ECHO.
@ECHO Error returned from [avrdude]
@EXIT 1


:STKprog
@REM -------------- STK500 programmer --------------

@SET STK500cmd=%STKPath% -c%STKPort% -d%3 -e -if%4 -pf -vf
%STK500cmd%

@IF %ERRORLEVEL% NEQ 0 GOTO STKError
@GOTO End

:STKError
@ECHO.
@ECHO Error returned from [stk500]
@EXIT 1

:End
@ECHO.
@ECHO Programming successful!
@EXIT 0ode]

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: error code 1

Post by Benj »

Hello,

What chip are you trying to program and can you post up your compiler messages containing the error so we can see what command arguments are being passed.

Post Reply